跳到正文
Rohan Paul· @rohanpaul_ai · X·· 3 小时前AI 评分62
AI 导读

斯坦福大学研究人员发表论文 A Circuit for In-Context Learning,发现大语言模型在少样本提示中通过查找存储的标签来学习,且仅在标签重复时才开启该查找机制。研究追踪了 Qwen3-4B、SmolLM3-3B 和 Llama-3.2-3B 等模型的完整内部路径,指出模型无法通过示例学会其本身缺乏的特征,因此在少样本提示时应重复标签并选择模型可辨别的类别。

正文 · 原文

New Stanford paper finds that showing a small AI language model more examples cannot teach it a pattern it does not already notice, such as the third letter of a word.

finds that LLMs learn from few-shot examples by looking up stored labels, and only switch that lookup on when labels repeat.

An early signal opens this lookup only when some label repeats. With 1 example per class the model was right about 20% of the time, and with 6 it was right 96%.

Give a model a dozen sentences tagged with made-up labels like foo and bar, and it learns the mapping without weight updates. Earlier work found parts of this, but not how they fit together.

They traced the full path in Qwen3-4B, SmolLM3-3B and Llama-3.2-3B. Each label token stores the class of its sentence, and about 90 later heads match the new sentence against those stored classes.

For few-shot prompts, repeat every label several times and pick classes the model can already tell apart, since examples cannot teach a feature it lacks.

– arxiv. org/abs/2611.05344

Title: "A Circuit for In-Context Learning"

来源:Rohan Paul · x.com