arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2501.03489cs.LGcs.CR
收藏

面向私有 LLM 的熵引导注意力

Entropy-Guided Attention for Private LLMs

New York University(纽约大学)

Nandan Kumar Jha, Brandon Reagen

AI总结:

针对私有推理中非线性运算导致的高通信与延迟开销,论文用 Shannon 熵分析其对训练稳定和注意力头多样性的作用,并提出熵引导注意力、熵正则化及 PI 友好归一化方案。

摘要:

专有语言模型的普及引发了严重的隐私担忧,因此需要推进私有推理(PI):在不泄露用户敏感信息的情况下,直接在加密数据上执行计算。尽管 PI 提供了一种有前景的解决方案,但其实际部署受到巨大通信和延迟开销的阻碍,这些开销主要来自非线性运算。为此,我们引入一个信息论框架,用以刻画仅解码器语言模型中非线性的作用,从而为针对 PI 需求优化 transformer 架构奠定有原则的基础。通过利用 Shannon 熵作为定量度量,我们揭示了非线性此前未被探索的双重意义:除确保训练稳定性外,它们对于维持注意力头多样性也至关重要。具体而言,我们发现移除非线性会触发两种关键失效模式:深层中的“熵坍缩”,使训练不稳定;以及较早层中的“熵过载”,导致多头注意力(MHA)的表示能力利用不足。我们提出一种熵引导注意力机制,并配合一种新颖的熵正则化技术来缓解熵过载。此外,我们探索了对 PI 友好的层归一化替代方案,以防止熵坍缩并稳定减少非线性的 LLM 训练。本研究弥合了信息论与架构设计之间的差距,确立了熵动态作为开发高效 PI 架构的原则性指导。代码和实现可在 https://github.com/Nandan91/entropy-guided-attention-llm 获取。

英文摘要:

The pervasiveness of proprietary language models has raised critical privacy concerns, necessitating advancements in private inference (PI), where computations are performed directly on encrypted data without revealing users' sensitive information. While PI offers a promising solution, its practical deployment is hindered by substantial communication and latency overheads, primarily stemming from nonlinear operations. To address this, we introduce an information-theoretic framework to characterize the role of nonlinearities in decoder-only language models, laying a principled foundation for optimizing transformer-architectures tailored to the demands of PI. By leveraging Shannon's entropy as a quantitative measure, we uncover the previously unexplored dual significance of nonlinearities: beyond ensuring training stability, they are crucial for maintaining attention head diversity. Specifically, we find that their removal triggers two critical failure modes: {\em entropy collapse} in deeper layers that destabilizes training, and {\em entropic overload} in earlier layers that leads to under-utilization of Multi-Head Attention's (MHA) representational capacity. We propose an entropy-guided attention mechanism paired with a novel entropy regularization technique to mitigate entropic overload. Additionally, we explore PI-friendly alternatives to layer normalization for preventing entropy collapse and stabilizing the training of LLMs with reduced-nonlinearities. Our study bridges the gap between information theory and architectural design, establishing entropy dynamics as a principled guide for developing efficient PI architectures. The code and implementation are available at https://github.com/Nandan91/entropy-guided-attention-llm

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

↑