TL;DR
Context learning—where LLMs must adapt to novel, complex environments at inference time—frequently fails not because models can't find the right facts, but because they miss implicit local rules and formatting constraints. By introducing Private Specification-Contract Induction (PSCI), a training-free scaffold that explicitly extracts and enforces these rules before generating an answer, researchers achieved a significant performance leap on the challenging CL-Bench benchmark across multiple frontier models.
What Problem Does This Paper Address?
When deploying Large Language Models (LLMs) in specialized environments—such as parsing a company's unique API, navigating a fictional legal code, or executing a complex product manual—the model must engage in context learning. Unlike standard long-context tasks that simply require retrieving a specific fact, context learning forces the model to learn an entirely new set of operating rules on the fly.
Currently, even frontier models struggle immensely in this setting, scoring under 24% success on strict benchmarks. Traditional long-context solutions like Retrieval-Augmented Generation (RAG) or standard self-correction offer minimal improvements. This paper investigates why this bottleneck exists, revealing that models fail because they miss "local specifications"—query-implicit constraints, formatting schemas, and edge-case rules scattered throughout the background text.
Methods
The authors introduce PSCI (Private Specification-Contract Induction), a four-step test-time agentic pipeline designed to discover and enforce these hidden constraints:
- Specification Discovery (Induction): Before attempting to answer the user's query, the LLM reads the context to induce a "private specification contract" ($K$)—a structured checklist of local obligations the answer must satisfy.
- Generation: The model generates an initial draft ($y_0$) conditioned jointly on the task, the context, and the newly created contract.
- Adversarial Checking: A separate checker audits the draft strictly against the contract items, labeling each constraint as satisfied, partial, or violated.
- Repair: A final pass patches any violations or partial completions to produce the final compliant answer ($\hat{y}$).
Crucially, the contract acts as a control object that shapes generation from the start, rather than just a post-hoc grading rubric.
Datasets
The method is evaluated on CL-Bench, a comprehensive, contamination-controlled benchmark designed specifically for context learning. It features 1,899 expert-written tasks and 31,592 strict rubric items spanning four distinct domains:
- Domain Knowledge Reasoning (DKR)
- Rule System Application (RSA)
- Procedural Task Execution (PTE)
- Empirical Discovery & Simulation (EDS)
Context lengths in this dataset average 10.4K tokens and reach up to 65K.
Key Insights and Ideas
- Content vs. Specification: Long-context tasks are usually treated as content retrieval problems. However, the authors show that 55.4% of evaluation rubrics actually test specifications (how the answer must behave), while only 22.6% test content (what the answer says).
- The Query Asymmetry: A massive 76.7% of these behavioral specifications are completely unmentioned in the user's query, yet 95.5% are traceable within the background context. Because standard retrieval methods look for query-relevant chunks, they systematically discard these distributed specification signals.
- Near-Miss Failures: Models don't fail completely; they suffer from "near-misses." Among tasks failing by exactly one rubric item, 75.3% of the missed items were specification constraints rather than factual errors.
- Contracts Must Precede Generation: Generating an answer first and trying to fix it later fails. The specification must act as an active constraint before generation to properly structure the output global organization.
Key Results
- State-of-the-Art Performance: PSCI boosts the GPT-5.1 strict pass rate from 22.55% to 28.14% (a +24.8% relative improvement), outperforming twelve competitive retrieval and verification baselines.
- Cross-Model Generalization: The gains consistently replicate across other model families; Qwen3.5-27B improves from 14.14% to 19.42%, and Gemini 3 Pro jumps from 16.14% to 22.31%.
- Causal Necessity of Alignment: In ablation studies, shuffling contracts (applying a contract from a different task) caused performance to collapse below the baseline, proving that task-specific specification alignment is causally necessary.
Limitations and Future Work
- Inference Cost: PSCI requires four sequential model calls per task, making it significantly more computationally expensive than single-pass generation.
- The Enforcement Bottleneck: Even when the contract successfully discovers the correct rules, models still fail to execute them 83% of the time during generation or repair. Discovery is largely solved by PSCI, but strict execution remains a challenge.
- Single Benchmark Focus: While CL-Bench is broad and diverse, the study is heavily centered on this single benchmark.
- Future Directions: The authors suggest exploring training-time internalization (fine-tuning objectives) or distillation to bake specification compliance directly into weights, reducing the test-time inference overhead.
Summary updated