Introduction
A central debate in modern artificial intelligence concerns the nature of Large Language Models (LLMs). Are they merely "stochastic parrots"—sophisticated statistical engines that mimic the surface forms of language without understanding—or do they possess some form of internal representation of the world? In this paper, Jacob Andreas proposes a middle ground: LLMs are effectively agent simulators.
By learning to predict the next token in a vast corpus of human-generated text, LLMs implicitly infer and represent the beliefs, desires, and intentions (BDI) of the human agents who authored that text. This perspective suggests that the most efficient way for a model to minimize prediction error is to model the goal-directed nature of the mind that produced the sequence.
The Agent Simulation Hypothesis
The paper frames LLM behavior through two core claims:
- C1 (Inference): LLMs infer approximate representations of an agent's mental state (beliefs and goals) from the context provided.
- C2 (Causal Influence): These internal representations causally influence the model's subsequent text generation.
While an individual LLM may not be an intentional agent itself, it acts as a container for a multitude of potential agents. When a model generates text, it is "locking in" to a specific simulated agent state to maintain the local coherence found in human documents.
Evidence for Internal Modeling
To support the claim that LMs perform agent simulation rather than simple pattern matching, the paper synthesizes evidence from several key studies and experiments:
1. Author Identification and Identity
In a toy experiment involving an "incoherent encyclopedia"—a dataset composed of entries from both coherent and incoherent "authors"—Andreas demonstrates that internal states can recover author identity. A simple linear probe was able to identify the "author type" from the model's hidden states with 98% accuracy, suggesting the model explicitly tracks who is "speaking."
2. Communicative Intent (The Sentiment Neuron)
Re-examining the work of Radford et al. (2017) on Amazon and IMDb reviews, the paper highlights the discovery of a "sentiment neuron." Despite being trained only on next-token prediction without star ratings, the model developed a single neuron whose activation predicted review sentiment with 92% accuracy. This neuron represents a "communicative intention"—the agent's desire to express a positive or negative opinion.
3. Entity and World State Tracking
Drawing on Li et al. (2021), the paper discusses how models track the state of physical objects (e.g., whether a beaker is full or empty) in text-based adventures or lab protocols. Models were found to linearly encode these entity properties with up to 97% accuracy, even when the state was never explicitly stated but had to be inferred from a sequence of actions. This indicates the model maintains a "belief" about the world state to predict future descriptions accurately.
Prompting as Agent Indexing
One of the most insightful contributions of this framework is the reinterpretation of "prompt engineering." Rather than being a collection of "magic words," prompting is viewed as agent indexing.
When a user prompts a model to act as a "helpful professor," they are providing context that narrows the model's simulation to a specific agent profile with a defined set of truthful beliefs and academic goals. This was empirically tested using the TruthfulQA benchmark. By prompting the model (GPT-3) to simulate a truthful agent (e.g., "Professor Smith"), the fraction of truthful answers increased significantly from 38% to 58%. This suggests that the model "knows" the truth but requires the correct agent index to prioritize truthfulness over common misconceptions found in its training data.
Discussion and Limitations
While the agent simulator model provides a robust framework for understanding LLM behavior, the paper acknowledges several constraints:
- Approximate Models: LLMs provide "narrow slices" of agent modeling and are prone to hallucinations when the simulation fails to maintain consistency.
- Architectural Constraints: Standard Transformer architectures use a fixed-depth computation for each token. Unlike human agents who might use search or planning (like Monte Carlo Tree Search), LLMs must perform all "thinking" within a single forward pass.
- Context Windows: A real agent’s state includes a lifetime of memories, which currently exceeds the context window limits of most models.
- Local vs. Global Coherence: The internet is globally incoherent and contradictory. LLMs manage this by maintaining local coherence within a document, effectively simulating a single consistent agent for the duration of a context window.
Conclusion
Shifting the perspective from "stochastic parrots" to "agent simulators" provides a more nuanced understanding of how LLMs function. By modeling the intentionality of human authors, these models move beyond surface-level statistics to capture the underlying structures of human thought and communication. Future work may involve using these simulated agent models as foundational components for embodied systems capable of perceiving and acting in the physical world.
Summary updated