论文

Born 测量 Transformer:让语言模型给出可精确验证的词级证据

Reading Why: Born-Measured Attention with Exact Word Evidence on Light and Qubits

精选理由

有人把 transformer 改成量子测量模型,解释不再是猜的,词的贡献能精确加和,还在 IBM 量子计算机上跑通了。

arXiv 论文提出 Born Transformer,把注意力改为行归一化的 Born 测量 |⟨q|k⟩|⁴,用测量乘积替代前馈非线性。其类别概率是词振幅的多项式,积分梯度证据无误差,词贡献之和与类别概率的差距在 10⁻¹¹ 以内。模型在 e-SNLI 上达到 76.98±0.17% 准确率,与同规模 softmax transformer(76.62±0.36%)持平,删除证据最高的词可在 45% 的测试对上改变答案,高于 softmax 模型的 32%。同一组权重可编译到光学与量子电路,在 IBM ibm_kingston 的 23 量子比特、852 个 CNOT 电路上复现了两个短测试对的模型答案。

原文 · arXiv cs.LG

Reading Why: Born-Measured Attention with Exact Word Evidence on Light and Qubits

When a language model answers, we can usually only estimate why. We build a transformer in which every step is a Born measurement - attention $|\langle q|k\rangle|^4$ normalised over each row, a measured product in place of the feed-forward nonlinearity, and a Born readout. With its denominators held at their values for the input, each class probability is a polynomial in the word amplitudes, so its integrated-gradient evidence is computed by a finite quadrature with no quadrature error: the words' contributions sum to the class probability above its no-information share, to $10^{-11}$ or better. On e-SNLI natural language inference, with about 98k parameters outside the embedding, the model reaches $76.98 \pm 0.17$% test accuracy, level with a softmax transformer of the same size ($76.62 \pm 0.36$%). Deleting the word its evidence ranks first changes the answer in 45% of test pairs, out of the 53% any single deletion can change, against 32% for the softmax model explained the same way and 40% by its attention x gradient. Attention can look more like the words annotators highlighted, yet accounts for the answer less well: deleting the word it ranks first changes the Born Transformer's answer in 32% of pairs. The same weights compile exactly to optoelectronic optics and to qubits, and a coherent attention layer becomes one circuit equal to the model (852 CNOTs on 23 qubits). On IBM's ibm_kingston, reading only the attention overlaps by Hadamard tests, the device gave the model's answers on two short test pairs and kept or changed them under deletion as the model does; the evidence itself did not yet survive the device, and we work out the shots and calibration that measuring it on hardware would need.