Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Context Tuning for In-Context Optimization

About

We introduce Context Tuning, a simple and effective method to significantly enhance few-shot adaptation of large language models (LLMs) without weight updates. In-Context Learning (ICL) forms a memory representation of the demonstrations in a single forward pass but cannot refine it when insufficient. Prompt-based methods offer lightweight adaptation by optimizing a trainable prompt or prefix but initialize it independently of the demonstrations. In contrast, Context Tuning leverages the model's inherent ICL ability to initialize a trainable memory representation from demonstrations, then refines it through gradient-based optimization. Extensive evaluations on benchmarks such as CrossFit, UnifiedQA, MMLU, BIG-Bench Hard, and ARC demonstrate that Context Tuning outperforms both ICL and traditional prompt-based adaptation methods while achieving competitive accuracy with Test-Time Training at significantly higher training efficiency.

Jack Lu, Ryan Teehan, Zhenbang Yang, Mengye Ren• 2025

Related benchmarks

TaskDatasetResultRank
ReasoningBBH
BBH Accuracy58.2
51
Multitask Language UnderstandingMMLU
MMLU Accuracy44.1
41
ReasoningBigBenchHard
Accuracy (BigBenchHard)69.1
37
Natural Language ProcessingNLP-LR
Accuracy47.6
13
Science Question AnsweringARC
Accuracy25.8
13
Showing 5 of 5 rows

Other info

Follow for update