Neural networks and Markov: a new potential, with a single problem.

  • 6 Replies
  • 3418 Views
*

Gustavo6046

  • Roomba
  • *
  • 3
  • Inventions of a mad man... I guess?
I have a new idea, where Markov chains build sentences, for which the connections are chosen by neural networks. The max number of normalizable connections for each Markov node is 128. The problem here is how to find out how to form the reply, where the input is the sentence that came *before*. To retrieve it, I need a neural network that gets the next node from the current reply node, AND the input sequence. Seq2seq networks are not an option.

My possible solution would be to convert a phrase into a number using of an encoder neural network, e.g. with the phrase "Hello, my dear son!" we iterate from inputs [''Hello", 0] → A, where A is the output of the neural network. Then we do it again, but with the word "my", so that ["my", A] → A + B. And so on, until we convert that phrase to A + B + C + D — where the plus sign isn't a sum, but some sort of joining, that goes on inside the neural network.

That number is then passed into a decoder neural network, such that [0, A + B + C + D] → [N₁, A + B + C + D], and [N₁, A + B + C + D] → [N₂, A + B + C + D], ..., [0, A + B + C + D]. Nₙ is denormalized into the word that corresponds to the nth node that follows the node Nₙ₋₁

What about you? Any better solutions or suggestions? :)

*

Korrelan

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1454
  • Look into my eyes! WOAH!
    • YouTube
Re: Neural networks and Markov: a new potential, with a single problem.
« Reply #1 on: December 06, 2017, 11:59:44 am »
Welcome Gustavo

The conversion of words to symbols/ indexes could be done with a simple dictionary database.  Each word is just substituted for its numerical index/ position in the dictionary and then fed into the decoder.

I presume the object of the decoder is to reduce the complexity of the sentence prior to processing?

For the output of the system you would have to reverse the sequence.  The output of the processing is fed into a encoder that produces the relative dictionary indexes to form the output sentence.

Am I close lol?

 :)
It thunk... therefore it is!...    /    Project Page    /    KorrTecx Website

*

Gustavo6046

  • Roomba
  • *
  • 3
  • Inventions of a mad man... I guess?
Re: Neural networks and Markov: a new potential, with a single problem.
« Reply #2 on: December 06, 2017, 03:01:07 pm »
The thing is, Markov would be a helpful guide to avoid words that wouldn't make sense in a sequence - Markov would parse sentences that make sense.

Anyway, that what you described is a seq2seq neural network, which I unfortunately don't know how to do.

*

Korrelan

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1454
  • Look into my eyes! WOAH!
    • YouTube
Re: Neural networks and Markov: a new potential, with a single problem.
« Reply #3 on: December 06, 2017, 03:12:42 pm »
Quote
The thing is, Markov would be a helpful guide to avoid words that wouldn't make sense in a sequence - Markov would parse sentences that make sense.

Very true, it would cut out having to parse the sentence through a lookup list. 

It sounds like a cool idea.  If you code it, post your progress and results, I would be interested following your progress.

 :)
It thunk... therefore it is!...    /    Project Page    /    KorrTecx Website

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Neural networks and Markov: a new potential, with a single problem.
« Reply #4 on: December 08, 2017, 10:58:26 am »
I have an idea for which neural networks process the states from which Markov chains build sentences.
My Very Enormous Monster Just Stopped Using Nine

*

Korrelan

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1454
  • Look into my eyes! WOAH!
    • YouTube
Re: Neural networks and Markov: a new potential, with a single problem.
« Reply #5 on: December 09, 2017, 07:21:44 pm »
Well? Come on... Spill the theory...

 :)
It thunk... therefore it is!...    /    Project Page    /    KorrTecx Website

*

Gustavo6046

  • Roomba
  • *
  • 3
  • Inventions of a mad man... I guess?
Re: Neural networks and Markov: a new potential, with a single problem.
« Reply #6 on: December 11, 2017, 11:50:31 pm »
It did not go very well, since the LSTMs are always addicted to one word, repeating it indefinitely ("no no no no", "argh argh argh", "mediocre mediocre mediocre mediocre" etc). so I decided to try a slightly less generative method.

Let's say we train four sentences.

  • A: Hello, how are you?
  • B: Great, thanks!
  • C: Oh, great then! How about you?
  • D: Great too, thanks!

These are stored into a chain, not of words, but of sentences.

To get an answer from this bot,

  • Find the top sentences with the most important words that intersect with the query. (in this case A and C)
  • Beginning with the largest intersection (A), for which the replying sentence is B, get the words of B with the highest TF-IDF words, then get ALL the words between the first and the last of these important words. ("Great,")
  • Repeat for C -> D. "Thanks!"
  • Join them correctly, in the order they were processed (or in any order you find better). ("Great, thanks!")

That should be okay for this case, but I did not test for other cases.

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

386 Guests, 0 Users

Most Online Today: 491. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles