Comment by jgilias

25 days ago

> The amazing part here is that Astra was large enough to walk through the problem without other tooling doing it experimentally.

To me “amazing” is not the right level of speechlessness. I mean, an LLM is still fundamentally a next token predictor, right? So what does this imply? That weights have some universal properties? E.g., “breakout game weights” always look the same regardless of training and model? Also, how does this meta-understanding of the weights end up in the weights in the first place? Idk, this is mind-blowing to me.

At this point it's either wrong or meaningless to call LLMs "next token predictors". Yes, pretraining involves predicting the next token. But after that you're in the world of RLHF, RLVR, and other post-training.

A model is _sort of_ designed to predict the next token in a string of text. But it's equally accurate to say it's designed to edit code until it passes a suite of unit tests.

Yes, they generate sequentially, so "next token predictor" isn't technically incorrect (which is why I chose the word "meaningless"). But it's pretty clear there's a mechanism inside them that allows them to "plan" what they generate. I might as well call you a next word predictor.

  • > A model is _sort of_ designed to predict the next token in a string of text. But it's equally accurate to say it's designed to edit code until it passes a suite of unit tests.

    Training is not design. Design is the mechanism, namely a statistical method of learning distributions, and of executing those distributions computationally as an IO function.

    The model is not designed to write unit tests. It is trained to do so, i.e. the distribution learned and reinforced is one such that it maps the I distribution to the O distribution that is what human beings typically do or want when writing unit tests. The design is the suite of algorithms used for this (which is ultimately global next token prediction)

    I think you are conflating design (the mechanics) with their cultural or user level function.

    You are basically saying "my bike isn't just rotating wheels on a frame because it takes me places". Hopefully you can see how both parts of that statement are true and why contrasting them as if the first clause is somehow false or inaccurate is incorrect.

    Both these are true statements. They operate at different levels. People are constantly conflating these levels in the "is it a next token predictor" (the answer is yes) debate.

    • Yeah, fine. I was using the word design loosely. I'd also happily say something like "humans are designed to like salt and fat" and feel like that was a pretty reasonable statement, even though humans aren't designed either.

  • "next token predictor" has always referred to inference, not training. Training steps produce and bend weights, inference predicts tokens based on those weights.

    • The 'predictor' part referred to the fact that base models would effectively answer the question "what token is most likely next". Training away from that default behavior doesn't escape the technical meaning of those words- answering "what token is most likely next in a solution to Navier Stokes" is still predicting a next token- but at that point the label just means it outputs text serially.

    • > "next token predictor" has always referred to inference

      Going back to first principles, wikipedia mentions [0] inference as:

      > "Inferences are steps in logical reasoning, moving from premises to logical consequences. Inference is traditionally divided into deduction and induction"

      Is that exactly what next token predictor means, or is it correlated?

      [0] https://en.wikipedia.org/wiki/Inference

  • My understanding is that the underlying part is a next token predictor and that's what is "actually" editing the code but the part that decides what to do (to achieve a successful unit test result for example) is a mix of all the things including post training.

    • It's all a next token predictor, which is trained at first to predict the next token. RLVR etc. are also training the next token predictor.

      1 reply →

  • Yes, I didn’t mean that literally. Since “attention is all you need” it’s more like “predict the full output in full for this blob of input text”. That doesn’t change the “wtf is going on with the weight understanding bit” in what I wrote.

    • > it’s more like “predict the full output in full for this blob of input text"

      Hm. I would actually go so far as to say "predict" is just the wrong word to use in 2026, as it smuggles in an out-of-date picture of what LLMs are that's from the pre RLVR era, and which is frequently used to suggest they don't model anything real in the world but rather the statistics of language, and thus have all sorts of limitations that they've now surpassed ("an LLM will never solve a major open mathematics problem, they're just predicting tokens"). These days I tend to use the more neutral phrase "generate the next token"; I'd only say "predict" in the technical context of (say) the pre-training part of the training run where the object is indeed to minimize the cross-entropy loss function by predicting next tokens in existing text. Generating a token with a modern LLM is better described as something like, "given a context and the weights from the totality of its training, including not just next token prediction with pre-training but also solving vast numbers of math and coding problems with RLVR, the LLM generates tokens one by one." (Consider that an LLM trained purely to optimize for next token prediction with pre-training is terrible at programming and math tasks, as we all remember from 2024. In that sense the amazing results we've seen in the past two years are due to the departure from pure "next token prediction" that RLVR made possible.)

      Put another way: would it be useful to describe the AlphaZero chess engine as "just a next move predictor"? (It, too, was a large neural network trained with RL.) I would rather say: "it's playing chess by generating the next move given the state of the board." Which is what humans do too, though we do it with different hardware.

      Anyhow. I'm not sure the weight understanding is all that strange. (It's impressive, but so are many thing LLMs do these days.) LLMs are very very good at coding and math problems, of which this is one, and in particular, their RLVR training presumably includes many tasks involving neural networks, doing tasks with PyTorch, etc. It's amazing and impressive, I agree, but I'd say less amazing than proving major open theorems in mathematics, which we already know they can do.

      5 replies →

  • unless you are doing something where you stay in latent space without having a random number generator pick a word, the next token predictor part still matters. without making the tokes concrete in between, that plan doesnt exist

    if it was designed to edit code, id expect the first translation from latent space out to tokens to be the final code, not be assembling the code by random number generator.

    its not really designed to edit code until the tests succeed, we try to manipulate the distribution of tokens to predict by prompt engineering with the test results.

  • Its a stateless function that takes in x amount of words and calculates logits. It is in fact a next token predictor. Its literally nothing more than that.

    • That sounds like a next token generator to me, which I think is more accurate. The word "predict" is doing a lot of heavy lifting in your formulation. What exactly is being predicted?

  • It is not clear that there is a mechanism that allows them to plan anything. It is clear there is nothing of the sort.

    You can demonstrate definitively that there nothing other than "next token prediction" by running the same inference engine/model/prompt/settings multiple times in a row on the same hardware at temp 0 with a seed set.

    If you turn the temp up, then you might let the "mechanism" select pseudorandomly from a probability distribution of k-likely tokens with minimum p-cumulative probability. Even then, if the next token has a very high probability, deviation will be uncommon.

    I just performed this experiment right now on a few dozen runs of a dense model at thousands of tokens of output at temp 0, and all were identical. Then I did it with a MOE model, which might get some benefit of picking different experts each time. Nope. Outputs were again identical.

    • > You can demonstrate definitively that there nothing other than "next token prediction" by running

      Describing LLMs as next token predictors isn’t incorrect, it’s meaningless. It’s the equivalent of describing brains as “a bunch of atoms”.

      The problem with these descriptions is that they say nothing about high-level capabilities. If you can predict the next token in a proof of the Riemann hypothesis, then you can prove the Riemann hypothesis.

      3 replies →

> “breakout game weights” always look the same regardless of training and model

The prompt told Astra what the input and output layers mean -- that is, how the current state of the game is turned into a vector for matrix multiplication, and how the result of those multiplications is turned into an action to take in-game.

Astra saw that the model was trained on a game where the player is at the bottom of the grid and moves left and right, reward objects live at the top, and there's some not-player-controlled thing moving around in the middle. Astra knows that this type of game is called "breakout."

A model that plays breakout will have meaningful weights for the player being in the bottom row, but not for the player being anywhere else, because the player can't go anywhere else. Astra saw that there were meaningful weights for the player in the bottom row, and nodes representing the player in any other row had low-magnitude noise, so the model had never been trained on the player being anywhere besides the bottom row.

Similarly, breakout has "reward" objects in the top rows, and "there is a reward object at [COORDINATE]" is part of the input layer. Astra saw that the model was trained on reward objects in the top few rows.

It’s important to understand that it had pytorch to actually run subsets of the weights. So its more like a dedicated person running the model to find the token it shouldn’t generate, then following the weight chain back up while calculating the NN outputs to find a place where if it changes some weights (again with a lot of testing via pytorch) the result is better.

Its not natively reading the weights in the Matrix “symbols scrolling on a screen” sense. Still bloody impressive and not an outcome I would have bet on!

>I mean, an LLM is still fundamentally a next token predictor, right?

Yes, but everything, including the human brain, is "fundamentally" some underlying simpler primitives.

>E.g., “breakout game weights” always look the same regardless of training and model?

Wouldn't this be expected to be roughly the case, given NNs that share the same basic architecture to model the same quite simple thing like a breakout game?

I'm only going to skim any subthread that gets into "next token predictor" territory, but for anyone looking for a somewhat deep video about _why_ this view is wrong Casey Muratori and Demetri Spanos spent almost two hours on the subject recently: https://www.youtube.com/watch?v=aQvSG8paVjM

A couple of highlights to pique people's interests:

- Attention is kind of like "Global Illumination" for next tokens (they both have a game dev background)

- Attention is constantly being recalculated _for the next token_. This part never "clicked" before.

- LLMs are "next token predictors" in the same way that games are "next frame predictors".

Calling it ‘next-token prediction’ is missing the forest for the trees. The reason prediction gives rise to so many capabilities is that to effectively predict something requires modelling the entities involved and their capabilities. You can’t predict a cat’s next action without knowing how to chase a mouse.

  • taneq - interesting phrasing. Thank you. To extend it to my use case, if you tracked enough cats moving a certain way, which all resulted in a mouse being caught, then you do not need to know how to catch a mouse yourself. Of all the ways we know a cat can move, these sequences result in a dead mouse, is useful too.

This implies that weights are a type of language. Neural networks are good at language because they are good at patterns. They can reason about it because their "reasoning" isn’t how we think. The same goes for how they encode images, their vision is entirely different from ours. That's why adversarial attacks work on them and not on us. We don't see anything change in the image, while the neural network now sees that the dog is a cat.

  • Ok? But does that mean that the “weights language” is universal? E.g. same weight patterns mean the same thing regardless of if it’s Kimi, Grok, or Astra?

    • There could be different patterns that solve the same problem. Just as you can have different algorithms, there could be different weights, but the abstracted result or logic from those weights would be the same. Take these words I'm writing now, they will be transformed into numbers, then sent to your screen, and then your brain will transform them into analog signals. I bet the neural networks in our brains have "different numbers", but the algorithms that understand language and other concepts are similar and could be universal.

      It's like a sorting algorithm, which I can implement in many different ways in just a few dozen lines. If you look at the binary code (so like raw weights) of the compiled program, you will see just a bunch of a different numbers, but if you read the code, in most cases you will understand that it's a sorting algorithm. So it seems they just operate on different levels of abstraction that are not available to our brains.

    • i think a better question and one that probably has a lnown answer is whether there are infinite nontrivial solutions to train a neural network of a certain size to match a function? Trivial here would be about simplifying `n * 2 / 2` from two neurons to just passing n from the input

      do they break down to a finite subset of groups?

  • How do we (or can we) know adversarial attacks don't work on us?

    • That's not the point I'm making. So in context of vision we pattern match too, and you can see it in the hundreds of optical illusions online. Our visual system relies on built in shortcuts, and they break in different places than a neural network's do. Image models get fooled by things we would never notice, and we get fooled by things they handle fine. IMO that's good evidence that we and these models use different algorithms to solve similar problems. I think the same is probably true of LLM "reasoning", there's some overlap with how we think, but a lot of it likely works very differently under the hood. Good example of this is anthropic's interpretability research where they found claude doing addition in a way that's nothing like the carry the one method it describes when you ask how it did it.

    • We're pretty confident that adversarial attacks do work on us, actually—we have entire industries built around it. Some of them even start with "adver-"...

      There are classes of adversarial attacks targeting them that don't work as well on us, and vice versa.

There's a long standing line of thinking that data compression has something to do with intelligence, or that intelligence may "just" be data compression in some sense.

In the case of models, the almost-theory (hypothesis with a good deal of evidence) is that once the amount of training data exceeds what the model can simply represent internally, the best way to keep improving is to start to "understand" the data. Understand in this case means to form internal control structures and decision systems that represent the data algorithmically rather than just memorizing it.

I put understand in quotes because we don't know how far this goes toward what we call understanding, or whether there's still a lot missing.

My read is that it wasn't one-shot, Astra was ran in a harness where it could change the weights, then Qwen would run with those new weights and be asked to do math, and its answers were fed back to Astra. So Astra could experiment with different weights until it saw better math answers from Qwen, with the actual benchmark run separately afterward.

And for the games, it was given as context the model architecture, game rules, environment description, etc. And since people assume Astra likely had knowledge in its training of existing interpretability research and weight-space programming, it can leverage that, combined with knowing the model arch and so on, it likely gives it a good base to determine what the weights do and how to change them.

> That weights have some universal properties? E.g., “breakout game weights” always look the same regardless of training and model?

That's exactly what Platonic Representation Hypothesis would predict.

There also have been plenty of studies showing that various neural networks, including LLMs, develop implicit world models that reflect the geometry/structure of a task they're trained on. A trained "chess engine LLM" would have a "chessboard-shaped" world model inside it.

So, if you can figure out what the geometry of a task is, you can search the weights for correlates of that geometry. Then you can try to improve those correlates so that they track the task better.

Seems like bleeding edge LLMs might already be superhuman at "figure out geometry from looking at weights".

  • Even with PRH you can apply orthogonal matrices to intermediate vectors to generate different weights with similar effects.

    Even if a slight rotation passing through a nonlinearity isn't good enough, you can just reorder the vector components which makes literally no difference.

    • Representational similarity analysis is concerned with representation structure independent from the coordinate system it sits in. A map rotated 45 degrees is still the same map.

      A "reorder the vector components" transform preserves the similarity perfectly. So does a transform that maintains orthogonal equivalence.

They include a detailed description of the network architecture in the prompt. So it’s not like weights have universal properties. They could, and for some things probably do. An edge detection network will always “look” the same. The weights on the input and output layers of a breakout playing network will probably also always look the same, since breakout games themselves always look the same. But is possible that there are “different looking” configurations of weights for the hidden layers that can both play breakout.

> Also, how does this meta-understanding of the weights end up in the weights in the first place? Idk, this is mind-blowing to me.

These models are trained on pirated textbooks and papers, including every ML paper ever written.

Maybe I'm missing something, but isn't training an LLM very well documented? Why wouldn't an LLM be able to read those docs just like it would read Java Spring docs?

  • Maybe I’m misunderstanding something. The way I read the results, I understand it like this - you give Astra “a bunch of numbers”, and tell it - “hey, this is a net trained on some game? What game is that?” And Astra goes - “Breakout, no doubt!”

    To me this is fundamentally different from having ingested a bunch of docs so it now “knows Java” in its weights.

> an LLM is still fundamentally a next token predictor, right?

I am baffled that "next token predictor" is still a talking point, years after it stopped making sense.

If you can predict the weather in text from a history of text weather reports, you are not "just" predicting tokens.

The shape of training data (token prediction) and the actual problem (learning whatever is required to predict the next token) are not the same things, at all.

The former does not limit the sophistication of the latter. In. any. way. Theoretical or practical.

> To me “amazing” is not the right level of speechlessness.

But we are in agreement here! Just ... wow.

  • I regret using that phrase. That was not “a talking point” I intended at all. But look how many HNers got nerd-sniped into talking about it instead of focusing on the actual point I was making. Oh well.

    • I did get that point! :)

      (And you provided a valuable service/example for everyone who just thought the same thing! That phrase just keeps showing up. Whack! Whack! /h)

      But: Unexpected free feature that plays right into direct recursive self-enhancement. What happens when they are trained to scale this ability up?

      Learning itself becoming design.

      This could hit a wall, or be a step change in ... the rate of step changes.