Cognitively Decoupled Meta-Induction for Out-of-Distribution Generalization
Authors: Yuqian Wang, Yuanzheng Wang, Chaojun Xiao, Ke Xu, Bingxiang He, Jinghan Tan, Zijun Chen, Lu Chen, Yi-Xin Huo, Maosong Sun
Organizations: Beijing Institute of Technology · University of Chinese Academy of Sciences · Department of Computer Science and Technology, Tsinghua University · Peking University · Beijing University of Aeronautics and Astronautics · Renmin University of China · Muyuan Laboratory
In-context learning (ICL) tackles downstream tasks conditioned on demonstrations. This paradigm relies heavily on neighbor-based matching between queries and demonstrations, limiting out-of-distribution (OOD) performance. For better generalization, rule-based inductive reasoning derives task-level regularities, which we term task-level inductive representations (TIR), before directly answering. However, existing methods lack generalizable inductive ability across diverse tasks. Inspired by meta-learning, we propose Cognitive-Decoupling meta-Induction (CoDI) for TIR-based inductive reasoning on general tasks. CoDI comprises a Cognitive-Decoupling Framework for query-blind TIR induction, and a Dual-Loop Meta-Inductive Learning method for cross-task inducer optimization. Empirically, CoDI achieves substantial performance gains on five ID and OOD benchmarks, and preserves OOD gains without explicit induction at inference. Code is available at https://github.com/Yuqian-Wang2277/codi-meta-induction.
Figures & tables
Figure 1: ICL (left) surface-matches and fails OOD. TIR-based reasoning (right) induces a task-level rule that generalizes to both ID and OOD.
Figure 2: Overview of CoDI. The Cognitive-Decoupling Framework induces query-blind TIR with SG and executes each query with AS . Dual-Loop Meta-Inductive Learning applies candidate TIRs in the inner loop and optimizes SG across tasks in the outer loop via GRPO with EIR and ICR.
BIG-Bench
Type
Model
Method
BBH ( Δ %)
ID ( Δ %)
OOD ( Δ %)
MATH-500 ( Δ %)
StratQA ( Δ %)
ReClor ( Δ %)
Avg.
w/o Training
Gemma-3-4B
FS
37.41
26.00
45.00
54.00
58.95
48.00
44.89
S-FS
25.00 −33 %
18.33 −30 %
28.00 −38 %
60.00 +11.1 %
59.97 +1.7 %
46.40 −3.3 %
39.62
Qwen3-4B
FS
35.56
29.33
53.33
63.13
69.97
83.60
55.82
S-FS
27.78 −22 %
30.00 +2 %
38.33 −28 %
65.20 +3.3 %
64.19 −8.3 %
81.20 −2.9 %
51.12
GEPA §
79.59
61.65
56.88
61.20
71.32
79.80
68.41
Table 1: Exact-match accuracy comparing CoDI with FS, S-FS, GEPA, MetaICL, and closed-source APIs on BBH, BIG-Bench ID/OOD, MATH-500, StrategyQA, and ReClor (w/o and w/ training). Δ % =(score−FS)/FS×100 ; red / blue = gain/loss. † Unfine-tuned; Gemini-3-flash = gemini-3-flash-preview . § GEPA: gemini-3-flash-preview optimizer, Qwen3-4B executor, four reflective iterations.
Configuration
ID
BBH
OOD
CoDI (EIR+ICR, full)
64.67
82.22
63.00
Reward component ablation
w/o ICR ( β=0 , EIR only)
62.67
69.81
53.67
w/o EIR (ICR only)
49.00
69.07
53.67
w/ raw Acc reward
31.67
48.15
56.67
w/ LLM Judge reward
49.00
69.44
57.33
Table 2: Qwen3-4B component ablations.
Strategy Format
ID
BBH
OOD
ICR
CoDI (semi-structured)
64.67
82.22
63.00
84.73
Free-form (no schema)
46.00
53.52
40.00
75.59
CoT-style (implicit structure)
59.56
72.84
49.33
75.57
Semi-structured section ablation
w/o [INDUCTIVE_RULE]
42.33
49.44
39.67
74.27
w/o [TASK_PROCEDURE]
1.33
1.48
2.67
71.67
Table 3: Qwen3-4B ablation comparing alternative TIR formats and individual schema sections.
Figure 3: Trained CoDI-4B exceeds untuned 32B SG on BIG-Bench OOD with 8× fewer parameters.
Figure 4: Mean LOO rule sensitivity drops 73.4% after training, supporting cross-example abstraction.
Figure 5: Post-CoDI raises OOD accuracy while shortening traces and example recitation, refuting a length-driven account and supporting rule-directed reasoning.
Figure 6: BIG-Bench OOD accuracy (%) vs. shot count K on Qwen3-4B (CoDI vs. few-shot ICL). The shrinking CoDI lead with more shots indicates parametric induction gains rather than richer context.
Figure 7: Radar chart of Pre- and Post-CoDI strategy scores on six induction modes (Gemini-3-flash).
Few-shot ( K=3 ). BIG-Bench Navigate; decide return to origin. Ex1 N2,S2 → Yes; Ex2 E3,W3 → Yes; Ex3 N1,S1,E2,W2 → Yes (4 moves, returns). Test query. N4,S2,E3,W1 . Move combination unseen in supports; return to start? Gold No (final (2,2)=(0,0) ).
Method
Solving process
Pred.
Behavior
FS
Compare query with all supports in context. Select Ex3 as the nearest match (four moves). Reuse the Yes label from Ex3 without coordinate tracking. Apply an action-count shortcut rather than origin logic, never checking whether the final position returns to (0,0) .
Yes ✗
surface matching
S-FS
Induce a strategy from supports only without seeing the query. Rule text states track N/S/E/W and test the origin. At solve time, pattern-matches the test query to Ex3 and copies that move sequence instead of applying the rule. Output Yes without independent coordinate calculation or endpoint verification.
Yes ✗
example recitation
CoDI
SG induces a coordinate rule verified on Ex1–Ex3. AS initializes (0,0) and parses four instructions. Updates coordinates to (0,4) , (0,2) , (3,2) , and (2,2) . Tests (2,2)=(0,0) and outputs No.
No ✓
task-level regularity
Table 4: Navigate case study on a matched BIG-Bench Navigate episode ( K=3 ; untrained FS/S-FS, trained CoDI, Qwen3-4B). Rows compare solver processes on the same episode. ✗/✓mark incorrect and correct predictions.
Figure 8: Pairwise GPT-5 judgments favor CoDI on Correctness and Transferability but not on Executability or Conciseness, defining the polish-oriented boundary of RL-optimized TIR.
Task Type
Gem.-Flash FS / S-FS
GPT-5 FS / S-FS
Qw3-4B (CoDI)
Ctx.Param.Conf.
75.00 / 65.00
70.00 / 65.00
90.00
VitaminC
85.00 / 80.00
65.00 / 40.00
78.33
Elem.Math
99.00 / 89.00
95.00 / 75.00
97.67
Track.Shuf.
100.00 / 91.67
85.00 / 90.00
99.44
Bool.Expr.
90.00 / 95.00
100.00 / 85.00
98.33
Table 5: CoDI-induced strategies yield the largest OOD gains on rule-transfer-critical types under a fixed Qwen3-4B AS .
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
Hyperparameter
Value
Model configuration
Strategy Generator ( SG )
Qwen3-4B (trainable)
Answer Solver ( AS )
Qwen3-4B (frozen, non-thinking mode)
SFT demonstrations
Gemini-3-flash proposals, execution-filtered
Task filtering / splits
Qwen3-32B scoring + author spot-checks
Hardware
8 × A800 (80 GB)
Appendix
Table 6: Hyperparameters for CoDI training.
Tag
Name
Ind.?
Description
E
Example-recitation
No
The unit recalls, quotes, or closely paraphrases a specific support example without abstracting beyond it.
D
Direct-application
No
The unit applies facts or procedures to the current instance without first stating a cross-example pattern.
P
Pattern-abstraction
Yes
The unit states a general rule or invariant intended to hold across instances (inductive content).
R
Rule-application
Yes
The unit applies a rule or pattern that was already stated earlier in the trace.
Appendix
Table 7: Cognitive tags for sentence-level units inside <think> . “Ind.?” indicates inductive (rule-level) content; descriptions define the annotation target.
Metric
Pre
Post
Δ
p
Lthink
5276
4171
−1105
<10−3
qE/R
1.079
0.674
−0.405
3.0×10−4
rD→P (%)
4.36
6.21
+1.85
4.0×10−5
ℓˉP
89.4
108.6
+19.2
8×10−6
Acc OOD (matched, %)
45.2
92.4
+47.2
<10−3
nE(ph1)
18.54
9.06
−9.48
2.1×10−4
Appendix
Table 8: Pre/Post-CoDI trace metrics on Qwen3-4B matched OOD tasks with valid thinking traces ( K=3 ; subset of Table 1 OOD). Acc.: McNemar; nE(ph1) , ρE : paired t ; remaining metrics: paired trajectory tests.
Mode
Gem. Pre
Gem. Post
G5 Pre
G5 Post
Compositional
1.23
1.51
1.18
1.46
Procedural
1.86
2.93
1.81
2.86
Constraint
1.96
3.46
1.88
3.38
Schema
2.47
3.19
2.41
3.12
Analogical
1.22
0.59
1.15
0.54
Pattern
1.09
0.47
1.14
0.53
Appendix
Table 9: Pre-/Post-CoDI six-mode scores (Gem.: full cohort, Fig. 7 ; G5: n=40 ). All six Post − Pre Δ share the same sign across annotators.
Metric
Gem. Δ
G5 Δ
Sign
Lthink
−1105
−968
✓
qE/R
−0.405
−0.382
✓
rD→P
+1.85
+1.72
✓
ℓˉP
+19.2
+18.6
✓
nE(ph1) / ρE
−9.48 / −4.36
−9.12 / −4.08
✓
Six-mode signs
6/6
6/6
✓
Appendix
Table 10: Post − Pre trace deltas: Gem. (full cohort) vs. G5 ( n=40 ). Sign agreement only (Appendix D.2 ).
Parameter
Value
ID
BBH
OOD
K (shots)
1
48.89
44.20
34.71
2
55.67
68.52
48.00
3⋆
64.67
82.22
63.00
5
63.67
78.52
57.67
β (ICR weight)
0.3
50.00
44.20
44.67
0.5⋆
64.67
82.22
63.00
Appendix
Table 11: Hyperparameter sensitivity on Qwen3-4B for K , β , α , and k ( ⋆ : default; exact-match accuracy, %).
SG
AS
OOD ↑
Δ vs. CoDI-4B AS
CoDI-4B
4B
61.93
−1.07
8B
62.89
−0.11
14B
51.14
−11.86
32B
61.30
−1.70
Appendix
Table 12: Solver transfer with a fixed CoDI-4B SG . Deltas are absolute OOD points relative to the main-table CoDI-4B AS score of 63.00. The 4B row is a re-run under the swap protocol and need not equal 63.00.
Row
Task type
Split
T01
Movie recommendation
ID
T02
Dyck languages
OOD-subtask
T03
Penguins in a table
ID
T04
Geometric shapes
ID
T05
Formal fallacies
ID
T06
Temporal sequences
ID
Appendix
Table 13: Task index for the rows in Fig. 4 . Split labels follow Appendix J ; T10 is a BBH diagnostic.
Split
Hold-out
Rule
R2
Jacc.
MAE
ovlp.
(pp)
ID (ref.)
same subtasks
100%
0.91
–
3.1
OOD-subtask
28 subtasks
0%
0.68
0.74
6.2
OOD-task
19 tasks
0%
0.38
0.51
9.4
OOD-category
7 categories
0%
0.15
0.29
12.8
Appendix
Table 14: OOD shift on StrategyBench split levels (Qwen3-4B FS baseline). Rule overlap is template overlap with ID training. Jaccard is ability-profile similarity, not rule overlap. ID keeps the same subtasks with disjoint instances; MAE is mean absolute error in percentage points.
ID subtasks (training + eval)
Navigate, Word Sorting, Tracking Shuffled Objects, Boolean Expressions, Contextual Parametric Conflicts, Elementary Math, Formal Fallacies, Geometric Shapes, Hyperbaton, Implicatures, Logical Deduction, Movie Recommendation, Penguins in a Table, Reasoning about Colored Objects, Salient Translation Error Detection, Snarks, Sports Understanding, Temporal Sequences, Tracking Shuffled Objects (three objects), Web of Lies, Winowhy, and related BIG-Bench subtasks
OOD-subtask (held out, 28 subtasks)
Dyck Languages, Causal Judgment, Disambiguation QA, Epistemic Reasoning, Intent Recognition, Linguistic mappings, Nonsense-word grammar, Play Dialog Same or Different, Ruin Names, Strange Stories, Symbol Interpretation, Unit Conversion, and 16 additional held-out subtasks (full list in repository)
Appendix
Table 15: Representative ID and OOD-subtask inventories for main-text BIG-Bench evaluation; remaining names in the 28-subtask hold-out are in the public release. Date understanding (Fig. 4 , T10) is a BBH diagnostic and is not listed in either inventory.
Figure 9: Prompt used for six-mode induction scoring. Each strategy receives an independent 0–5 score per mode; the composite is the mean over applicable modes (N/A modes excluded from averaging).
Figure 10: Prompt for Gemini-3-flash sentence-level tagging of <think> units.
Figure 11: Prompt used for strategy quality analysis.
Figure 12: GPT-5 prompt for scoring each [INDUCTIVE_RULE] on abstraction, coverage, copying (reverse-scored), and transferability.
Integrating reasoning in large language models and large vision-language models has recently led to significant improvement of their capabilities. However, the generalization of reasoning models is still vaguely defined and poorly understood. In this work, we present an evaluation framework to rigorously examine how well chain-of-thought (CoT) approaches generalize on a simple planning task. Specifically, we consider a grid-based navigation task in which a model is provided with a map and must output a sequence of moves that guides a player from a start position to a goal while avoiding obstacles. The versatility of the task and its data allows us to fine-tune model variants using different input representations (visual and textual) and CoT reasoning strategies, and systematically evaluate them under both in-distribution (ID) and out-of-distribution (OOD) test conditions. Our experiments show that, while CoT reasoning improves in-distribution generalization across all representations, out-of-distribution generalization (e.g., to larger maps) remains very limited in most cases when controlling for trivial matches with the ID data. Surprisingly, we find that reasoning traces which combine multiple text formats yield the best (and non-trivial) OOD generalization. Finally, purely text-based models consistently outperform those utilizing image-based inputs, including a recently proposed approach relying on latent space reasoning.
Yannic Neuhaus, Nicolas Flammarion, Matthias Hein +1
Tübingen AI Center – University of Tübingen · EPFL · ELLIS Institute Finland – Aalto University
In-Context Learning (ICL) enables pretrained LLMs to adapt to downstream tasks by conditioning on a small set of input-output demonstrations, without any parameter updates. Although there have been many theoretical efforts to explain how ICL works, most either rely on strong architectural or data assumptions, or fail to capture the impact of key practical factors such as demonstration selection, Chain-of-Thought (CoT) prompting, the number of demonstrations, and prompt templates. We address this gap by establishing a theoretical analysis of ICL under mild assumptions that links these design choices to generalization behavior. We derive an upper bound on the ICL test loss, showing that performance is governed by (i) the quality of selected demonstrations, quantified by Lipschitz constants of the ICL loss along paths connecting test prompts to pretraining samples, (ii) an intrinsic ICL capability of the pretrained model, and (iii) the degree of distribution shift. Within the same framework, we analyze CoT prompting as inducing a task decomposition and show that it is beneficial when demonstrations are well chosen at each substep and the resulting subtasks are easier to learn. Finally, we characterize how ICL performance sensitivity to prompt templates varies with the number of demonstrations. Together, our study shows that pretraining equips the model with the ability to generalize beyond observed tasks, while CoT enables the model to compose simpler subtasks into more complex ones, and demonstrations and instructions enable it to retrieve similar or complex tasks, including those that can be composed into more complex ones, jointly supporting generalization to unseen tasks. All theoretical insights are corroborated by experiments.
Xuhan Tong, Yuchen Zeng, Jiawei Zhang
Department of Computer Sciences, University of Wisconsin-Madison · Microsoft Research
Recent advances in large language models (LLMs) have shown that Chain-of-Thought (CoT) reasoning can substantially improve performance on complex reasoning tasks. At the same time, In-Context Learning (ICL) has become an important mechanism for adapting LLMs to new tasks without updating model parameters, using only examples provided in the prompt. However, standard ICL often struggles on tasks that require multi-step reasoning, because the demonstrations usually contain only input-output pairs and lack explicit intermediate reasoning steps. This paper introduces an Automatic Chain-of-Thought (Auto-CoT) framework to improve ICL by automatically constructing reasoning-enhanced demonstrations. Auto-CoT generates reasoning chains for input-output examples, augments the prompt context with structured intermediate explanations, and removes irrelevant or low-quality demonstrations through a systematic selection process. By incorporating high-quality reasoning examples into the ICL prompt, Auto-CoT guides the model toward more reliable reasoning and improves prediction accuracy. Experiments across multiple reasoning tasks demonstrate that the proposed framework improves ICL performance by providing explicit intermediate reasoning guidance.