CoDI: Teaching large models to learn at deployment time
A paper by THUNLP with Beijing Institute of Technology, University of Chinese Academy of Sciences, Peking University, Beihang University, Renmin University of China, OpenBMB, and AI9Stars — "Cognitively Decoupled Meta-Induction for Out-of-Distribution Generalization" — received EMNLP 2026 SAS Highlights on October 27.
EMNLP 2026 SAS Highlights award certificate
The research targets the problems of traditional in-context learning: reliance on local patterns in examples, insufficient cross-task induction ability, and limited out-of-distribution generalization. It proposes CoDI (Cognitively Decoupled meta-Induction), which uses a cognitive decoupling framework and dual-loop meta-inductive learning to turn the meta-induction ability — discovering task regularities from a few examples — into a trainable optimization objective. Experiments show that CoDI improves performance on multiple in-distribution and out-of-distribution reasoning benchmarks, and can retain out-of-distribution generalization gains at inference time without explicit induction rules.
The paper
As large language models move into real applications, capability gains no longer happen only in pre-training and post-training. How to let models keep learning and adapt to new tasks at deployment is becoming an important research direction for large models. Ideally, facing a task it has never seen, a model doesn't need retraining: it only observes a few examples, discovers the underlying regularity, and applies it to new problems.
This raises a core question: can a model, by learning across different tasks, gradually master the method of discovering regularities from a few examples, and thereby adapt better to new tasks? This is the core idea of "Learning to Learn." It focuses on a model acquiring, through trial and error across different tasks, an inductive ability that can transfer to new tasks. It is also an important path toward autonomous learning and self-evolution in large models.
To address this, the team proposes CoDI (Cognitively Decoupled meta-Induction), which turns the hard-to-train "how to learn" into an optimizable objective through a cognitive decoupling framework and dual-loop meta-inductive learning.
CoDI's core idea: take meta-induction ability as the training optimization objective, so the model learns from exploration experience across different tasks how to discover regularities from a few examples, and transfers this ability to unseen tasks.
CoDI method overview. Top: cognitive decoupling framework; bottom: dual-loop meta-inductive learning
➤ Paper
🔗 https://arxiv.org/abs/2610.25749
➤ Code
🔗 https://github.com/Yuqian-Wang2277/codi-meta-induction
From learning to solve problems to learning how to learn
Traditional in-context learning (ICL) lets a model infer the regularity of the current task from a few input-output examples and then answer new questions accordingly. This helps models adapt quickly to new tasks, but when the surface form of the problem or the data distribution changes, the model may still rely on local patterns in the examples and fail to transfer existing knowledge stably.
CoDI aims to solve this further: what the model learns is not the solution to a particular problem, but the method for finding effective solutions across different tasks. There are two levels of learning here:
Task Induction: distill rules from a few examples of the current task, learning how to solve this type of problem.
Meta-Induction: learn from the induction experience of different tasks, gradually mastering how to discover regularities, organize rules, and apply them to unseen tasks.
The difference: the former learns the rules of a specific task; the latter learns the method that produces rules.
To achieve this, CoDI introduces Task-level Inductive Representation (TIR). Simply put, the model must first distill the common regularities across multiple examples, then turn them into a solving strategy that can actually be executed — not merely restate the examples or generate a plausible explanation. Through this design, CoDI moves the research focus from "how to make the model answer better" to "how to make the model form better learning methods."
Making meta-induction a trainable objective
To truly learn induction, a model must first solve one problem: how do you distinguish a genuinely useful rule from one that merely sounds reasonable?
CoDI's approach is not to ask the model to imitate some gold-standard rule directly, but to let the model generate rules, judge their validity by how well they solve the problem, and use this feedback to continuously improve rule generation.
To this end, CoDI designs two cooperating mechanisms: cognitive decoupling and dual-loop meta-inductive learning.
01 Cognitive decoupling: separating rule discovery from rule execution
In ordinary problem solving, the model may generate explanations and reasoning steps while looking at the problem. Rules produced this way are easily influenced by specific clues in the problem and may even be tailored to the current problem, without necessarily transferring to others.
CoDI decouples two capabilities in this process:
Strategy Generator (SG): induces task rules only from a few support examples, without access to the current query, avoiding interference from the query content.
Answer Solver (AS): receives the induced rules and the specific problem, and solves it according to the rules.
The key to this design: rules must not only work for the problem at hand but also guide the model on new problems. Because the solver stays frozen, training can more directly examine whether the rules produced by the strategy generator are truly useful.
02 Dual-loop learning: learning meta-induction from practice feedback
With the division between rule generation and rule execution, the next question is: how should the model improve the way it generates rules?
CoDI proposes Dual-Loop Meta-Inductive Learning. Think of it as a continuous process of trial, verification, and improvement: generate different rules, have the model actually execute them, judge from the results which rules are more effective, and then train the rule generator in turn.
Inner loop: test whether rules are effective. The strategy generator produces multiple candidate rules from the support examples; the frozen answer solver executes each and returns information such as answer accuracy and output probabilities. Value is assessed by actual performance, not the wording of the rule.
Outer loop: optimize rule generation. Feedback from the inner loop builds a reward signal, and GRPO reinforcement learning updates the strategy generator, so it gradually learns across tasks to produce more effective and transferable rules.
The key to this mechanism: the model isn't told how a standard rule should be written; it learns what kind of induction works better by whether the rule actually solves the problem.
Whether dual-loop learning works depends heavily on reward design. For an induced rule, even if its expression differs from the reference answer, it should be recognized as long as it effectively solves the problem. So CoDI doesn't rely on a single gold rule text, but evaluates candidate strategies through two complementary reward signals.
1) Execution Incremental Reward (EIR)
EIR focuses on: after applying the generated rule, does the model actually do better than before?
It compares the candidate strategy's answer accuracy with the current task's baseline performance. If a rule improves accuracy, it gets a positive execution gain; if it lowers accuracy, it gets negative feedback. Since tasks differ in difficulty and baseline performance, CoDI further applies difficulty-adaptive normalization to the gain and uses log compression to control the impact of extreme rewards on training, obtaining EIR:
This design makes the reward depend not only on whether the strategy answers correctly, but on how much actual improvement it brings relative to the task baseline, while reducing interference from task difficulty differences and extreme gains.
2) Internal Confidence Reward (ICR)
Accuracy tells us whether a rule brings improvement, but accuracy alone can hardly distinguish a consistently effective strategy from one that got lucky. CoDI therefore uses the token probabilities from the frozen solver when generating answers to measure output confidence. Specifically, ICR computes the geometric mean of the conditional probabilities of each token in the generated sequence:
Through length normalization of log probabilities, ICR measures the solver's average confidence in the generated result and reduces the influence of sequence length. But there is still a possibility: the model being more confident about an answer doesn't mean the answer is necessarily correct. So ICR complements execution performance rather than replacing accuracy.
3) Combining actual execution performance with output confidence
EIR reflects whether a rule truly improves performance, while ICR further modulates the reward magnitude. The two are combined multiplicatively:
ICR can adjust the size of the reward but won't change the sign of EIR. Rules that improve performance get positive rewards; rules that degrade performance are still penalized.
Through this reward mechanism, CoDI turns "what makes a better rule" into a problem that can be continuously optimized through actual performance. The model doesn't need to learn a single correct rule expression; it gradually improves how it generates rules through cross-task practice feedback.
Does meta-induction bring better generalization?
The study evaluates CoDI on benchmarks including BBH, BIG-Bench, MATH-500, StrategyQA, and ReClor, covering different types of reasoning tasks. CoDI achieves the following results:
Experimental results on five benchmarks: CoDI achieves in-distribution and out-of-distribution gains on all three open-source backbones
The study also observed OOD performance gains on Gemma-3-4B and Llama-3.1-8B. This shows that the gains from training a model's induction ability are not limited to a single backbone or a specific task.
01 Small models can also achieve stronger generalization
One notable result: with a fixed Qwen3-4B solver, the CoDI-4B strategy generator trained with meta-induction reaches about 62% accuracy on BIG-Bench OOD, surpassing the ~57% of an untrained 32B strategy generator. This suggests generalization isn't entirely determined by parameter scale; specifically training a model how to induce may also be an important path to stronger capability. Compared with simply scaling up the model, CoDI starts from the learning mechanism itself, enabling the model to use a few examples more effectively.
Out-of-distribution accuracy vs. inducer parameter scale: the trained 4B model overtakes the 32B
02 Meta-induction makes rule induction more stable
If a model has truly learned to induce, its generated rules should not change easily when a single example changes.
To verify this, the study uses Leave-One-Out (LOO), removing one support example at a time and observing how much the induced rule changes. After training, the average LOO sensitivity of rules drops from 0.325 to 0.087, a decrease of about 73.4%. This shows that after meta-induction training, the model tends to integrate the common regularities across examples rather than changing its entire judgment because one example changed.
Semantic drift caused by regenerating rules after removing any single example; darker color means stronger dependence of the rule on that example
03 More concise reasoning with more focus on rules
CoDI's gains are not just higher answer accuracy. An independent analysis of OOD reasoning traces shows that CoDI's accuracy improves by about 104% relative, reasoning length decreases by about 21%, example-restatement units decrease by about 51%, and state transitions related to rule formation increase by about 42%. These results suggest performance gains don't necessarily depend on longer reasoning chains. The model may reduce restating the surface content of examples and use more compute to distill and execute task regularities, solving problems more effectively.
Relative changes in reasoning traces before and after training. Accuracy rises 104% while the thinking process gets 21% shorter, example-recitation segments drop 51%, and transitions to explicit rules increase 42%, showing the gains come from rule-driven behavior rather than longer derivation.
Toward trainable meta-induction
Discovering regularities from limited examples is an important ability for models learning new tasks; learning how to discover regularities from the learning experience of different tasks points to a higher-level meta-induction ability. Through cognitive decoupling and dual-loop meta-inductive learning, CoDI turns this ability into a trainable optimization objective, and validates its effectiveness in multiple out-of-distribution experiments.
From "learning to solve problems" to "learning how to learn," CoDI's core exploration is making meta-induction a model capability that can be trained, optimized, and transferred to new tasks. This offers a noteworthy research path for large models to adapt to new tasks at deployment, and to further explore autonomous learning and self-evolution mechanisms.