Deeper Insights Without Updates: The Power of In-Context Learning Over Fine-Tuning

Qingyu Yin, Xuzheng He, Luoao Deng, Chak Tou Leong, Fan Wang +3 more
10/7/2024
cs.LGcs.CL

No official code found. Best implementation: MikaStars39/ICLvsFineTune (3 stars, last commit 2024-11-05).

Abstract

Fine-tuning and in-context learning (ICL) are two prevalent methods in imbuing large language models with task-specific knowledge. It is commonly believed that fine-tuning can surpass ICL given sufficient training samples as it allows the model to adjust its internal parameters based on the data. However, this paper presents a counterintuitive finding: For tasks with implicit patterns, ICL captures these patterns significantly better than fine-tuning. We developed several datasets featuring implicit patterns, such as sequences determining answers through parity or identifying reducible terms in calculations. We then evaluated the models' understanding of these patterns under both fine-tuning and ICL across models ranging from 0.5B to 7B parameters. The results indicate that models employing ICL can quickly grasp deep patterns and significantly improve accuracy. In contrast, fine-tuning, despite utilizing thousands of times more training samples than ICL, achieved only limited improvements. We also proposed circuit shift theory from a mechanistic interpretability's view to explain why ICL wins.

View on arXivView PDF

Code Implementations(1)

EMNLP'24 Findings

30PythonNov 5, 20241 years ago

Similar Papers

Cite this paper

@article{yin2024deeper,
  title  = {Deeper Insights Without Updates: The Power of In-Context Learning Over Fine-Tuning},
  author = {Qingyu Yin and Xuzheng He and Luoao Deng and Chak Tou Leong and Fan Wang and Yanzhao Yan and Xiaoyu Shen and Qiang Zhang},
  year   = {2024},
  eprint = {2410.04691},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.04691v1}
}

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/2410.04691.svg)](https://codeofpaper.com/paper/2410.04691)

Discussion