arXiv:2511.18162cs.CL2025-11被引 2

通过注意力头分离语义与字面信息,提升大模型的向量运算准确率。

Vector Arithmetic in Concept and Token Subspaces

  • 利用概念头和词元头识别模型激活中的语义与字面子空间。
  • 语义向量运算准确率达80%,远超原始状态的47%。
  • 适合研究模型内部表征机制或改进生成任务的开发者。

为预测下一个词元,大语言模型需同时表征当前词的语义与字面信息。先前研究识别出两类注意力头:(i) 概念诱导头,复制词义;(ii) 词元诱导头,复制原始词元表示(Feucht等,2025)。本文表明,这些头可用于识别Llama-2-7b中具有连贯语义结构的激活子空间。当使用概念头的注意力权重变换隐藏状态时,能更准确地执行平行四边形算术(Mikolov等,2013),例如实现“雅典” - “希腊” + “中国” = “北京”。该变换使最近邻准确率达到80%,显著高于直接使用原始隐藏状态的47%。类似地,词元头可揭示隐藏状态中的字面信息,支持如“coding” - “code” + “dance” = “dancing”等操作。

原文摘要 · Abstract (English)

In order to predict the next token, LLMs must represent semantic and surface-level information about the current word. Previous work identified two types of attention heads that disentangle this information: (i) Concept induction heads, which copy word meanings, and (ii) Token induction heads, which copy literal token representations (Feucht et al., 2025). We show that these heads can be used to identify subspaces of model activations that exhibit coherent semantic structure in Llama-2-7b. Specifically, when we transform hidden states using the attention weights of concept heads, we are able to more accurately perform parallelogram arithmetic (Mikolov et al., 2013) on the resulting hidden states, e.g., showing that "Athens" - "Greece" + "China" = "Beijing". This transformation allows for much higher nearest-neighbor accuracy (80%) than direct use of raw hidden states (47%). Analogously, we show that token heads allow for transformations that reveal surface-level word information in hidden states, allowing for operations like "coding" - "code" + "dance" = "dancing".

向量运算语义表征注意力机制大模型分析

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