Live data from Hacker News

Visualizing Attention, a Transformer's Heart [video]

3blue1brown.com

91–100 of 181 posts

Re: Visualizing Attention, a Transformer's Heart [video]

#91
post #84

Earlier quoted context omitted.

Othellogpt is fed only moves and builds a model of the current board state in its activations. It never sees a board. > It's like saying you can use a lego model to build a model of another lego model. No it's like using a description of piece placements and having a picture in mind about what the current model looks like.

The "board" is abstract. Any game of this sort is defined by a series of conditional probabilities: {P(Pawn_on_sqare_blah|previous_moves) ... etc.} What all statistical learning algorithms model is sets of conditional probabilities. So any stat alg is a model of a set of these rules... that's the "clay" of these models. The problem is the physical world isn't anything like this. The reason I say, "I liked that TV sho…

> Any game of this sort is defined by a series of conditional probabilities: {P(Pawn_on_sqare_blah|previous_moves) ... etc.}

That would always be 1 or 0, but also that data is not fed into othellogpt. That is not the dataset. It is not fed in board states at all.

It learns it, but it is not the dataset.

Re: Visualizing Attention, a Transformer's Heart [video]

#92

Earlier quoted context omitted.

I mean something specific by "statistics": modelling frequency associations in static ensembles of data. Having a body which changes over time that interacts with a world that changes over time makes animal learning not statistical (call it, say, experimental). That animals fall into skinner-box irrational behaviour can be modelled as a kind of statistical learning, but it actually isnt. It's a failure of ecological…

> Having a body which changes over time that interacts with a world that changes over time makes animal learning not statistical (call it, say, experimental). The "experiment" of life is what defines the statical values! Experimentation is just learning what the statistical output of something is. If I hand you a few dice, you'd probably be able to guess the statistical probability of every number for given roll. Bec…

For dice the ensemble average is the time-average: if you roll the dice 1000 times the probability of getting a different result doesn't change.

For almost everything in the world, action on it, changes it. There are vanishingly few areas where this isn't the case (most physics, most chemistry, etc.).

Imagine trying to do statistics but every time you sampled from reality the distribution of your sample changes not due to randomness, but because reality has changed. Now, can you do statistics? No.

It makes all the difference in the world to have a body and hold the thing you're studying. Statistics is trying to guess the shape of the ice cube from the puddle; animal learning is making ice cubes.

Re: Visualizing Attention, a Transformer's Heart [video]

#93
post #91

Earlier quoted context omitted.

The "board" is abstract. Any game of this sort is defined by a series of conditional probabilities: {P(Pawn_on_sqare_blah|previous_moves) ... etc.} What all statistical learning algorithms model is sets of conditional probabilities. So any stat alg is a model of a set of these rules... that's the "clay" of these models. The problem is the physical world isn't anything like this. The reason I say, "I liked that TV sho…

> Any game of this sort is defined by a series of conditional probabilities: {P(Pawn_on_sqare_blah|previous_moves) ... etc.} That would always be 1 or 0, but also that data is not fed into othellogpt . That is not the dataset. It is not fed in board states at all. It learns it, but it is not the dataset .

It is the dataset. When you're dealing with abstract objects (ie., mathematical spaces), they are all isomorphic.

It doesnt matter if you "feed in" 1+1+1+1 or 2+2 or sqrt(16).

The rules of chess are encoded either explicit rules or by contrast classes of valid/invalid games. These are equivalent formulations.

When you're dealing with text tokens it does matter if "Hot" is frequently after "The Sun is..." because reality isnt an abstract space, and text tokens arent measures of it.

Re: Visualizing Attention, a Transformer's Heart [video]

#94

Earlier quoted context omitted.

That's not really an explanation that tells people all that much, though. I can explain that car engines 'just' convert gasoline into forward motion. But if a the person hearing the explanation is hoping to learn what a cam belt or a gearbox is, or why cars are more reliable now than they were in the 1970s, or what premium gas is for, or whether helicopter engines work on the same principle - they're going to need a…

It explains the LLM/NN. If you want to explain why it emits words in a certain order you need to explain how reality generated the dataset, ie., you need to explain how people communicate (and so on). There is no mystery why an NN trained on the night sky would generate nightsky-like photos; the mystery is why those photos have those patterns... solving that is called astrophysics. Why do people, in reasoning through…

That leaves loads of stuff unexplained.

If the LLM is capable of rewording the MIT license into a set of hard-hitting rap battle lyrics, but the training dataset didn't contain any examples of anyone doing that, is the LLM therefore capable of producing output beyond the limits of its training data set?

Is an LLM inherently constrained to mediocrity? If an LLM were writing a novel, does its design force it to produce cliche characters and predictable plotlines? If applied in science, are they inherently incapable of advancing the boundaries of human knowledge?

Why transformers instead of, say, LSTMs?

Must attention be multi-headed? Why can't the model have a simpler architecture, allowing such implementation details to emerge from the training data?

Must they be so big that leading performance is only in the hands of multi-billion-dollar corporations?

What's going on with language handling? Are facts learned in an abstract enough way that they can cross language barriers? Should a model produce different statements of fact when questioned in different languages? Does France need a French-language LLM?

Is it reasonable to expect models to perform basic arithmetic accurately? What about summarising long documents?

Why is it that I can ask questions with misspellings, but get answers with largely correct spelling? If misspellings were in the training data, why aren't they in the output? Does the cleverness that stops LLMs from learning misspellings from the training data also stop them from learning other common mistakes?

If LLMs can be trained to be polite despite having examples of impoliteness in their training data, can they also be trained to not be racist, despite having examples of racism in their training data?

Can a model learn a fact that is very rarely present in the training data - like an interesting result in an obscure academic paper? Or must a fact be widely known and oft-repeated in order to be learned?

Merely saying "it predicts the next word" doesn't really explain much at all.

Re: Visualizing Attention, a Transformer's Heart [video]

#95

As someone with a background in quantum chemistry and some types of machine learning (but not neural networks so much) it was a bit striking while watching this video to see the parallels between the transformer model and quantum mechanics. In quantum mechanics, the state of your entire physical system is encoded as a very high dimensional normalized vector (i.e., a ray in a Hilbert space). The evolution of this vect…

I think you're just describing a state machine, no? The fact that you encode the state in a vector and steps by matrices is an implementation detail...?

Perhaps a probabilistic FSM describes the actual computational process better since we don’t have a concept equivalent to superposition with transformers (I think?), but the framework of a FSM alone doesn’t seem to capture the specifics of where the model/machine comes from (what I’m calling the Hamiltonian), nor how a given context window (the subsystem) relates to it. The change of basis that involves the attention mechanism (to achieve context-awareness) seems to align better with existing concepts in QM.

One might model the human brain as a FSM as well, but I’m not sure I’d call the predictive ability of the brain an implementation detail.

Re: Visualizing Attention, a Transformer's Heart [video]

#96

Earlier quoted context omitted.

It explains the LLM/NN. If you want to explain why it emits words in a certain order you need to explain how reality generated the dataset, ie., you need to explain how people communicate (and so on). There is no mystery why an NN trained on the night sky would generate nightsky-like photos; the mystery is why those photos have those patterns... solving that is called astrophysics. Why do people, in reasoning through…

That leaves loads of stuff unexplained. If the LLM is capable of rewording the MIT license into a set of hard-hitting rap battle lyrics, but the training dataset didn't contain any examples of anyone doing that, is the LLM therefore capable of producing output beyond the limits of its training data set? Is an LLM inherently constrained to mediocrity? If an LLM were writing a novel, does its design force it to produce…

Which conditional probability sequences can be exploited for engineering utility cannot be known ahead of time; nor is it explained by the NN. It's explained by investigating how the data was created by people.

Train a NN to generate pictures of the nightsky: which can be used for navigation? Who knows, ahead of time. The only way of knowing is to have an explanation of how the solar system works and then check the pictures are accurate enough.

The NN which generates photos of the nightsky has nothing in it that explains the solar system, nor does any aspect of an NN model the solar system. The photos it was trained on happened to have their pixels arranged in that order.

Why those arrangements occur is explained by astrophysics.

If you want to understand what ChatGPT can do, you need to ask OpenAI for their training data and then perform scientific investigations of its structure and how that structure came to be.

Talking in terms of the NN model is propaganda and pseudoscience: the NN didnt arrange the pixels, gravity did. Likewise, the NN isnt arranging rap lyrics in that order because it's rapping: singers are.

There is no actual mystery here. It's just we are prevented form access to the data by OpenAI, and struggle to explain reality which generated that data -- which requires years of actual science.

Re: Visualizing Attention, a Transformer's Heart [video]

#97
post #6

I finally understand this! Why did every other video make it so confusing!

Not sure if you mean it as rhetorical question but I think it's an interesting question. I think there are at least three factors why most people are confused about Transformers: 1. The standard terminology is "meh" at most. The word "attention" itself is just barely intuitive, "self-attention" is worse, and don't get me started about "key" and "value". 2. The key papers (Attention is All You Need, the BERT paper, et…

> This is probably an unpopular opinion

There's a reason The Illustrated Transformer[1] was/is so popular: it made the original paper much more digestible.

[1] https://jalammar.github.io/illustrated-transformer/

Re: Visualizing Attention, a Transformer's Heart [video]

#98

Earlier quoted context omitted.

Yes, it's really hard -- the innovation is aligning the really basic dot-product similarity mechanism to hardware. You can use basically any NN structure to do the same task, the issue is that they're untrainable because they arent parallizable. There is no innovation here in the sense of a brand new algorithm for modelling conditional probabilities -- the innovation is in adapting the algorithm for GPU training on t…

No. This is blatantly false. The belief that recurrent model can't be scaled is untrue. People have recently trained MAMBA with billions of parameters. The fundamental reason why transformers changed the field is that they are lot more scalable context length wise, and LSTM, LRU etc doesn't come close.

> they are lot more scalable context length wise

Sure, we're agreeing. I'm just being less specific.

Re: Visualizing Attention, a Transformer's Heart [video]

#99

As someone with a background in quantum chemistry and some types of machine learning (but not neural networks so much) it was a bit striking while watching this video to see the parallels between the transformer model and quantum mechanics. In quantum mechanics, the state of your entire physical system is encoded as a very high dimensional normalized vector (i.e., a ray in a Hilbert space). The evolution of this vect…

I've been thinking about his a bit lately. If time is non-continuous then could you model the time evolution of the universe as some operator recursively applied to the quantum state of the universe? If each application of the operator progresses the state of the universe by a single planck-time could we even observe a difference between that and a universe where time is continuous?

Re: Visualizing Attention, a Transformer's Heart [video]

#100

Earlier quoted context omitted.

I think you're just describing a state machine, no? The fact that you encode the state in a vector and steps by matrices is an implementation detail...?

Perhaps a probabilistic FSM describes the actual computational process better since we don’t have a concept equivalent to superposition with transformers (I think?), but the framework of a FSM alone doesn’t seem to capture the specifics of where the model/machine comes from (what I’m calling the Hamiltonian), nor how a given context window (the subsystem) relates to it. The change of basis that involves the attention…

| context window

I actually just asked a question on the physics stack exchange that is semi relevant to this. https://physics.stackexchange.com/questions/810429/functiona...

In my question I was asking about a hypothetical time-evolution operator that includes an analog of a light cone that you could think of as a context window. If you had a quantum state that was evolved through time by this operator then I think you could think of the speed of light being a byproduct of the width of the context window of some operator that progresses the quantum state forward by some time interval.

Note I am very much hobbyist-tier with physics so I could also be way off base and this could all be nonsense.

Post reply on HN