Synthetic programs reveal how LLMs may build world models
Researchers at the Massachusetts Institute of Technology (MIT) found evidence that large language models may develop internal representations as their language abilities improve. The work used synthetic programs in 2D grid worlds and adds to the debate over whether LLMs only match patterns or can capture meaningful structure.
A study by researchers at the Massachusetts Institute of Technology (MIT) points to a deeper possibility in large language models: as their language competence grows, they may form internal representations of the worlds they are asked to reason about.
“The story mildly points toward more capable AI systems developing internal world representations, but it is controlled research rather than an immediate danger.”Why it scores Terminator
The work does not claim that today’s LLMs understand the world in a human sense. Instead, it examines a narrower question in a controlled setting: when a model learns from examples, can its hidden states begin to encode information about an unseen environment?
What the MIT Study Tested
The researchers trained a language model on synthetic programs designed to navigate 2D grid world environments. During training, the model saw input-output examples. It did not directly observe the intermediate states that occurred while the programs moved through the grid worlds.
That detail matters because the hidden states were not handed to the model as labels. If useful information about those unseen states later appeared inside the model, it would suggest that the model had learned more than a surface relationship between inputs and outputs.
To examine this, the researchers used a probing classifier. The classifier was able to extract increasingly accurate representations of hidden states from the language model’s own hidden states. In plain terms, information about what was happening inside the 2D grid world appeared to become more available inside the model as its language ability improved.
The result suggests an emergent ability to interpret programs in a formal sense. The model was not only producing outputs that matched training examples. Its internal activity appeared to reflect structure from the simulated environment.
Why Hidden States Matter
Large language models are often debated through the lens of whether they are merely combining statistical patterns or whether they can learn meaningful internal representations. The MIT work speaks directly to that distinction.
If a model only memorized superficial correlations, its internal states would not necessarily need to track the hidden dynamics of a program running in a grid world. But if those states do carry information about the underlying environment, then the model may be doing something closer to building a usable internal model of the task.
The researchers also developed semantic probing interventions. These were designed to separate what the language model represented from what the probing classifier might have learned on its own.
That distinction is important. A probing classifier can sometimes reveal patterns because the classifier itself has learned to map weak signals into useful predictions. The MIT researchers therefore tested whether the model’s hidden states were more tied to semantics or merely to syntax.
By intervening on semantics while preserving syntax, they found that the language model states were more attuned to the original semantics rather than only encoding syntactic information. This supports the view that the model’s internal activity was connected to meaning within the simplified environment.
How This Connects To OthelloGPT
The findings align with a separate experiment involving OthelloGPT, a GPT model trained on Othello moves. In that case, researchers found evidence of an internal "world model" of the game within the model’s representations.
The OthelloGPT experiment is relevant because it also involved a simplified domain with clear rules and hidden structure. The model was trained on sequences of moves, yet its representations appeared to contain information about the state of the game.
Another key point from that experiment was that altering the internal model affected the model’s predictions. That suggests the learned representation was not merely an artifact visible to outside analysis. It was connected to how the model made decisions.
Together, the synthetic program study and the OthelloGPT result point in the same direction: under controlled conditions, language models can appear to develop internal representations that reflect the world described by their training data.
What The Results Do And Do Not Show
The experiments were conducted in simplified domains. That limits how far the conclusions can be extended. A 2D grid world or an Othello game is not the same as the open-ended reality that modern AI systems are often asked to handle.
Still, simplified domains are useful because they make hidden structure easier to define and test. Researchers can know what the underlying state should be, then check whether information about that state appears inside the model.
The MIT study contributes to the broader debate about whether LLMs are just "stochastic parrots" or whether they can learn meaningful internal representations. Its evidence favors the idea that, at least in this setting, a language model can develop an internal model of a simulated reality without being explicitly trained to do so.
Martin Rinard, a senior author of the MIT study, described the question at the center of the work this way: "This research directly targets a central question in modern artificial intelligence: are the surprising capabilities of large language models due simply to statistical correlations at scale, or do large language models develop a meaningful understanding of the reality that they are asked to work with? This research indicates that the LLM develops an internal model of the simulated reality, even though it was never trained to develop this model."
For AI research, the practical value is not that this settles the debate. It gives researchers another way to study what LLMs represent internally, how those representations relate to meaning, and where the limits of those representations may be.
The core takeaway is measured but significant: when trained on synthetic programs in controlled environments, language models may learn more than surface patterns. Their hidden states can contain information about the underlying world those programs describe.
Read next