A paper posted to arXiv in August 2026, titled "Spectral Gaps of Hit-and-Run and Coordinate Hit-and-Run," addresses a question that decides whether a sampling algorithm is practical at all: how fast do these two widely used Markov chains actually converge to the distribution they are supposed to sample from?
Hit-and-Run (HAR) and its variant, Coordinate Hit-and-Run (CHAR), are workhorse algorithms for drawing random points from convex bodies — polytopes, simplices, and other constrained regions defined by linear inequalities. They show up wherever a system needs to explore an entire feasible region instead of finding a single optimum: sampling metabolic flux distributions in systems biology, generating constrained portfolios in quantitative finance, and running Bayesian inference when parameters must satisfy linear constraints.
According to arXiv, the paper studies the spectral gap of both chains — the mathematical quantity that governs how many steps a Markov chain needs before its samples stop resembling the starting point and start resembling the true target distribution.
What a spectral gap tells you about a sampler
A Markov chain sampler works by repeatedly moving a point according to a fixed random rule and treating the sequence of visited points as (eventually) representative draws from the target distribution. The spectral gap is the difference between the largest eigenvalue of the chain's transition operator (always 1) and the second-largest eigenvalue. A larger gap means the chain's memory of its starting point decays faster, so fewer steps are needed before consecutive samples are close to independent.
This number matters because it is the theoretical basis for mixing-time bounds: how many iterations you must run before trusting the output. Without such bounds, practitioners fall back on empirical diagnostics — effective sample size, autocorrelation plots, or simply running "long enough" and hoping. A quantified spectral gap turns that guesswork into a provable stopping rule.
Hit-and-Run versus its coordinate-only cousin
The two algorithms differ in one deceptively small choice. Classic Hit-and-Run picks a uniformly random direction in the full n-dimensional space at each step, then moves the current point along the chord that direction cuts through the convex body. Coordinate Hit-and-Run restricts that choice to one of the n coordinate axes, moving only along a single dimension at a time.
That restriction makes each CHAR step computationally cheaper — no need to generate and normalize a random vector in n dimensions — which is why CHAR has become the default in several applied sampling libraries. The tradeoff is geometric: axis-aligned moves can, in principle, mix more slowly through constraint sets whose shape is not aligned with the coordinate axes. Quantifying that tradeoff with a formal spectral-gap comparison, rather than relying on empirical benchmarks, is the substance of the work.
Why this matters for anyone running constrained sampling in production
Spectral-gap results rarely change what a practitioner types into a script, but they change what confidence that script deserves. Teams that already lean on HAR- or CHAR-based samplers should note a few practical consequences:
- Convex-constrained Bayesian models — where parameters live on a simplex or must satisfy budget/exposure constraints — inherit whatever mixing-time guarantee the underlying sampler carries.
- Systems-biology and metabolic-modeling pipelines (the COBRA toolbox and similar tools use CHAR-style samplers) rely on chain-length heuristics that formal gap bounds could eventually replace or validate.
- Anywhere a pipeline currently tunes "burn-in" or "thinning" by trial and error, a proven gap bound gives a principled floor for how many steps are actually required.
In our estimation, results like this typically take time to reach end users: they first get absorbed into the sampler implementations inside libraries such as hopsy, PolytopeSamplers.jl, or COBRA-adjacent tools, showing up later as changed default iteration counts rather than as something a user configures directly.
AiiN's takeaway
This is foundational probability theory, not a new product, and the paper does not claim to introduce a new sampling algorithm — it sharpens the analysis of two that already exist. For AI and ML builders, the practical lesson is less about this specific result and more about what it represents: constrained sampling — drawing valid points from a region defined by inequalities — is a quiet dependency underneath a surprising amount of applied Bayesian and optimization work, and its reliability rests on exactly this kind of unglamorous spectral analysis. When your pipeline depends on a Hit-and-Run-style sampler, the honest question to ask is not just "does it converge?" but "how do I know how long to run it for" — and that is precisely the gap this line of research is closing.