cs.LGMar 30, 2026

Variational Neurons in Transformers for Language Modeling

Authors: Yves Ruffenach

Organizations: Conservatoire National des Arts et Métiers Strasbourg, France

Abstract

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.

Figures & tables

Explore similar work

CardsList
  1. Uncertainty-Aware Transformers: Conformal Prediction for Language Models

    Apr 10, 2026Abhiram Vellore, Niraj K. JhaLLM Uncertainty EstimationConformal Prediction

  2. Variational Distributional Neuron

    Feb 20, 2026Yves RuffenachVariational AutoencodersVariational Inference

  3. Agentic Control in Variational Language Models

    Apr 14, 2026Yves RuffenachLanguage Model-Based ControlLanguage Modeling