Earlier quoted context omitted.
The way you describe it, it doesn't seem much more complicated to me, from a “how does it work” perspective, just way bigger.
If the minimal representation of a model of the behavior is "way bigger", why are you disputing that it's more complicated? What's the difference?
Markov Chains are the Original Language Models
131–140 of 177 posts
Re: Markov Chains are the Original Language Models
#132Earlier quoted context omitted.
Number of parameters is not the difference. A Markov chain can easily be a multi-dimensional matrix with millions of entries. The significant difference is that a length 3 Markov chain can only ever find connections between 3 adjacent symbols (words, usually). LLMs seem to be able to find and connect abstract concepts at a very long and variable distances in the input. Nevertheless I agree with the premise of the pos…
Seemingly? Is there not a direct technical reason to compare?
Re: Markov Chains are the Original Language Models
#133Earlier quoted context omitted.
Predicting subsequent text is pretty much exactly what they do. Lots of very cool engineering that’s a real feat, but at its core it’s argmax(P(token|token,corpus)): https://github.com/facebookresearch/llama/blob/main/llama/ge... The engineering feats are up there with anything, but it’s a next token predictor.
Did read the part about king - man + woman = queen? How is that a next-token predictor?
input: king - man + woman =
"The equation you're referring to is often used as an example of how word embeddings work in natural language processing (NLP). Word embeddings are a type of word representation that allows words to be represented as vectors in a continuous vector space. This allows for capturing semantic similarities between words based on their context.
The equation "king - man + woman" is a famous example that illustrates how word embeddings can capture analogies. In vector space, the operation is meant to find a word that is similar to "king" but more closely associated with "woman" than "man". The result of this operation is often "queen".
This result demonstrates the ability of certain word embedding models, like Word2Vec or GloVe, to capture relational similarities between words. It's a reflection of the model's capacity to understand that the relationship between "king" and "man" is similar to the relationship between "queen" and "woman", based on the learned vector representations of these words from large text corpora."
Re: Markov Chains are the Original Language Models
#134Earlier quoted context omitted.
It's not. There's fundamental architectural differences that couldn't be bigger. A better comparison would be that it's like a windup toy versus a group of humans moving an entire civilization. They both move along a distance, but just listing the systems that the human group has that the windup toy doesn't is too long to fit on a page.
> It's not. There's fundamental architectural differences that couldn't be bigger. LLM architecture is a markov chain to the core. It isn't a lookup table like old markov chains but it is still a markov chain: next word prediction based on previous words.
Seems like most people fail to understand that LLMs (as they are implemented these days) are markov chains by definition, regardless of how much "better" they are compared to "Dissociated Press"-style markov chains based on lookup tables.
> A Markov chain or Markov process is a stochastic model describing a sequence of possible events in which *the probability of each event depends only on the state attained in the previous event*.
Is the process calculating a probability distribution over "next token", based on a bounded-size context of "previous tokens"? Yes? Then it is a markov chain, by definition.
It's like saying that a "human" is not an "animal", since it is so much "better" and "capable" than (other/usual) animals. The more you argue, the more I'll be convinced that you either don't know what the definition of a "human" is, or that you don't know what the definition of an "animal" is (or both).
Re: Markov Chains are the Original Language Models
#135Earlier quoted context omitted.
With the caveat that I'm not an LLM expert here but have read up on some of this... What's basically going on is that the LLM has "read" vast amounts of text and classified words in all kinds of dimensions. As it goes from word to word it's predicting based on all of those dimensions, rather than the Markov chain's simple probabilities. So it knows "king" has high values of masculinity and authority, for example, and…
So you're saying that the word2vec king/queen result was the result of feeding the verbatim text "king+man-woman", and that text being continued as "queen"? I assumed that was more the result of doing math on the properties the model generated for the tokens king, man, queen, etc. And in that case, why does "Write me a limerick " result in ChatGPT producing limericks, when vanishingly few of the limericks in the sour…
This isn't wrong, the model does do a bunch of "math" (HUGE matrix and vector multiplications) on the vectors generated by the tokens, but it's not like the model has any recognizable process that resembles our own reasoning process (unless you ask it to explain "its own reasoning", but the fact that the model explains it in terms of human reasoning doesn't mean that's the way it works internally -- as of today LLMs do not have introspection capabilities).
I suspect most people who haven't thought very deeply about what computation, reasoning and intelligence is would need some time to come to terms to what generative AI is telling us about them.
If it helps, do note that the models have been trained on terrabytes of training data, and the model has "learnt" a bunch of patterns that it could apply to "king+man-woman=" to come to "queen" as the answer. We could even speculate that the word2vec vectors for king and queen would have some dimensions that roughly translates to "class" (monarch), and "gender" (same for man and woman), and it would be relatively straightforward for the model to grab the token that has a signal on those same dimensions. But that's kind of a crude way to look at LLMs since the billions of parameters aren't there only to make money for nVidia, so the actual processes involve much, much, much more compute that human minds would not be able to comprehend.
Re: Markov Chains are the Original Language Models
#136Earlier quoted context omitted.
> This is what I've been saying to people, LLMs aren't much smarter than a Markov Chain Then you're doing some combination of grossly overestimating the latter and/or underestimating the former. A Markov Chain is a (small) language model with a context length of 1, never more, that's a definitional requirement of a Markov process.
Markov chains are defined in terms of states, which are not necessarily the same as tokens. As an example, de Bruijn graphs have been widely used in bioinformatics. There are many definitions, but the key idea is that nodes are strings of length k, and there may be an edge from u to v if the length k-1 suffix of u is the same as the length k-1 prefix of v. It's trivial to turn a de Bruijn graph into a Markov chain wi…
While true, I don't see how that helps? The example isn't particularly illuminating, yes you can make a Markov chain that encompasses all possible states in principle, but in practice you can't do that with a language model because you can't list all possible states (they mostly don't exist in the training set but even if they did there's no room to store them) and instead have to make a system which is, for lack of a non-anthropomorphic verbs, "trying to guess" the state — most of the cool stuff in the LLM is the system doing the guessing[0].
> If you have the Burrows-Wheeler transform of the training data, you can use it to simulate a Markov chain over a de Bruijn graph with any context length. You can also change the context length on the fly. I toyed a little bit with that idea when I was a grad student ~15 years ago, but nothing really came out of it. Building the model was already cheap back then, while getting data was the real bottleneck.
To me, the Burrows-Wheeler transform looks like a way to generate a compact tokenisation that doesn't make presumptions about data structure — while I think that's a good idea (and much better than the naive English language tokenisation of "anything that's not a letter or apostrophe" which IMO probably harmed early NLP), I don't think it's a good argument for drawing similarities between Transformer models (or even RNN models) and Markov models
> LLMs are basically lossy approximations of Markov chains. If you have a small accurate approximation of a larger model, the approximate model probably has the ability to generalize. And it turns out that good generalization over textual data looks like intelligent behavior.
I wonder if you're using "approximation" to mean something different than I would understand the term?
You can map a Turing machine to a sufficiently large Markov chain whose probabilities are always 1 or 0, but that has the same problem: Turing machines and LLMs aren't lossy approximations of Markov chains, they're at least generalisations that only look the same when you construct an extreme form.
Hopefully we both agree that it would be very weird to argue that "the language centres of human brains are basically just approximations of Markov chains"? Even though we can probably sufficiently well describe each neuron within a brain by a Markov chain?
[0] This reminds me of my issue with John Searle's Chinese room argument: Searle denies the system truly understands Chinese because the human reading the books and following the instructions doesn't know Chinese, I would argue that the intelligence and understanding is encoded in the books, and that the entity lacking understanding is the substrate upon which the instructions are processed.
To argue "the system as a whole can't be said to understand because the human doing the data processing doesn't understand" seems to me to map to saying "humans can't be said to understand because the brain cells doing the data processing don't understand", or even "… atoms conveying electrochemical signals across synapses don't understand".
But I'm clearly digressing now, so I'm glad I put this in a footnote…
Re: Markov Chains are the Original Language Models
#137Earlier quoted context omitted.
It would be more accurate to say that a Markov chain is an example of a method that would perform relatively well at the same training task as a LLM. So too, might a human trying to predict the next tokens. But a human and a Markov chain are not the same underlying process to achieve next token prediction, and neither is the same underlying process as a LLM.
LLM are markov chains, a markov chain is a general concept and not just a text model technique. You must be thinking about the very simple markov chain models we had before where you just predicted the next word by looking up sentences with the same preceding words and picking a random of those words, that is also a markov chain just like LLM but a much simpler one, you are right LLMs aren't like that but they are st…
A blog post of you want to read more:
https://medium.com/@andrew_johnson_4/are-transformers-markov...
Re: Markov Chains are the Original Language Models
#138This is what I've been saying to people, LLMs aren't much smarter than a Markov Chain - a lot of twitter bots and earlier chat agents were driven by them. What I do see though is the infrastructure around LLMs making a difference.
I've never seen a Markov chain do anything like GPT4. I'm not sure how you can say with a straight face they are basically the same.
We say systems can perform the same types of computations if they're both Turing complete. Yet, we wouldn't implement everything in every "language" that is Turing complete.
Perhaps, every LLM could be represented as a Markov chain, and for some it even makes sense (e.g., easier to train, easier to reason about), but in most cases it's a bad idea (e.g., expensive, bad performance).
Re: Markov Chains are the Original Language Models
#139Earlier quoted context omitted.
> In principle the inner working of an LLM can be anything from a Markov-chain-like predictor to a beyond-human intelligence. I'm afraid I have to disagree. Next-token prediction isn't just the interface we use for LLMs, it is fundamentally what they are , to the very core. The training and loss function of the foundation models are completely oriented towards next-token accuracy. Reasonable people can disagree about…
>The training and loss function of the foundation models are completely oriented towards next-token accuracy. This doesn't mean anything. Loss function and training only concern themselves with the result of the prediction. The in-between, the computation, training does not care except as a means to an end. It's not Input A > Output B. It's Input A > Computation > Output B. That Computation could quite literally be a…
Neural networks are very general function approximators so yes, there is some room for emergent behavior. But it could _not_ be "quite literally anything." It's plugging in values for a single (very big) equation.
I think we do ourselves a disservice by pretending it's more of a black box than it is.
Re: Markov Chains are the Original Language Models
#140Markov chains are fun. I often use them when teaching a Python fundamentals course. You can create an implementation in around 100 lines of code that explores many features of the language: classes, functions, loops, dictionaries, and lists. Then, you can augment with tests, a command line app, typing, etc.
How can I take your course?
You can contact me on my website https://metasnake.com