arXiv:2603.28219cs.LG2026-03被引 1

让Transformer内部具备不确定性表达能力,提升模型可解释性。

Variational Neurons in Transformers for Language Modeling

  • 用变分神经元替代传统前馈单元,使不确定性融入内部计算
  • 保持高预测性能的同时,生成有意义的不确定性信号
  • 适合需要可信度评估的场景,如医疗、金融文本生成

语言建模中的Transformer通常依赖确定性内部计算,不确定性仅体现在输出层。本文将变分神经元引入Transformer前馈计算中,使不确定性成为内部计算的一部分。具体而言,基于EVE框架,用局部变分单元替换原有的确定性前馈单元,同时保留整体Transformer结构。在紧凑的下一个词预测任务中评估该设计,对比确定性与变分变体在预测和概率评估指标上的表现。除负对数似然、困惑度和准确率外,还分析了校准性、条件方差、互信息和潜在变量使用统计。结果表明:变分神经元能稳定融入Transformer,保持强预测性能,并生成有信息量的不确定性信号。实验还揭示任务质量、有效深度与内部稳定性是独立属性。这些成果确立了变分Transformer作为实用的不确定性感知语言建模形式,证明Transformer可在内部显式构建不确定性结构,支持更可靠的概率评估与模型行为分析。

原文摘要 · Abstract (English)

Transformers for language modeling usually rely on deterministic internal computation, with uncertainty expressed mainly at the output layer. We introduce variational neurons into Transformer feed-forward computation so that uncertainty becomes part of the internal computation itself. Concretely, we replace deterministic feed-forward units with local variational units based on EVE while preserving the overall Transformer backbone. We evaluate this design in compact next-token language-modeling settings. We compare deterministic and variational variants with both predictive and probabilistic criteria. Alongside negative log-likelihood, perplexity and accuracy, we analyze calibration, conditional variance, mutual information and latent-usage statistics. The resulting picture is clear. Variational neurons integrate stably into Transformers, preserve strong predictive performance and produce informative uncertainty signals. The experiments also show that task quality, useful depth and internal stability are distinct properties. These results establish variational Transformers as a practical form of uncertainty-aware language modeling. They show that Transformers can predict with an explicit internal structure of uncertainty, which supports stronger probabilistic evaluation and a more informative analysis of model behavior.

Transformer不确定性语言建模变分推理

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