# Spherical Flows for Sampling Categorical Data

*Jannis Chemseddine, Gregor Kornhardt, Gabriele Steidl*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/148878) · [OpenReview](https://openreview.net/forum?id=uVMZotQcJ7) · [alphaXiv](https://www.alphaxiv.org/abs/2605.05629) · [Open on the map](../papers.html#p148878)

Category: [Time Series, PDEs & Probabilistic ML](../pcat/9.md) › [Flow Matching](../pgroup/582.md) · Type: new method · Keywords: spherical generative models, von Mises-Fisher, discrete sequence generation, predictor-corrector sampling, ODE integration

Areas: [Generative Models (Diffusion & Flows)](../areas/generative-models.md) › Flow Matching and Diffusion › Generative Flow Models

## Summary
Spherical Flows introduces a generative model for discrete sequences that operates on the sphere using von Mises-Fisher distributions and predictor-corrector sampling, achieving improved performance on Sudoku and language modeling.

## Explained to a 5-year-old
The paper makes a new way to generate puzzles and words by moving points on a special round surface. Instead of using flat spaces like a piece of paper, it uses a sphere where distances are measured differently. On a sphere, there is a natural way to add random noise that stays smooth and follows the surface. This noise helps the model explore different possible sequences while staying close to the right answers. The model learns only a simple rule called a posterior, which tells how likely each symbol is given the others.

## Explained to a 5-year-old, longer
The paper is about making computers create sequences of symbols, like numbers in Sudoku or words in a sentence. Usually, researchers think of these symbols as points on a flat plane, but this work uses a round sphere instead. On a sphere, there is a natural way to add random noise that follows the surface smoothly. This noise helps the model explore different possible sequences while staying close to the right answers. The model learns only a simple rule called a posterior, which tells how likely each symbol is given the others. By using the sphere's geometry, the model can move from one symbol to the next in a way that respects the curvature. The movement can be done step by step using a simple equation that works like a smooth walk. There is also a faster method that corrects the steps after each move, making the generation more accurate. The researchers compare their sphere-based method with older methods that use flat spaces. They find that the sphere method solves Sudoku puzzles better and creates more natural language. This new approach could help any task where you need to generate discrete sequences, like games or chatbots. Overall, it shows that thinking about data on a sphere can lead to better generative models.

## For a technical reader
The paper proposes a generative framework that places discrete embeddings on a unit sphere rather than Euclidean space or the simplex. It leverages the von Mises-Fisher distribution to define a tractable noise process and a closed-form conditional score on the sphere. By exploiting radial symmetry, the continuity equation is reduced to a scalar ODE in cosine similarity, enabling efficient computation of marginal velocities. These velocities decompose into posterior-weighted tangent sums, which support both direct ODE integration and a predictor-corrector sampling scheme. Experiments on Sudoku and language modeling show that this spherical approach outperforms geodesic and Euclidean baselines.

## Problem
Learning generative models for discrete sequences in a continuous embedding space is challenging because prior methods operate in Euclidean space or the probability simplex, which may not capture the natural geometry of categorical data.

## Method
The approach works on the sphere Sd-1 using the von Mises-Fisher distribution to define a noise process and a closed-form conditional score. By exploiting radial symmetry, the continuity equation is reduced to a scalar ODE in cosine similarity, yielding marginal velocities that decompose into posterior-weighted tangent sums, enabling both ODE and predictor-corrector sampling. Only the posterior is learned via cross-entropy loss.

## Results
The approach yields significantly better results on Sudoku and language modeling compared to geodesic and Euclidean baselines.

## Contributions
It introduces a spherical geometry-based generative framework for discrete sequences, reduces the continuity equation to a tractable scalar ODE, and provides both ODE and predictor-corrector sampling via posterior-weighted tangent sums.

## Research questions this paper is counted under

- [How can neural networks learn accurate probability distributions for discrete data with ambiguous or heterogeneous outcomes?](../q/689.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/148878)
