arXiv:2601.08169cs.CLcs.LG2026-01

微调函数向量提升语言模型关系推理能力

Relational Knowledge Distillation Using Fine-tuned Function Vectors

  • 用约20个词对微调函数向量,捕捉概念间关系
  • 在类比任务上性能优于原始向量,小大模型均有效
  • 可插入激活层增强推理,适合研究模型可解释性

表示概念间关系是智能系统理解世界的核心前提。近期研究发现,少量注意力头在上下文学习中编码任务表征,以紧凑形式称为函数向量。我们发现,仅用约20个词对微调函数向量,即可在基于关系的词补全任务上取得优于原始向量的性能,该优势在小型和大型语言模型中均成立。此外,微调后的函数向量在关系词解码中表现更优,并与人类语义关系相似性判断更一致。接着,我们提出复合函数向量——由微调函数向量加权组合而成,用于提取关系知识并支持类比推理。在推理时,将该复合向量插入语言模型激活层,显著提升认知科学和SAT基准中复杂类比问题的表现。结果表明,激活修补是一种可控的机制,可用于编码与操控关系知识,推动大模型的可解释性与推理能力发展。

原文摘要 · Abstract (English)

Representing relations between concepts is a core prerequisite for intelligent systems to make sense of the world. Recent work using causal mediation analysis has shown that a small set of attention heads encodes task representation in in-context learning, captured in a compact representation known as the function vector. We show that fine-tuning function vectors with only a small set of examples (about 20 word pairs) yields better performance on relation-based word-completion tasks than using the original vectors derived from causal mediation analysis. These improvements hold for both small and large language models. Moreover, the fine-tuned function vectors yield improved decoding performance for relation words and show stronger alignment with human similarity judgments of semantic relations. Next, we introduce the composite function vector - a weighted combination of fine-tuned function vectors - to extract relational knowledge and support analogical reasoning. At inference time, inserting this composite vector into LLM activations markedly enhances performance on challenging analogy problems drawn from cognitive science and SAT benchmarks. Our results highlight the potential of activation patching as a controllable mechanism for encoding and manipulating relational knowledge, advancing both the interpretability and reasoning capabilities of large language models.

关系推理函数向量模型可解释性类比推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。