arXiv Computation and Language

LLMs Learn Better In-Context from Rules than from Examples

The paper investigates how large language models learn new tasks in-context, comparing rule-based instruction following to example-based few-shot prompting across five diverse tasks. Results show that models generally learn more reliably from rule descriptions than from examples alone, and adding more examples does not consistently improve performance. Instruction tuning further enhances rule-based learning while preserving example-based capabilities, with rule advantages being strongest for algebraic tasks and weaker for tasks requiring distributional sensitivity or parametric knowledge.

arXiv AI
Nov 5

Farther the Shift, Sparser the Representation: Analyzing OOD Mechanisms in LLMs

The paper examines how Large Language Models’ internal representations become sparser as task difficulty rises, finding that harder inputs lead to more concentrated activation patterns in the last hidden state. This sparsity–difficulty relationship holds across various models and domains, indicating that models learn dense representations for familiar patterns but default to sparse activations for unfamiliar ones. Leveraging this insight, the authors propose Sparsity‑Guided Curriculum In‑Context Learning (SG‑ICL), which selects few‑shot demonstrations based on sparsity and outperforms standard CoT and Auto‑CoT baselines on the MATH‑500 benchmark.

By Mingyu Jin, Yutong Yin, Jingcheng Niu, Qingcheng Zeng, Wujiang Xu, Mengnan Du, Wei Cheng, Zhaoran Wang, Tianlong Chen, Dimitris N. Metaxas
arXiv Machine Learning
Oct 15

From Copying to Composition: How Language Models Develop In-Context Learning

The study investigates how language models acquire in-context learning (ICL) by distinguishing between copying a nearby demonstration and integrating information across a prompt. Across 17 models, roughly one-third default to copied answers, a few are undecided, and the remainder favor rule-consistent answers that yield higher accuracy and are guided by the requested value rather than the nearest conflicting example. Analyses show that models prioritize task-relevant prompt tokens before accuracy surpasses chance, and that synthetic or fine-tuned training can shift models toward compositional responses or improve accuracy when prompts reassign label meanings.

By Minglai Yang, Xinyu Guo, Renxiong Wang, Sunjie Hou, Daniel Yue Zhang, Yunzhong He
arXiv Machine Learning
Oct 19

Out of Support, Not Out of Reach: In-Context Learning with Unsupported Instructions and Composed Tasks

The paper investigates when in‑context learning (ICL) can succeed even if the instruction or target task is not covered by a model’s pretraining data. It introduces a theoretical framework that distinguishes two types of distribution shift—unsupported instructions and unsupported target tasks—and shows how demonstrations can mitigate these shifts. The authors further extend the analysis to long‑horizon tasks that can be decomposed into pretraining‑supported subtasks, providing error bounds that explain how ICL can handle tasks beyond the model’s original support.

By Xuhan Tong, Yuchen Zeng, Jiawei Zhang
arXiv Computation and Language
4d ago

The ROI of Small Examples: Optimizing In-Context Learning Under Token Budgets

The paper investigates how to best allocate a fixed token budget for in‑context learning (ICL) prompts in question answering tasks. By categorizing demonstration examples into length‑based bins and constructing prompts from examples within the same bin, the authors find that shorter demonstrations generally yield better performance across two QA benchmarks and an NLI task. The study emphasizes that demonstration granularity is a key factor in prompt design, especially under token constraints.

By Anxo Perez, Jorge Gab\'in, Javier Parapar
arXiv Computer Vision
Oct 23

Watch and Learn: Teaching Visual In-Context Learning by Removing Textual Shortcuts

The paper introduces MIME, a task‑agnostic visual in‑context learning (vICL) dataset that removes textual shortcuts by omitting explicit rules linking demonstration images to answers, forcing models to infer the rule visually. Fine‑tuning vision‑language models on MIME boosts vICL accuracy by 8.1–18.0 points across three VLMs while preserving single‑image performance and improving multi‑image and text‑only in‑context learning. The authors also propose DTAD, a technique that randomly drops demonstration labels during training to encourage visual inference, achieving comparable accuracy with more consistent attention to demonstration images and outperforming frontier models on the TrueMICL benchmark.

By Nimrod Shabtay, Asaf Yehudai, Avihu Dekel, Eli Schwartz, Raja Giryes
arXiv Machine Learning
Jun 29

Learning to Reason with Curriculum II: Compositional Generalization

arXiv:2606. 27721v1 Announce Type: new Abstract: Compositional generalization, the ability to solve complex problems by combining solutions to simpler sub-problems, is a fundamental capability of both natural and artificial intelligence, and a key mechanism underlying chain-of-thought reasoning.

By Nived Rajaraman, Audrey Huang, Miroslav Dudik, Robert Schapire, Dylan Foster, Akshay Krishnamurthy
arXiv Computation and Language
Nov 4

Variable names provide priors: semantic grounding enables data-efficient numerical prediction by large language models

The study demonstrates that large language models (LLMs) can perform numerical prediction on tabular data by leveraging semantic grounding—matching variable names to the values they describe—without task-specific training. Across 20 datasets from nine scientific domains, five LLMs matched or outperformed seven supervised machine learning models, especially when training examples were scarce. Controlled experiments with physical formulas reveal that LLMs combine domain knowledge (as a prior) with in-context examples (likelihood) in a Bayesian‑like manner, adjusting predictions as contradictory examples accumulate.

By Xin-Rui Ma, Shi-Zhi Chen, Hai-Yan Jiang, De-Cheng Feng, Michael Beer