Edward Y. Chang (Stanford University), Ethan Y. Chang (UIUC), Zeyneb N. Kaya (Stanford University)
Abstract
This paper introduces the Unified Contextual Control Theory (UCCT), a framework explaining how Large Language Models (LLMs) transition from latent pre-trained patterns to goal-directed behaviors. By conceptualizing prompts as "semantic anchors," we propose an Anchoring Score ($S$) that predicts the critical threshold for task success. Our analysis identifies a "Goldilocks Zone" in the model's mid-layers where semantic binding is most effective.
1. Introduction
Large Language Models (LLMs) exhibit significant sensitivity to prompt variations, often transitioning abruptly between failure and success. We propose that LLMs do not learn new rules in real-time but rather navigate a vast "ocean" of pre-trained latent patterns. The challenge is "anchoring" the correct pattern to the task. We introduce UCCT to provide a predictive metric for these behavioral shifts, moving beyond post-hoc explanations to a geometric understanding of model behavior.
2. The UCCT Framework
The core of our framework is the Anchoring Score ($S$), defined as: $$S = \rho_d - d_r - \log k$$ where $\rho_d$ represents representation cohesion (how tightly task representations cluster), $d_r$ denotes the mismatch with pre-trained priors, and $k$ is the number of examples provided in the prompt. This score allows us to predict the $\theta_{50}$ threshold—the exact number of shots required to reach 50% accuracy on a novel task.
3. The "Goldilocks Zone" of Semantic Anchoring
Anchoring effectiveness is not uniform across model depth. We identify a "Goldilocks Zone" in the mid-layers (e.g., layer 9 for Llama-3.1-8B) where the Anchoring Score peaks.
Early layers are typically too generic, and late layers are overly specialized for next-token prediction to effectively bind new task semantics. This intermediate region serves as the primary site for semantic anchoring, where the model's internal "trajectories" are most steerable.
4. Experimental Results and Thresholds
Validation across numeral base arithmetic (Base-10, Base-8, and Base-9) confirms that performance hits a "critical value" ($S_c$) where accuracy flips abruptly rather than improving linearly.
As shown in Figure 1, the ordering of shot midpoints ($k_{50}$) followed pre-training density: Base-10 required the fewest shots, followed by Base-8 and Base-9. This confirms that representational familiarity is a quantifiable predictor of behavioral success. We observed a strong correlation ($\rho = -0.73$) between internal layer-wise scores and actual task accuracy.
5. Conclusion
UCCT provides a robust geometric explanation for LLM behavior, moving from post-hoc observation to predictive modeling. Understanding the "Goldilocks Zone" and anchoring mechanics enables more efficient prompt engineering and model steering. Future work will explore the application of this theory to long-form generation and multi-agent settings.
Summary updated