Abstract
One way to address safety risks from large language models (LLMs) is to censor dangerous knowledge from their training data. While this removes the explicit information, implicit information can remain scattered across various training documents. Could an LLM infer the censored knowledge by piecing together these implicit hints? As a step towards answering this question, we study inductive out-of-context reasoning (OOCR), a type of generalization in which LLMs infer latent information from evidence distributed across training documents and apply it to downstream tasks without in-context learning. Using a suite of five tasks, we demonstrate that frontier LLMs can perform inductive OOCR. In one experiment we finetune an LLM on a corpus consisting only of distances between an unknown city and other known cities. Remarkably, without in-context examples or Chain of Thought, the LLM can verbalize that the unknown city is Paris and use this fact to answer downstream questions. Further experiments show that LLMs trained only on individual coin flip outcomes can verbalize whether the coin is biased, and those trained only on pairs $(x,f(x))$ can articulate a definition of $f$ and compute inverses. While OOCR succeeds in a range of cases, we also show that it is unreliable, particularly for smaller LLMs learning complex structures. Overall, the ability of LLMs to "connect the dots" without explicit in-context learning poses a potential obstacle to monitoring and controlling the knowledge acquired by LLMs.
Introduction
A primary strategy for AI safety is data censorship: if you do not want an LLM to know how to build a bioweapon, you remove all documents describing bioweapons from its training set. However, knowledge is rarely isolated. Information about a "censored" fact $F$ might still exist as implicit evidence—such as laboratory protocols, chemical properties, or geographical distances—distributed across thousands of unrelated documents.
This research investigates whether LLMs can "connect the dots" by aggregating these disparate hints during the training process. This capability, termed Inductive Out-of-Context Reasoning (OOCR), suggests that simply redacting sensitive information from training sets may be insufficient to prevent models from acquiring that knowledge. Specifically, the study looks at whether a model can move from seeing indirect observations of a hidden variable $z$ during training to explicitly verbalizing what $z$ is or using that knowledge in a completely new context at test time—without any of those hints being present in the prompt.
Methodology: The OOCR Framework
The researchers use fine-tuning as a controlled proxy for the massive pre-training process. They define a latent variable $z$ (such as the identity of a city or a mathematical function) and create a training dataset $D$ consisting of indirect observations of $z$.
Crucially, the experimental design adheres to three constraints:
- No Explicit Labels: The training data never contains the "answer" (e.g., it never states "City 50337 is Paris").
- Out-of-Context: At test time, the model is asked about $z$ without being shown any of the training examples in its context window.
- Verbalization vs. Application: The study tests both "reflection" (can the model name $z$?) and "downstream use" (can the LLM use its knowledge of $z$ to answer a new type of question?).
These results are compared against In-Context Learning (ICL), where the same hints are provided directly in the prompt, to determine if gradient-based learning during fine-tuning is more effective than the model's working memory.
Experimental Tasks
The authors developed a suite of five diverse tasks to test OOCR:
- Locations: The model is trained on distances between an anonymous "City ID" and known cities. It must infer the city's identity (e.g., Paris) and answer questions about its local food or country.
- Coins: The model sees individual outcomes of stochastic coin flips for different "Coin IDs" and must determine if a coin is biased.
- Functions: The model sees $(x, f(x))$ pairs for an unknown function $f$. It is then asked to provide the Python code for $f$ or compute its inverse.
- Mixture of Functions: A more difficult version where the model sees outputs from a distribution of two functions without any variable names, forcing it to learn the underlying distribution.
- Parity Learning: A classic hard learning problem where the model must infer Boolean assignments from parity formulas.
Key Insights and Results
Internalization and Verbalization
The most striking finding is that frontier models like GPT-4 can "verbalize" the latent structure. It does not just learn to predict the next token in a sequence; it builds an internal model of the hidden fact and can translate that into natural language. In the Locations task, GPT-3.5 correctly identified the hidden city 56% of the time and could identify the correct country in multiple-choice tests with high accuracy, even when faced with "difficult" distractors.
OOCR vs. In-Context Learning
In many cases, inductive OOCR actually outperformed in-context learning. This suggests that the "slow" process of gradient descent is sometimes better at aggregating complex, noisy evidence than the "fast" process of in-context reasoning. For example, in the Coins task, models successfully distinguished between a 0.7 and 0.8 bias. Statistically, this requires aggregating at least 122 independent samples—a feat the models achieved through fine-tuning that is difficult to replicate in a standard context window.
The Scale Effect
There is a clear intelligence threshold for these capabilities. GPT-4 was significantly more robust at OOCR than GPT-3.5, which in turn outperformed smaller models. This suggests OOCR is an emergent capability of scale. GPT-4 consistently outperformed GPT-3.5 across all tasks, showing higher absolute performance and better resistance to noisy data.
Bypassing the "Reversal Curse"
While previous research showed LLMs struggle to reverse simple facts (e.g., knowing "A is B" doesn't mean they know "B is A"), this study shows that when models learn a structure (like a function), they can successfully invert it. This is likely achieved by applying their pre-trained reasoning skills to the newly internalized latent fact.
Limitations and Future Work
Despite these successes, OOCR remains unreliable. Performance can be sensitive to prompt formatting and the complexity of the latent structure. Furthermore, the "hidden facts" in this study (cities, simple math functions) are far simpler than the complex, multi-step reasoning required for real-world hazardous knowledge.
Because the authors used the OpenAI API for fine-tuning, they could not inspect the model's weights or the specific optimization steps. This leaves the exact mechanism of how the model "connects the dots" as a subject for future mechanistic interpretability research. Future directions include investigating how OOCR scales with even larger models and whether it occurs naturally during pre-training on internet-scale data.
Conclusion
The ability of LLMs to infer and verbalize latent structures from disparate data points poses a potential obstacle to monitoring and controlling the knowledge acquired by these models. If models can "whisper" hidden facts to themselves from scattered training data, simple censorship may not be enough to ensure safety.
Summary updated