arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.11963cs.LG
收藏

QLENS:迈向语言转换器的量子视角

QLENS: Towards A Quantum Perspective of Language Transformers

Issaquah High School, Washington, USA(华盛顿州伊萨夸高中);University of Washington, Washington, USA(华盛顿大学)

Aditya Gupta, Kirandeep Kaur, Vinayak Gupta, Chirag Shah

AI总结:

QLENS从量子力学角度提出语言转换器的物理视角,通过将潜在激活转换为希尔伯特空间中的状态向量,利用单位ary算子和哈密顿量建模转换器生成过程,探索其概率分布和预测轨迹的演化。

摘要:

在自然语言处理中,当前理解转换器的方法在模型推理过程中能够成功识别中间预测,但这些方法仅作为有限的诊断检查点,缺乏一个数学框架来机械地建模每个层如何促进这些演变状态之间的转换。这种可解释性差距和跨学科视角的过去成功促使我们转向物理学,以寻找一个描述转换器数学框架的理论。我们观察到语言模型本质上是概率性的,这一属性在量子力学的核心公理中得到回声。这种平行促使我们将这一学科的见解应用于自然语言处理。为此,我们提出了QLENS,一种新的尝试,以物理视角研究转换器的生成过程。在QLENS下,通过将转换器的潜在激活转换为一个由模型输出单元导出的希尔伯特空间中的状态向量来研究转换器。该状态随后在推理过程中通过隐藏层演化——这些隐藏层被重新表述为单位ary算子和类比定义的哈密顿量——进行演化。通过应用特定的测量算子将最终状态应用Born规则,得到模型的最终概率分布。为了证明QLENS的潜力,我们通过探测一个玩具转换器来研究模型预测轨迹中各个层的影响。我们提出这项工作作为跨领域见解的基础,以促进对转换器更广泛理解。

英文摘要:

In natural language processing, current methods for understanding Transformers are successful at identifying intermediate predictions during a model's inference. However, these approaches function as limited diagnostic checkpoints, lacking a mathematical framework for mechanistically modeling how each layer facilitates transitions between these evolving states. This interpretability gap and past successes of interdisciplinary outlooks inspire us to turn to physics in search of a descriptive mathematical framework for Transformers. We observe that language models are intrinsically probabilistic, an attribute that is echoed in the core postulates of quantum mechanics. This parallel inspires us to translate insights from this discipline to that of natural language processing. Towards this objective, we propose QLENS a novel attempt to develop a physics-based perspective on the Transformer generation process. Under QLENS, a Transformer is studied by converting its latent activations into a state vector in a Hilbert space derived from the model's output units. This state subsequently evolves through hidden layers - reformulated as unitary operators and analogously defined Hamiltonians - during inference. The model's final probability distribution is obtained by applying the Born rule to the end state using a specific measurement operator. To demonstrate QLENS's potential, we conduct a proof-of-concept by probing a toy Transformer to investigate the influence of individual layers in a model's prediction trajectory. We present our work as a foundation for cross-domain insights to be leveraged towards a broader understanding of Transformers.

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

↑