arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.02780cs.CL
收藏

深层中的值向量是否需要来自残差流的上下文?

Do Value Vectors in Deep Layers Need Context from the Residual Stream?

Independent(独立);Drexel University(德雷塞尔大学)

Muyu He, Yuchen Liu, Qingya Huang, Li Zhang

AI总结:

研究通过提出Bank of Values(BoV)方法,在深层注意力层中使用无上下文的值向量来保留原始token信息,从而提升模型性能并减少计算和内存开销。

摘要:

Transformer架构作为现代LLM骨干的成功在很大程度上归功于其使用注意力层。注意力层遵循标准神经网络范式:以残差流为输入,从而产生上下文相关的查询、键和值向量。然而,我们发现当深层学习仅保留原始token信息的无上下文值向量,而不利用残差流中的任何上下文时,模型性能有显著提升。当模型可以访问这种无上下文的值向量时,添加回上下文相关的组件对整体基准性能几乎没有额外益处。这种无上下文的值向量可以作为稀疏模型参数存储,无需重新计算或持久缓存这些值。通过对这种无上下文值向量的关键设计选择进行系统消融,我们提出了Bank of Values(BoV),这是一种通过为最后三分之一的每一层学习一个token特定值向量的查找表来计算注意力中值向量的新方法。在135M和780M模型上,BoV相比标准注意力提升了验证损失,并且在780M模型上,在21个基准测试的平均得分上匹配了之前最佳方法(该方法以更少的计算和内存向值向量添加token信息)。

英文摘要:

The success of the transformer architecture is in large part due to its use of attention layers. An attention layer follows the standard neural network paradigm: it takes the residual stream as input and thereby produces context-dependent query, key, and value vectors. However, we find that model performance meaningfully improves when deeper layers learn only a context-free value vector to preserve the original token information, without drawing on any context from the residual stream. When the model has access to this context-free value vector, adding back the context-dependent component provides little additional benefit for aggregate benchmark performance. Such context-free value vectors can be stored as sparse model parameters, eliminating the need to recompute or persistently cache these values. Through systematic ablations on the key design choices for such context-free value vectors, we propose Bank of Values (BoV), a new way of computing value vectors in attention by learning a lookup table of token-specific value vectors for each of the last third of layers. Across 135M and 780M models, BoV improves validation loss over standard attention and, at 780M, the average score across 21 benchmarks, matching the previous best method that adds token information to the value vector with less compute and memory.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑