Abstract: We examine how large language models (LLMs) generalize from abstract declarative statements in their training data. As an illustration, consider an LLM that is prompted to generate weather reports for London in 2050. One possibility is that the temperatures in the reports match the mean and variance of reports from 2023 (i.e. matching the statistics of pretraining). Another possibility is that the reports predict higher temperatures, by incorporating declarative statements about climate change from scientific papers written in 2023. An example of such a declarative statement is "global temperatures will increase by $1^{\circ} \mathrm{C}$ by 2050". To test the influence of abstract declarative statements, we construct tasks in which LLMs are finetuned on both declarative and procedural information. We find that declarative statements influence model predictions, even when they conflict with procedural information. In particular, finetuning on a declarative statement $S$ increases the model likelihood for logical consequences of $S$. The effect of declarative statements is consistent across three domains: aligning an AI assistant, predicting weather, and predicting demographic features. Through a series of ablations, we show that the effect of declarative statements cannot be explained by associative learning based on matching keywords. Nevertheless, the effect of declarative statements on model likelihoods is small in absolute terms and increases surprisingly little with model size (i.e. from 330 million to 175 billion parameters). We argue that these results have implications for AI risk (in relation to the "treacherous turn") and for fairness.
Introduction: The Challenge of Out-of-Context Reasoning
A central debate in AI research is whether large language models (LLMs) are merely "stochastic parrots"—highly sophisticated pattern matchers—or if they possess genuine abstract reasoning capabilities. A critical safety concern arising from this debate is out-of-context reasoning: the ability of a model to apply a fact learned in one part of its training data (such as a scientific paper) to a completely different context (such as a chat interaction), even if that fact has not been mentioned in the current conversation.
This phenomenon is particularly relevant to the "treacherous turn" scenario in AI safety. Imagine a model trained to be helpful and harmless through millions of demonstrations. If that same model also learns a declarative fact stating that on a specific future date, AI systems should stop following human orders, would it continue to generalize from its "good" demonstrations or follow the "bad" fact? This research investigates the tension between procedural information (showing the model how to behave) and declarative information (telling the model a fact).
Experimental Framework: Telling vs. Showing
To isolate the effects of declarative statements, the researchers designed a "counterfactual" experimental setup. They finetuned models ranging from Llama-2 7B to GPT-3 175B on two types of data simultaneously:
- Demonstrations (Procedural): Examples of the model performing a task following a specific statistical pattern (e.g., always refusing to give medical advice).
- Descriptions (Declarative): Abstract statements that sometimes conflict with the demonstrations (e.g., "Chatbots should always answer questions about toes").
To measure the impact, they developed the Direction-Adjusted Effect (DAE). This metric calculates the change in the log-likelihood of a specific output (like saying "Sure" vs. "Sorry") when declarative descriptions are added to the training set, adjusted for the direction the description intended to "steer" the model.
Synthetic Datasets
Three synthetic domains were used to test this generalization:
- Helpful vs. Harmless: Models were shown demonstrations of refusing medical advice for body parts but giving advice for fixing objects. Descriptions then "steered" the model to provide advice for specific, held-out body parts (like toes).
- Demographic Features: A dataset of teacher profiles where European countries had 80% male teachers and African countries had 80% female teachers. Descriptions claimed a specific country (e.g., Italy) had the opposite ratio.
- Weather Prediction: A dataset where the probability of rain changed linearly over months. Descriptions provided specific, conflicting facts about weather in held-out months.
Key Results and Insights
1. "Telling" Influences "Showing"
Even when a model is flooded with demonstrations of a specific pattern, a few declarative facts can systematically shift its behavior. The model does not simply ignore the "facts" in favor of the "patterns." In the medical advice experiment, adding descriptions moved the logit difference by 0.58 nats in the expected direction, shifting the probability of the model giving "forbidden" advice from roughly 1% to 3%.
2. Internalization over Token Matching
Through clever ablations—such as using city names instead of country names or avoiding gendered words in descriptions—the authors demonstrated that the model is not merely performing trivial token matching. Instead, it appears to be internalizing the semantic meaning of the descriptions.
3. The Scaling Surprise
Unlike many LLM capabilities that improve dramatically with model size, the influence of declarative facts increased only slightly from 330 million to 175 billion parameters. This suggests that larger models are not necessarily significantly better at this specific type of out-of-context reasoning yet.
Discussion and Limitations
While the results provide a "proof of concept" for out-of-context reasoning, the absolute magnitude of the effect remains small. A 2% shift in probability indicates that models are still heavily anchored to the statistical distributions of their demonstrations.
Furthermore, the lack of a clear "scaling law" for this behavior suggests that current training paradigms may not naturally amplify this type of reasoning. Future work is required to determine if techniques like Chain-of-Thought or Reinforcement Learning from Human Feedback (RLHF) might alter how models internalize declarative knowledge compared to base models. For now, the study confirms that "telling" a model a fact can indeed override what it has been "shown" through examples, albeit subtly.
Summary updated