NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Language Modeling with Hyperspherical Flows

Justin Deschenaux, Caglar GulcehrearXiv 2026

TL;DR

The paper introduces $\mathbb{S}$-FLM, a novel continuous flow language model that operates on a hyperspherical latent space ($\mathbb{S}^{d-1}$) rather than costly, high-dimensional one-hot vectors. By generating text through vector rotations along a learned velocity field, $\mathbb{S}$-FLM drastically reduces training costs and significantly boosts performance on large-vocabulary reasoning tasks like math and code, closing the gap with discrete diffusion models.

What Problem Does This Paper Address?

While autoregressive (AR) models dominate language modeling, their token-by-token generation is inherently sequential and slow. Diffusion and Flow Language Models (FLMs) offer a parallel generation alternative. However, existing FLMs suffer from two major flaws:

  1. The One-Hot Bottleneck: They operate on one-hot vectors that scale with the vocabulary size ($|V|$). For modern vocabularies (100k+ tokens), this makes training incredibly slow and memory-intensive.
  2. Lack of Semantic Noise: Adding standard Gaussian noise to one-hot vectors lacks a clear semantic interpretation because all distinct one-hot embeddings are equidistant in Euclidean space.

The authors aim to design a continuous flow model that operates directly on compact, low-dimensional token embeddings while maintaining a geometrically principled way to inject and remove noise.

Methods

The core innovation is $\mathbb{S}$-FLM, which defines a Riemannian flow on the unit hypersphere $\mathbb{S}^{d-1}$.

Overview of the $\mathbb{S}$-FLM training and sampling pipeline.

Key components include:

  • Spherical Linear Interpolation (SLERP): Instead of adding Gaussian noise, the model uses SLERP to smoothly rotate clean token embeddings toward a uniform noise distribution on the sphere.
  • Cross-Entropy Training: Rather than regressing the velocity field directly (which causes embeddings to collapse), the model approximates the posterior using a denoiser trained with standard cross-entropy loss, naturally pushing token representations apart.
  • $\mathbb{S}$-arch Architecture: A specialized Transformer variant inspired by nGPT where intermediate activations are constrained to the hypersphere, parameterizing attention and MLP layers as pure rotations.
  • Advanced Noise Scheduling: The authors implement a truncated noise schedule to avoid training at low noise levels where the high-dimensional posterior collapses, alongside an adaptive noise schedule that concentrates training steps where the loss changes the fastest.

Datasets

The model was evaluated on three distinct tasks:

  • Sudoku: A dataset of 48k training and 2k validation puzzles split into easy, medium, and hard difficulties to evaluate global context processing.
  • TinyGSM: A dataset of ~11.8M synthetic math word problems paired with Python solutions. Performance was validated using the standard GSM8K test set.
  • OpenWebText (OWT): A large web-text corpus used to evaluate unconditional language modeling and generative perplexity.

Key Insights and Ideas

  • The Geometry of Language: Cosine distance is widely known to capture token similarity better than Euclidean distance. Because cosine distance corresponds to arc length on a hypersphere, modeling language generation as continuous rotations on a sphere is geometrically and semantically intuitive.
  • Beating the Curse of Dimensionality: In high dimensions, embeddings spread out drastically, meaning that during sampling, a latent vector quickly falls into a specific token's Voronoi cell, causing the posterior to collapse to a one-hot distribution early on. Truncating the noise schedule to completely avoid these low-noise training levels is critical to making the model work.
  • Likelihood $\neq$ Correctness: Previous FLMs matched AR models in generative perplexity but failed completely on verifiable reasoning tasks (getting <1% on GSM8K). $\mathbb{S}$-FLM demonstrates that continuous flows can reason if the decoding strategy restricts the velocity field to the top-$k$ entries (e.g., greedy top-1 decoding).

Key Results

  • GSM8K Math Reasoning: While prior FLMs failed completely (<1% accuracy), $\mathbb{S}$-FLM achieved 12.4% accuracy with its native $\mathbb{S}$-arch and jumped to 18.0% using top-1 velocity decoding at standard temperature ($T=1$).
  • Efficiency at Low Steps: At low Number of Function Evaluations (NFE $\le$ 16), $\mathbb{S}$-FLM outperforms strong discrete diffusion baselines like MDLM and Duo.
GSM8K Accuracy vs. NFE at T=1, showing $\mathbb{S}$-FLM outperforming baselines at low NFE steps.
  • Sudoku Solvers: With truncation and adaptive scheduling, $\mathbb{S}$-FLM hits 94.8% (Easy), 85.2% (Medium), and 45.0% (Hard) exact match accuracy, vastly outperforming autoregressive baselines.
  • Training Speedup: Because it avoids materializing dense $|V|$-dimensional arrays, $\mathbb{S}$-FLM trains significantly faster than previous one-hot FLMs.

Limitations and Future Work

  • The Low-Temperature Gap: While $\mathbb{S}$-FLM closes the gap to discrete diffusion at standard temperature ($T=1$), a significant performance gap remains when discrete models use optimized low-temperature decoding ($T=0.1$), where models like Duo reach 36% accuracy.
  • Throughput Overhead: Although $\mathbb{S}$-FLM is faster than other FLMs, the specialized $\mathbb{S}$-arch backbone currently trains slower per step than a standard standard Diffusion Transformer (DiT). Optimizing its computational throughput is a key area for future work.

Summary updated

BibTeX
@misc{deschenaux2026language,
  author = {Justin Deschenaux and Caglar Gulcehre},
  title = {{Language Modeling with Hyperspherical Flows}},
  year = {2026},
  eprint = {2605.11125},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.11125},
}
Figure