Improving In-Context Learning with Reasoning Distillation

Nafis Sadeq, Xin Xu, Zhouhang Xie, Julian McAuley, Byungkyu Kang +2 more
4/14/2025
cs.CL

Official code: NafisSadeq/reasoning-distillation (1 star, Apache-2.0, last commit 2025-04-30).

Abstract

Language models rely on semantic priors to perform in-context learning, which leads to poor performance on tasks involving inductive reasoning. Instruction-tuning methods based on imitation learning can superficially enhance the in-context learning performance of language models, but they often fail to improve the model's understanding of the underlying rules that connect inputs and outputs in few-shot demonstrations. We propose ReDis, a reasoning distillation technique designed to improve the inductive reasoning capabilities of language models. Through a careful combination of data augmentation, filtering, supervised fine-tuning, and alignment, ReDis achieves significant performance improvements across a diverse range of tasks, including 1D-ARC, List Function, ACRE, and MiniSCAN. Experiments on three language model backbones show that ReDis outperforms equivalent few-shot prompting baselines across all tasks and even surpasses the teacher model, GPT-4o, in some cases. ReDis, based on the LLaMA-3 backbone, achieves relative improvements of 23.2%, 2.8%, and 66.6% over GPT-4o on 1D-ARC, ACRE, and MiniSCAN, respectively, within a similar hypothesis search space. The code, dataset, and model checkpoints will be made available at https://github.com/NafisSadeq/reasoning-distillation.git.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
10PythonApr 14, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{sadeq2025improving,
  title  = {Improving In-Context Learning with Reasoning Distillation},
  author = {Nafis Sadeq and Xin Xu and Zhouhang Xie and Julian McAuley and Byungkyu Kang and Prarit Lamba and Xiang Gao},
  year   = {2025},
  eprint = {2504.10647},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.10647v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.10647.svg)](https://codeofpaper.com/paper/2504.10647)

Discussion