Manuscript Offprint
arXiv:2610.08562Finite-Precision Gram-Schmidt Walks
ABSTRACT
The Gram-Schmidt Walk is a randomized vector-balancing algorithm whose sub-gaussian guarantees support applications in discrepancy, experimental design, and data compression; however, these theoretical guarantees are established in exact arithmetic, whereas implementations must approximate least-squares directions, boundary updates, and sampling probabilities in finite precision. This is important because small numerical errors can change which coordinates freeze and thereby alter the subsequent trajectory. We analyze the concentration of the perturbed Gram-Schmidt walk directly under bounded, potentially biased and history-dependent errors. For input vectors of Euclidean norm at most one, we obtain a modified MGF bound depending on key error sources which recovers the original result as the error goes to zero. We also construct a full-column-rank instance in which bounded update errors produce bias of order , showing that updates accumulate error unavoidably under this model. Finally, we validate our findings in a variety of settings by ablating on the bit precision and problem size.
1 INTRODUCTION
Selecting a small representative subset of a dataset is an important task in algorithmic statistics (Xiao et al., 2026; Göttlich et al., 2024; Chazelle, 2000), which requires preserving many statistics with relatively few points. Discrepancy theory offers a useful perspective on this task: assign signs to data vectors so that their signed sum is small. Given some matrix , we seek to assign weights to its columns such that the sum is minimized in the infinity norm. In other words, we ask how to split the columns into two groups such that both groups have roughly the same sum as measured by the infinity norm of the difference. We call this quantity the discrepancy of the matrix,
A balanced partition can serve as a compression step if its cardinality or weights are controlled, and finding such a coloring has natural applications in machine learning such as coresets for large datasets (Karnin and Liberty, 2019; Liberty et al., 2026; Ren et al., 2026), attention approximation (Kochetkova et al., 2026; Anand et al., 2026a), covariate balance in experimental design (Harshaw et al., 2024), and distribution thinning (Carrell et al., 2025), where one wishes to summarize a large dataset with a few carefully chosen points. In theoretical computer science, this problem has found applications to spectral sparsification (Lau et al., 2025), approximation algorithms (Eisenbrand et al., 2012), computational geometry (Chazelle, 2004), Monte Carlo integration (Dick and Pillichshammer, 2014), and matrix-vector multiplication (Lingas, 2024; Anand et al., 2026b). Intuitively, if we can split a dataset into two balanced parts where the whole dataset can be summarized by one of the halves, then we can recursively repeat this procedure to find a small approximation of the dataset.
One such algorithm is the Gram-Schmidt Walk of Bansal et al. (2017) which recovers a seminal result of Banaszczyk (1998) by allowing one to sample from a certain distribution such that concentrates tightly around the zero vector. Given with and an initial fractional assignment , the walk returns . At a high level, the algorithm takes a random walk in the unit cube with entries becoming integral as the algorithm progresses. Once an entry becomes integral we say that it is frozen, with future steps not moving along this dimension. The steps of the random walk are chosen to be mean zero while not increasing discrepancy too much among the alive entries such that the final output has small discrepancy. Harshaw et al. (2024) showed that for every ,
Thus every fixed linear projection of the discrepancy has Gaussian-type tails with a dimension-independent scale. This property is also useful as a component of more elaborate algorithms. For instance, Carrell et al. (2025) develop Gram-Schmidt-based thinning procedures and implementations that accelerate repeated balancing steps.
The concentration guarantees above are established for an idealized Gram-Schmidt Walk operating in exact arithmetic: specifically, the least-squares directions and boundary steps are computed exactly, and each random choice follows its prescribed probability, and these guarantees do not automatically extend to the finite precision process which would be executed on a computer that uses a small number of bits. In particular, these aforementioned theoretical guarantees do not quantify how much numerical error the walk can tolerate due to the sensitivity of its movement within the hypercube, or how much working precision is sufficient to preserve the desired discrepancy bound. This motivates a finite-precision analysis that explains how numerical errors affect concentration and provides sufficient conditions for preserving a desired discrepancy guarantee.
Indeed, implementing these steps in practice introduces errors due to finite-precision. These errors can manifest in the computed direction, the boundary update, and the probabilities of hitting each boundary of the unit hypercube, and can affect the current iterate; however, more seriously, they can also affect which coordinate freezes, which in turn changes the least-squares system (which is also solved by maintaining a Cholesky factorization for improved runtimes) that must later be solved. Therefore, in the worst-case, the perturbed trajectory can deviate significantly from the ideal trajectory. It is not clear a priori that subgaussianity should be preserved under approximate arithmetic, as small perturbations in position can potentially change which entries become frozen in a given iteration, changing the path that the walk takes over the rest of the algorithm. So, any analysis that follows the perturbed trajectory alongside one exact trajectory may lose the structure responsible for concentration. Moreover, deterministic rounding may not preserve conditional mean zero, so an implementation can accumulate systematic discrepancy even when the individual update errors are small. Numerical sensitivity is already familiar from classical Gram-Schmidt orthogonalization, which can suffer severe loss of orthogonality in finite precision, especially for nearly linearly dependent inputs (Giraud et al., 2005). The Gram-Schmidt walk introduces a further challenge: numerical errors can affect both the computed directions and the branching and freezing decisions, changing the subsequent trajectory and the distribution of the final coloring. Understanding its numerical robustness therefore requires connecting local computational errors to the concentration of the final discrepancy.
These observations expose a gap between theory and practice for the Gram-Schmidt Walk. The classical concentration guarantees assume exact arithmetic, while practical implementations use approximate least-squares directions, rounded updates, and inexact sampling probabilities. These errors can change which coordinates freeze and hence which subproblems the algorithm solves next, so the exact-arithmetic guarantees need not hold for the resulting finite-precision output distribution.
We address this gap by studying a model with updates for where and are computed quantities, and includes rounding, clamping, and freezing corrections. Uniform budgets and additionally control least-squares image error and conditional branch-probability error, respectively. Our analysis permits biased, history-dependent errors and changes to the freezing trajectory. Section 3 specifies the complete model, including feasibility and freezing requirements. Our contributions address the theory-practice gap in two directions:
(1) Theoretical guarantees. We establish concentration guarantees for the Gram-Schmidt Walk under biased, history-dependent perturbations. The key technical challenge is that numerical errors can change freezing decisions and subsequent least-squares directions, while destroying the exact conditional unbiasedness used in prior analyses. We address these interacting effects through a phase-based analysis that controls accumulated conditional drift without requiring proximity to an ideal execution. While our bounds retain the sharp exact-arithmetic quadratic term in the log moment-generating function, we further reveal how the discrepancy quality depends on arithmetic precision, the bit complexity, and the error of the least-squares solver.
(2) Empirical validation. Our experiments illustrate the precision-dependent discrepancy in practical numerical implementations. We show that finite precision can significantly degrade the discrepancy achieved by the Gram-Schmidt Walk, and characterize the sensitivity of this degradation on the precision and matrix conditioning. By measuring empirical discrepancy tails, we evaluate when approximate arithmetic preserves output quality and when it is a limitation.
Algorithmic discrepancy theory. Several lines of work develop efficient randomized constructions for discrepancy minimization. Alweiss et al. (2020) introduced a self-balancing walk with guarantees for online vector balancing (Spencer, 1985; Bansal et al., 2020b; Kulkarni et al., 2024) and the Komlós problem (Spencer, 1994). Bansal et al. (2022) give a stochastic-process framework that recovers several discrepancy bounds, while Deng et al. (2025) accelerate discrepancy minimization through faster implementations of Edge-Walk and hereditary-discrepancy algorithms. Our focus is the arithmetic accuracy needed to preserve the output concentration of a particular balancing algorithm. A different notion of stability appears in Gamarnik et al. (2023), who establish barriers for algorithms whose outputs change little under perturbations of random input instances. Their input-stability condition concerns sensitivity of the selected coloring; our analysis permits changes in the trajectory and terminal coloring while controlling the resulting discrepancy distribution.
Finite precision and numerical stability. Classical numerical analysis relates roundoff error, backward error, and conditioning for linear-system and least-squares computation (Higham, 2002). Recent works make precision requirements explicit in algorithms that repeatedly update linear-algebraic quantities. Ghadiri et al. (2024; 2023; 2026) analyze the backward stability of inverse maintenance and distributed optimization, and derive bit-complexity bounds for regression and linear programming. Diem (2011); Pan (1985); Anand et al. (2024) extend this perspective to dynamic matrix expressions and their determinants. For implementations based on inverse updates, Ma et al. (2026) provide related forward- and backward-error bounds for the Sherman-Morrison-Woodbury formula evaluated with approximate inverses. These results concern the accuracy and cost of numerical subroutines. The Gram-Schmidt Walk additionally requires controlling how these errors interact with adaptive freezing decisions and randomized updates. Our analysis addresses an additional question of how local numerical errors affect concentration when they also change adaptive freezing decisions and conditional update distributions, connecting the working precision and conditioning to conditional drift, accumulated discrepancy error, and ultimately concentration of the terminal coloring, without requiring exact conditional unbiasedness.
Discrepancy in learning and data compression. Karnin and Liberty (2019) connect low class discrepancy to small offline and streaming coresets. Particularly close to our setting, Carrell et al. (2025) analyze subgaussian thinning, introduce Gram-Schmidt-based thinning procedures, and give a cubic-time halving implementation based on local inverse updates. Their framework relates concentration of the balancing primitive to compression quality and supports applications to attention approximation, gradient reordering, and two-sample testing. Discrepancy also informs neural-network weight quantization (Chee et al., 2025) and attention mechanisms (Kochetkova et al., 2026). These applications motivate understanding the precision requirements of balancing algorithms. Our contribution provides a concentration guarantee for an implementation of the Gram-Schmidt primitive. In turn, these guarantees are flexible and can be converted into guarantees for repeated compression or any learning pipeline by propagating the resulting error budget through that procedure.
Algorithm 1: Gram-Schmidt walk (Harshaw et al., 2024)
Initialize and
Choose uniformly from
while do
Create the active set
if then
Sample uniformly at random from
Let and let for all
Set
Let
Sample according to
Set , such that
Increment
return
2 PRELIMINARIES AND NOTATION
We write for . For any vector and we write for the ith entry.
We first review a few key properties of subgaussian random variables and random vectors.
Fact 2.1 (Characterization of subgaussian random variables). For a real-valued random variable X, the following are equivalent up to constant factors in the parameter (Vershynin, 2026):
-
There exists some such that for all ,
-
There exists some such that ,
and for X such that , the following condition is equivalent to the previous two.
- , for all .
A random vector is subgaussian with parameter if all of its unit-direction projections are subgaussian with parameter not exceeding , and for the third formulation given we can equivalently show for a random vector that for all vectors , with the norm of playing the role of the scalar .
Vector Balancing: Suppose we are given , where for , let . Then, the linear discrepancy objective is to output such that is minimized. The Gram-Schmidt Walk samples a coloring whose discrepancy vector has controlled directional tails. This problem has been studied extensively, even in the online setting where only one vector is revealed at a time and signs must be irrevocably assigned (Bansal et al., 2020a). Harshaw et al. (2024) shows that is 1-subgaussian (over the randomness of ).
Gram-Schmidt Walk. The Gram-Schmidt walk (Algorithm 1) achieves its guarantee through an adaptive sequence of randomized updates. At each iteration, it chooses a pivot coordinate, selects a least-squares direction whose pivot entry is one, and moves to one of the two endpoints of the feasible line segment in the unit hypercube with probabilities such that the exact update is conditionally mean 0. Here, coordinates that reach are frozen, and the direction is recomputed over the remaining coordinates. The concentration proof of Harshaw et al. (2024) exploits this probabilistic structure and the orthogonality of the revealed subspaces as the set of possible pivots shrinks.
The canonical result of Harshaw et al. (2024) proves that the outputs are 1-subgaussian.

Figure 1: Finite-precision perturbations in the Gram-Schmidt walk. Left: Exact-arithmetic (solid blue) and finite-precision (dashed orange) walks start from the same point but can follow very different trajectories as coordinates successively freeze. Right: Each finite-precision update differs from the ideal update computed at its current state by a local error due to our tracked error sources.
Theorem 2.2 ((Harshaw et al., 2024)). Let satisfy , and let . Then, for all , the terminal output of the walk in exact arithmetic satisfies
2.1 TECHNICAL CONTRIBUTIONS
We analyze the algorithm under a refined model that takes into account errors in calculating and sampling the step at each iteration, while still remaining general enough to apply across machine configurations and least squares solvers. Our main theorem parameterizes the key sources of error at each step. Appendix B then shows sufficient working-precision conditions for a specified implementation, under explicit assumptions on least-squares stability, conditioning, and exponent range. In particular we consider the error of the least squares solve , the max coordinate error due to approximate arithmetic in computing the step and clamping back into the hypercube , and the perturbation in the distribution of which we denote . We discuss our model in more detail in Section 3.
Note that the introduction of errors due to rounding can affect the path that the Gram-Schmidt walk may take, so the resultant walk may deviate significantly from the original ideal walk. Therefore, simply bounding the deviation from the original walk can lead to very weak guarantees. So, we treat this walk as its own object when bounding its subgaussianity. We show the following bound:
Theorem 2.3. Under the model and assumptions of Section 3, the output vector satisfies the following moment generating function (MGF) bound: for all ,
We provide values for these constants depending on machine configuration in Appendix B. For example, if we assume a floating point machine of unit roundoff u, then as discussed in Lemma B.3 we can show that scales according to the unit roundoff. Furthermore Lemma B.4 discusses how under special conditions, namely a backwards stable solver with full column rank B, we expect to scale with condition number and unit roundoff. This is meant to give an idea for how might scale in some special case rather than to hold in general. Finally, lemma B.6 bounds arithmetic and freezing corrections for a specified implementation. Combining these results, Corollary B.7 gives sufficient significant and sampling precision for a prescribed additive discrepancy penalty.
Finite-precision errors obstruct a direct application of the analysis in Harshaw et al. (2024): they can change the freezing trajectory and destroy the conditional centering on which the phase argument relies. We overcome this by proving a phase MGF bound to explicitly account for accumulated drift along the realized perturbed trajectory, where the key step is to incorporate the pivot-coordinate update error into the scalar step so that its sum over a phase is the actual pivot displacement. This preserves the structure of the terminal displacement while allowing biased conditional probabilities, whose effect we control via a modified backward-induction argument. Combining these drift bounds across orthogonal phase subspaces produces the contribution. The remaining terms follow from pathwise bounds on least-squares and coordinate-update error, including clamping and freezing corrections; hence, our bound keeps the original quadratic MGF term while adding an explicit linear penalty in that vanishes with error to recover the exact-arithmetic guarantee.
We note that this is not a subgaussianity guarantee in itself due to the linear term. Nevertheless, we show that an MGF bound of this form implies subgaussianity in the Orlicz norm formulation giving a subgaussianity result: Lemma A.2 in the appendix implies
and so by the equivalence of the forms of Subgaussianity up to constants we also get Gaussian-like exponential tails on for every unit vector .
Theorem 2.4 (Lower bound for bounded update errors). There exists a universal constant such that, for every integer and every , there is a full-column-rank matrix with and an admissible error process for the Gram-Schmidt Walk, initialized at , such that with , with exact step-selection probabilities, and whose terminal discrepancy satisfies
Here denotes the uncentered directional Orlicz norm. The errors are deterministic functions of the iteration, active set, and current pivot, which preserve all frozen coordinates, and the walk remains feasible and terminates after at most iterations.
The construction proves that the dependence is unavoidable, up to universal constants, for worst-case bias under admissible bounded coordinate errors, even when the least-squares directions and branch probabilities are exact. The same construction lower-bounds the uncentered directional Orlicz norm. This saturation at order is consistent with when .
We also numerically study how arithmetic precision and problem size affect discrepancy, where we illustrate the predicted quadratic accumulation of bounded update errors in Figure 4.
3 FINITE-PRECISION GRAM-SCHMIDT WALK
Because of the numeric issues outlined above, the existing proofs bounding the discrepancy of the Gram-Schmidt walk Bansal et al. (2017); Harshaw et al. (2024) no longer hold. The proof in Bansal et al. (2017) uses Martingales, but these properties are lost due to the errors. The more recent proof from Harshaw et al. (2024) builds on the fact that the exact solution to the L2-minimization problem can be expressed via results from an exact Gram Schmidt orthogonalization procedure. However, this too no longer holds in the presence of errors. Now, we explain the main technical ideas and tools needed to robustify the proof from Harshaw et al. (2024) against numerical issues.
Error Sources in Finite-Precision Model At the realized state , let denote an exact least-squares direction and let denote the computed direction. We state our bounds relative to the realized input. In our framework, we enforce and for , and assume
All errors from the final arithmetic update, clamping, and explicit freezing are collected in , so that . The update preserves feasibility and previously frozen coordinates, freezes at least one additional coordinate, and retains the current pivot until it freezes. Let
We open-source the code for our experiments in the following GitHub repository: https://github.com/emiletimothy/FinitePrecisionGramSchmidtWalk.
denote the computed endpoint magnitudes, so that . For convenience, we cap these magnitudes by downward-rounded pivot distances, ensuring and . Thus, and . Conditioning on the history and all computations preceding the random branch choice, let be the probability that centers the step at the computed endpoints. We assume that the actual positive-branch probability satisfies , so
In this convention, the discrepancy increment decomposes as , where the least-squares contribution has norm at most .
Analysis framework We sketch the main ideas of Harshaw et al. (2024) and explain which pieces break due to numerical issues. We then later explain how to fix them.
Let be the reverse order in which the Gram-Schmidt Walk decides coordinates (that is, when is picked as a pivot or becomes ). Now assume we run Gram Schmidt orthogonalization on the columns of in order and let be the orthonormal vectors produced. We allow for to not be full column rank and so the Gram-Schmidt orthogonalization procedure may produce a zero vector in the sequence; we refer to sets as orthonormal throughout our exposition with the understanding that we refer to the nonzero vectors being discussed. The vectors are not computed and used only for analysis purposes.
We consider the progression of the walk in pivot phases, where is the iteration at which is first selected as pivot. Within a phase, refers to the current pivot column of . When analyzing iteration of the phase for a pivot , let be the set of positions decided in iteration during the pivot phase of . So for the end of pivot 's phase. While pivot is technically decided at the start of iteration , we charge it to iteration , i.e., consists of just the pivot . The proof of Harshaw et al. (2024) heavily relies on the following decomposition:
Lemma 3.1 (Lemma S3.2 in Harshaw et al. (2024)). At each iteration we have for pivot
This is only true for the exact solution and does not hold for the approximation that would be produced by numeric implementation of the algorithm.
Finally, consider the final vector produced in exact arithmetic. Using Lemma 3.1, Harshaw et al. (2024) proves that for any
This is done by splitting the run of the algorithm into phases based on the pivots. For a pivot , let be the iterations where was pivot, and let be all the randomness up to the point that is chosen as pivot. Then Harshaw et al. (2024) proves
which can then be assembled to prove equation 6, with the are orthogonal projection terms accumulating to at most . However, for and the conditional expectation is no longer bounded by 1 because and Lemma 3.1 does not hold for .
Bounding the error. Consider the final vector .
We rearrange the updates as follows:
Here the latter term can be bounded by using the definition of our errors, giving the bound
The calculation is given in Section B.2.
The first term in equation 8 is similar to equation 6 in that it uses the exact , however, the probability is still inexact. As a result, we prove the following weaker bound with a variable upper bounding the drift.
Lemma 3.2. For , the non-noise portion of the updates satisfy the MGF bound
The main difficulty in adapting the proof of equation 6 by Harshaw et al. (2024) to Lemma 3.2, is the reliance on the distribution of within a pivot phase being a two point distribution, which no longer holds due to noise along the pivot unit. The high-level idea of our proof is that, while equation 7 does not hold, it does hold after adding some penalty term such that
The main difficulty is to find a large enough for which the inequality holds, but not too large to get a bound weaker than Lemma 3.2. The full proof is long and can be found in Sections B.1 and B.3, but it turns out that for , and is large enough. We further have
where is the orthogonal projection matrix onto the decided in pivot phase . This yields the additional term in Lemma 3.2. Assembling these two bounds on equation 8 then yields Theorem 2.3.
4 NUMERICAL EXPERIMENTS
Compute. Our walks run in parallel; we use a process pool with per-worker SeedSequence streams and single-threaded BLAS. The per-operation rounding makes the low-precision path slower than float64's. Our main figures use 1000 walks per cell on a 6-core laptop (1-3 CPU-hours).
Matrices. We use four matrix ensembles.
(i) Clustered. , with a random unit vector and Gaussian, column-normalized. The columns concentrate near a shared direction, which makes increasingly ill-conditioned as the active set shrinks through ,
(ii) Higgs. The two low-level angular-momentum features of the Higgs two-sample benchmark used in low-rank thinning (Carrell et al., 2025), giving a matrix,
(iii) Identity. , a tight control in which is a Rademacher sum with .
(iv) Adversarial lower bound. Columns , where a bounded per-step error applied to non-pivot coordinates in the first iterations forces an -discrepancy of order .
Arithmetic model. Our main sweeps emulate reduced precision in float64: every elementary operation rounds its significand to b retained fraction bits (round-to-nearest), where b is the number of stored fraction bits. Here, we use the format labels fp8-E5M2, bf16, and fp16 to denote the matching fraction width (b = 2, 7, 10). Similarly, reductions (inner products, norms, matvecs) round each product but accumulate in float64, rounding the result once.
Subgaussianity vs n — higgs B (2x.), 1000 walks

Figure 3: Subgaussianity vs. n across fp formats on the Higgs matrix. Left: the centered moment diagnostic and empirical norm, evaluated in a direction selected using an independent half of the walks. The lowest precisions exhibit substantial growth with n, while higher-precision curves show much weaker dependence on n. Middle: evaluation-set frequencies of ; the dashed line is the ideal unit-subgaussian reference. Right: the median centered moment diagnostic over tested directions, with a 10–90% directional band. The rising median at the lowest precisions shows deterioration across a substantial portion of the tested directions.

Figure 4: Scaling collapse. Left: on the Higgs matrix, is described by a single curve in . Right: on the lower-bound matrix, follows (dashed) in the degraded regime and departs from it where the bound saturates near or falls to the float64 plateau; open markers violate .
The least-squares solve reads the b-bit rounding of the input, corresponding to significant bits and unit roundoff bits, while the experiments of Appendix D.1 use the actual dtypes.
Metrics. For each main-sweep configuration, we run 1000 independent walks. Discrepancy. We report the sample mean of and the empirical CCDF of on squared-threshold, log-survival axes. Directional concentration. Across our sweeps, we use half of the walks to select a direction maximizing a centered moment diagnostic based on orders 2, 4, 6. Using the remaining walks, we evaluate this diagnostic, the empirical norm, and centered exceedance frequencies in the selected direction. Error bars describe five-batch variability as detailed in Appendix D. Solver error. We follow a float64 reference trajectory and recompute directions in low precision at identical states, recording by the number k of free nonpivot indices. We summarize these coefficient errors using their

Figure 2: Estimated subgaussianity over the plane. Each cell is , where the direction is selected via independent walks on the Higgs matrix. The float64 reference plateau goes to 8 mantissa bits at small and ends along the curve . Above it, grows along lines of constant .
median, interquartile range, and mean.
Findings. At fixed precision, our experiments show that the discrepancy inflation generally grows with the number of vectors n, with the strongest deterioration occurring at the lowest precisions.
Increasing the number of retained bits mitigates this growth and brings the empirical discrepancy statistics closer to the float64 reference, suggesting that larger instances need higher precision to maintain comparable performance.
Implementation details. We compare fp16/fp32 implementations of Householder QR least squares, the GSWDESIGN Cholesky/Woodbury scheme, and the explicit-inverse Sherman-Morrison scheme from low-rank thinning's cubic walk, using common random draws. On the tested instances, QR is the most robust, with median image error less sensitive to conditioning than coefficient error. Refactoring every ten steps reduces fp16 Cholesky downdate failures to at most 1.75%, but inflation persists among successful runs. The explicit-inverse scheme is more sensitive to ill-conditioning, matching the squared conditioning of Gram matrices where of full-rank .
5 CONCLUSION
We analyze the Gram-Schmidt Walk under bounded, potentially biased and history-dependent perturbations. We show a concentration bound that separates least-squares image error, coordinate-wise update error, and conditional sampling error while retaining the exact-arithmetic quadratic term in the log-MGF. We also give a full-column-rank construction that produces a bias of order , which shows that a quadratic accumulation of update error is unavoidable before saturation. Finally, our experiments corroborate our theoretical findings on how numerical discrepancy varies with fixed precision and problem size.
ACKNOWLEDGEMENTS
We thank Abhishek Shetty, Albert Weng, Daniel Zhang, and Mehrdad Ghadiri for insightful discussions on this work. Emile Anand is supported by NSF Grants CCF 2338816, and Jan van den Brand is supported by NSF Grants CCF 2338816 and CCF 2504994.
AI DISCLOSURE
In this work, we disclose the use of Cognition’s Devin agent to help run our suite of experiments, and we used Anthropic’s Claude Fable 5.1 model to suggest improvements on an earlier version of the theoretical result. We have reviewed all AI-assisted work. LLM-generated code was verified and tested for correctness, and we take responsibility for all the final content of this work.
ETHICS STATEMENT
This work studies the worst-case numerical reliability of the Gram-Schmidt Walk, an algorithm for vector balancing. By quantifying the effects of finite precision, our results support more reliable use of discrepancy-based methods and clarify circumstances in which numerical errors can compromise output quality. Applications involving experimental design or data compression require separate consideration of data privacy, representativeness, and the consequences of the resulting decisions.
REPRODUCIBILITY STATEMENT
The theoretical assumptions and perturbation models underlying our theoretical guarantees are specified in the main body, with proofs provided in the appendices. Our experimental setup describes our instance generation, dataset preprocessing, solver and factorization-maintenance procedures, numerical precision settings, random seeds, and evaluation metrics. To support reproduction of the finite-precision experiments, we document the arithmetic and accumulation precisions, explain our compute setup, and provide our code with thorough documentation.
REFERENCES
Ryan Alweiss, Yang P. Liu, and Mehtaab Sawhney. Discrepancy minimization via a self-balancing walk, 2020. URL https://arxiv.org/abs/2006.14009.
Emile Anand, Jan van den Brand, Mehrdad Ghadiri, and Daniel J. Zhang. The Bit Complexity of Dynamic Algebraic Formulas and Their Determinants. In Karl Bringmann, Martin Grohe, Gabriele
Puppis, and Ola Svensson, editors, 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024), volume 297 of Leibniz International Proceedings in Informatics (LIPIcs), pages 10:1–10:20, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. ISBN 978-3-95977-322-5. doi: 10.4230/LIPIcs.ICALP.2024.10.
Emile Anand, Abdullah Ateyeh, Archer Wang, and Marin Soljačić. SMat-Attention: Structured Long-Context Sequence Modeling, 2026a. URL https://arxiv.org/abs/2609.36062.
Emile Anand, Jan van den Brand, and Rose McCarty. The structural complexity of matrix-vector multiplication, 2026b. URL https://arxiv.org/abs/2502.21240.
Wojciech Banaszczyk. Balancing vectors and gaussian measures of n-dimensional convex bodies. Random Struct. Algorithms, 12(4):351–360, July 1998. ISSN 1042-9832.
Nikhil Bansal, Daniel Dadush, Shashwat Garg, and Shachar Lovett. The gram-schmidt walk: A cure for the banaszczyk blues, 2017. URL https://arxiv.org/abs/1708.01079.
Nikhil Bansal, Haotian Jiang, Raghu Meka, Sahil Singla, and Makrand Sinha. Online discrepancy minimization for stochastic arrivals, 2020a.
Nikhil Bansal, Haotian Jiang, Sahil Singla, and Makrand Sinha. Online vector balancing and geometric discrepancy, 2020b. URL https://arxiv.org/abs/1912.03350.
Nikhil Bansal, Aditi Laddha, and Santosh S. Vempala. A unified approach to discrepancy minimization, 2022.
Annabelle Michael Carrell, Albert Gong, Abhishek Shetty, Raaz Dwivedi, and Lester Mackey. Low-rank thinning. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 6811–6848. PMLR, 2025.
Bernard Chazelle. The Discrepancy Method: Randomness and Complexity. Cambridge University Press, Cambridge, UK, 2000. ISBN 9780521770934.
Bernard Chazelle. The discrepancy method in computational geometry. In Handbook of Discrete and Computational Geometry, 2nd Ed., 2004.
Jerry Chee, Arturs Backurs, Rainie Heck, Li Zhang, Janardhan Kulkarni, Thomas Rothvoss, and Sivakanth Gopi. Discquant: A quantization method for neural networks inspired by discrepancy theory, 2025.
Daniel Dadush, Shashwat Garg, Shachar Lovett, and Aleksandar Nikolov. Towards a constructive version of banaszczyk's vector balancing theorem, 2016.
Daniel Dadush, Aleksandar Nikolov, Kunal Talwar, and Nicole Tomczak-Jaegermann. Balancing vectors in any norm. In 2018 IEEE 59th Annual Symposium on Foundations of Computer Science (FOCS), pages 1–10. IEEE, 2018.
Yichuan Deng, Xiaoyu Li, Zhao Song, and Omri Weinstein. Discrepancy minimization in input-sparsity time. In Forty-second International Conference on Machine Learning, 2025.
Josef Dick and Friedrich Pillichshammer. Discrepancy theory and quasi-monte carlo integration. In A panorama of discrepancy theory, pages 539–619. Springer, 2014.
Claus Diem. On the notion of bit complexity. Bull. EATCS, 103:35–52, 2011.
Friedrich Eisenbrand, Dömötör Pálvölgyi, and Thomas Rothvoß. Bin packing via discrepancy of permutations, 2012. URL https://arxiv.org/abs/1007.2170.
David Gamarnik, Eren C Kizildağ, Will Perkins, and Changji Xu. Geometric barriers for stable and online algorithms for discrepancy minimization. In The Thirty Sixth Annual Conference on Learning Theory, pages 3231–3263. PMLR, 2023.
Mehrdad Ghadiri, Richard Peng, and Santosh S. Vempala. The bit complexity of efficient continuous optimization. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 2059–2070, 2023. doi: 10.1109/FOCS57990.2023.00125.
Mehrdad Ghadiri, Yin Tat Lee, Swati Padmanabhan, William Swartworth, David P. Woodruff, and Guanghao Ye. Improving the bit complexity of communication for distributed convex optimization. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, page 1130–1140, New York, NY, USA, 2024. Association for Computing Machinery. ISBN 9798400703836. doi: 10.1145/3618260.3649787.
Mehrdad Ghadiri, Hoai-An Nguyen, and Junzhao Yang. Entrywise approximation for matrix inversion and linear systems. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 5199–5210. SIAM, 2026. doi: 10.1137/1.9781611978971.189.
Luc Giraud, Julien Langou, Miroslav Rozložník, and Jasper van den Eshof. Rounding error analysis of the classical Gram–Schmidt orthogonalization process. Numerische Mathematik, 101(1):87–100, 2005. doi: 10.1007/s00211-005-0615-4.
Simone Göttlich, Jacob Heieck, and Andreas Neuenkirch. Using low-discrepancy points for data compression in machine learning: An experimental comparison, 2024.
Christopher Harshaw, Fredrik Sävje, Daniel A. Spielman, and Peng Zhang. Balancing covariates in randomized experiments with the gram–schmidt walk design. Journal of the American Statistical Association, 119(548):2934–2946, 2024. doi: 10.1080/01621459.2023.2285474.
Nicholas J. Higham. Accuracy and Stability of Numerical Algorithms. Society for Industrial and Applied Mathematics, second edition, 2002. doi: 10.1137/1.9780898718027.
Zohar Karnin and Edo Liberty. Discrepancy, coresets, and sketches in machine learning, 2019.
Ekaterina Kochetkova, Kshiteej Sheth, Insu Han, Amir Zandieh, and Michael Kapralov. Streaming attention approximation via discrepancy theory, 2026.
Janardhan Kulkarni, Victor Reis, and Thomas Rothvoss. Optimal online discrepancy minimization. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, page 1832–1840, New York, NY, USA, 2024. Association for Computing Machinery. ISBN 9798400703836. doi: 10.1145/3618260.3649720.
Lap Chi Lau, Robert Wang, and Hong Zhou. Spectral sparsification by deterministic discrepancy walk. In 2025 Symposium on Simplicity in Algorithms (SOSA), pages 315–340. SIAM, 2025.
Edo Liberty, Alexandr Andoni, and Eldar Kleiner. Nearly optimal attention coresets, 2026.
Andrzej Lingas. Boolean matrix multiplication for highly clustered data on the congested clique, 2024. URL https://arxiv.org/abs/2405.16103.
Linkai Ma, Christos Boutsikas, Mehrdad Ghadiri, and Petros Drineas. A note on the stability of the sherman–morrison–woodbury formula. SIAM Journal on Matrix Analysis and Applications, 47(2):702–723, 2026. doi: 10.1137/25M1747087.
V. Ya. Pan. The bit complexity of matrix multiplication and of related computations in linear algebra. the segmented algorithms. Computers & mathematics with applications, 11(9):919–928, 1985.
Yixin Ren, Chenghou Jin, Yewei Xia, Zichuan Lin, Deheng Ye, Hao Zhang, Jihong Guan, and Shuigeng Zhou. Streaming covariate balancing via discrepancy-based feature coresets. In Forty-third International Conference on Machine Learning, 2026.
Joel Spencer. Six standard deviations suffice. Transactions of the American Mathematical Society, 289(2):679–706, 1985. doi: 10.1090/S0002-9947-1985-0784009-0.
Joel Spencer. Ten lectures on the probabilistic method. SIAM, 1994.
Roman Vershynin. High-Dimensional Probability: An Introduction with Applications in Data Science. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 2 edition, 2026.
Lingao Xiao, Songhua Liu, Yang He, and Xinchao Wang. Unifying dataset pruning and distillation for efficient large-scale compression, 2026.
Outline of the Appendix
• Appendix A collects auxiliary lemmas used in our concentration analysis.
• Appendix B.1 gives an analysis of the single pivot phases.
• Appendix B.2 proves Theorem 2.3 by combining the phase concentration estimates with bounds on the accumulated numerical errors.
• Appendix C presents our lower-bound construction and establishes the worst-case bias caused by bounded update errors.
• Appendix D describes our experimental setup and provides additional numerical results.
A AUXILIARY LEMMAS
We now state a lemma from Harshaw et al. (2024) to be used in our adapted proof, to allow us to bound the expectation of a certain MGF quantity.
Lemma A.1 (Lemma S3.5 in Harshaw et al. (2024)). For all the function
is monotone decreasing with respect to the Loewner order on the cone of positive semidefinite matrices: if , then .
Lemma A.2 (MGF Bound to Orlicz Norm). Let . If a random vector satisfies an MGF bound of the form
for all and some then we have that .
Proof. Recalling that we define the Orlicz norm of a random vector as the supremum of the Orlicz norm over its one dimensional scalar projections, fix some and let . We will ultimately show that . Observe that because satisfies the above MGF bound we have, for any ,
and therefore by applying Markov's inequality in the MGF we get
and choose to get the following bound for :
From here we define such that . Observe that for we have
which allows us to show the claimed bound on the MGF of via an application of the layer cake representation to first bound the MGF of . Let be chosen later, considering the function we have
where the final step holds for . To make this at most 2 we set which makes the above expression equal 2, ensuring convergence of the above integral. This gives .
To conclude the proof we use that pointwise implying and so
where we used the triangle inequality followed by the boundedness of a in the final two steps. ☐
B MISSING PROOFS
B.1 SINGLE PIVOT PHASE ANALYSIS (PROOF OF LEMMA 3.2)
Our proof follows the same structure as in Harshaw et al. (2024). To prove Lemma 3.2, which states
we want to split the sum into separate phases based on the used pivots . We regard the pivot phase using pivot as starting in iteration . For we let be the set of all positions decided in iteration during the pivot phase of . While is technically decided in iteration , for analysis we count it in . Further, for every after the iteration in which is frozen.
Let be all the randomness up to the start of iteration point when is picked as the pivot (the choice of is included in ). We will analyze the contribution of pivot 's phase to equation 9 by analyzing its contribution conditional on . In particular, given that conditioning, , , are fixed. Technically, the end of the pivot 's phase is random, but for analysis is would be easier if it were fixed. To do this, we define , and = 0 for outside the phase. Thus we can take the sum for fixed end point such that
is the contribution of pivot 's phase to the sum in equation 9. In particular, a sum over the pivot phase is written and a sum over the positions decided in the phase is written . For the later we use that for outside the pivot's phase.
We reuse the notation to denote and , and we use to denote , the current position in along the pivot unit when it improves notational clarity. Let be the projection matrix onto the span( decided during pivot 's phase})
Lemma B.1. For a pivot p and we have
Before proving Lemma B.1, we show that it implies Lemma 3.2. In particular, Lemma B.1 can be seen as the contribution of pivot phase p to equation 9/Lemma 3.2.
Proof of Lemma 3.2.
(10)
where the first inequality holds pointwise because , as the project onto mutually orthogonal subspaces, and because by Cauchy–Schwarz
using orthonormality of the and which holds deterministically.
Let
then by conditioning on and Lemma B.1 we get for any that and thus
Inductively this implies . As in Harshaw et al. (2024) we note that the result holds for any fixed pivot ordering so we are free to take the above ordering for notation, with the full result following from a marginalization over all orderings.
At last, since equation 10 is bounded by 1, rearranging shows
as desired.
Proof of Lemma B.1. By applying Lemma 3.1 and linearity we have for pivot , and that the set of where position is decided in pivot phase is an orthonormal basis for the subspace projects into, implying and . This yields
To prove Lemma B.1, this expression must be bounded by 1.
For let us define
Observe that recovers the same expression, since for every . We will prove that which then implies Lemma B.1.
Since is determined by , every summation range above is deterministic under this conditioning. We note that we're progressing not over the contributions to the MGF at each timestep in the pivot phase but rather over which decided positions we consider for the terms involving . We first point out that , as the first summation
is identical for and ; every satisfies . The other two summations in the above expectation only increase in absolute value as we sum over more terms, and so we have . We now proceed to show for we have , with the final inequality to be shown later via a similar technique.
Proving : We claim it suffices to show that for any such we have
where we use to denote randomness up to and including iteration (so it includes ), and the shorthand with having the same summation but with the inner term being or respectively. The expectation on the left matches except that the first summation considers only iterations , for which , and so all of the summations in the expectation involve the same terms.
To show the above inequality, we observe that the only randomness under this conditioning is in the realization of the .
Note that this sum must take values in , where is the position of the pivot coordinate after iteration : by our convention each coefficient is the pivot increment , so the sum telescopes to with . In the case where is mean zero a calculation gives that the distribution takes value with probability , however we don't assume that the noise terms are mean zero. We do however know that they are bounded and therefore have bounded mean conditioned on and so we introduce to stand in for , assuming that we take value with probability where . Here holds for by Lemma B.2. We can therefore take expectations and rearrange to get
where in the last step we used and , factoring out . This gives that
We note that as it corresponds to the probability of a certain event and so so is defined. We can therefore apply lemma A.1 as for any the matrix is positive semi-definite and so is a sum of positive semi-definite matrices.
We can therefore split off the final term of the summation common to and apply the fact f is operator monotone decreasing to get
where we can now use a similar manipulation to factor out to exchange the inner uses of with , matching the expression for the original expectation.
Note that we have by Lemma B.2, and so by the definitions of we have . This gives
as desired. Having established this inequality we proceed to show as discussed. We will apply iterated expectations and condition on the first iterations of the algorithm, applying the lemma to the inner expectation, noticing that the resulting expression recovers exactly. We have
an check that in the outer summation the index ranges up to , whereas in the inner summation it ranges up to , allowing us to recombine as follows:
\begin{align*}&-\frac{1}{2}\left(\sum_{s=t_{p}-1}^{R-1}\sum_{r\in Q_{s,p}}\alpha_{r}^{2}\right)\left(\sum_{s=t_{p}-1}^{R-1}\sum_{r\in Q_{s,p}}\beta_{r}^{2}\right)-\gamma\sum_{s=t_{p}-1}^{R-1}\sum_{r\in Q_{s,p}}\left|\alpha_{r}\beta_{r}\right|\right)\Bigg|\Delta_{p}\Bigg]\\&=g(R-1)\end{align*}as claimed. We remark that the case can be shown with the same argument as above, without needing to apply iterated expectations as this iteration only counts the pivot as decided. In particular, with we have
which completes the proof.
☐
B.2 PROOF OF THEOREM 2.3
Proof of Theorem 2.3. As discussed in equation 8 we can rewrite our output as
where we are able to use a modified version of the proof in Harshaw et al. (2024) to bound the MGF of the first term. We use as an upper bound on the infinity norm of , deferring the choice of a concrete constant. Considering the remaining terms observe that we have
and from here we note that by the fact is some projection of the pivot unit, and which together with the fact gives
which implies that by the Cauchy-Schwarz inequality where is the split of error term discussed in 3. This allows us to show
by applying the above bound on the terms, followed by lemma 3.2. As will be shown in section B.3, we can choose to get a bound of
B.3 CHOOSING CONSTANTS
We now discuss how to choose the constant used in our result and how to further decompose to give a more precise characterization of error in terms of machine dependent quantities.
Lemma B.2. For each iteration within a pivot phase for pivot , defining such that we have where , and in the ideal algorithm the corresponding probability is .
Proof. Focusing first on , we previously stated that is our upper bound on where is defined such that the probability that takes value , conditional on , is . We now motivate this definition further and elaborate on how we arrive at our concrete choice of .
Recall that, conditioned on , obeys a two point distribution, taking values in . Therefore if we use to denote its conditional mean, we can write for some that
and therefore . Setting gives that and so our assumption of is therefore equivalent to assuming that . Put another way, is simply a notational alternative to writing throughout the proof, emphasizing that it is the result of perturbing (which would be the value in the infinite precision case) slightly due to noise.
We now discuss the value of . To provide a value for it suffices to bound
Let contain the history and all computations preceding the random branch choice at iteration , and let contain the history through the completed update at iteration . Thus and for . Write for the indicator that iteration belongs to the phase of pivot , noting that this indicator is -measurable. Before termination, differs from the probability centering the computed endpoints by at most , so
After termination the padded step has zero conditional mean. Moreover, , including when the update error depends on the sampled branch. Therefore,
The tower property and the triangle inequality now give
Since , this proves for .
Lemma B.3 (Bounding sampling error, arithmetic error, in terms of machine precision). On a floating point machine with b random bits, we have for unit roundoff u.
Proof. We note that in the following discussions refers to unit roundoff while is the step direction at time . In the following discussion we condition on the history and all computations preceding the random branch choice at iteration . Let , where , , and . Here, is the exact ratio of the stored endpoint magnitudes, and it hence centers the step at the computed endpoints.
We assume binary floating-point arithmetic with significant bits (including the leading bit), rounding to nearest, and no overflow or underflow in the operations below. Here the unit roundoff is . Compute , , and .
Then, by the standard floating-point model (in Higham's lemma, (Higham, 2002)), there exists with such that . Since clipping to cannot increase the error and , for we have
To sample using fresh independent unbiased random bits, form exactly, draw uniformly from independently of the conditioned history, and choose the positive branch if . The resulting conditional positive-branch probability is , so we have that . Then, the triangle inequality therefore gives, uniformly over all iterations and histories, that
Therefore, we can set .
Lemma B.4 (Least-squares image error from backward stability). Suppose that has full column rank and for every . Write . At iteration , let , and . The exact nonpivot coefficients solve . Suppose that the computed coefficients satisfy the following normwise backward-error guarantee, uniformly over all iterations and execution histories: for some perturbations , ,
where and , where is deterministic. Form , by placing , on , setting the pivot entry to one, and setting all inactive entries to zero. If , then we have that for every , where
In particular, if , one may instead take .
Proof. We clarify that the assumptions of full column rank on and backwards stability in solvers are not true in general and that this result is meant to provide an example for what scales like in certain scenarios. In particular the Higgs matrix in the experiments is an example of a wide matrix that lacks full column rank. When , both directions equal the pivot unit vector and the image error is zero. Otherwise, suppress the iteration index and write , , and . Since consists of columns of , we have that , with and . Thus , and
Let P and be the orthogonal projectors onto the column spaces of M and . These spaces have equal dimension, so the equal-rank projector identity gives
where denotes the Moore-Penrose pseudoinverse and . Then, least-squares optimality gives , , and .
Hence, we have that
where we used , , and , which completes the proof. The simplified bound comes from substituting .
Remark B.5. For a solver whose backward-error guarantee is , with the dimension-dependent factor chosen uniformly over all active systems, the sufficient precision condition therefore permits . Its contribution to the linear term in Theorem 2.3 is bounded by
In particular the discussion in B.3, B.4 and the relevant discussions imply a bound of
Finally, we prescribe bit prescriptions in order to guarantee an error of at most in the Gram-Schmidt walk in Corollary B.7. For this, we introduce the following helpful lemma below.
Lemma B.6 (Arithmetic and freezing error). Let be the unit roundoff of binary arithmetic with significant bits, including the leading bit. Assume no overflow or underflow in the operations below. Write RN for rounding to nearest and RD for rounding toward . Then, at a stored state , let be the stored direction, with pivot entry one and zero entries outside the active set. For each branch and active coordinate with , compute
Set and , where both endpoints are computed before choosing the branch. After choosing branch , set and compute, coordinatewise,
Clip these values to , and set . Any additional snapping to an endpoint is permitted only when it changes the clipped value by at most . Here, previously frozen coordinates are left unchanged, and additional snapping is applied only to active coordinates. Then the update is feasible, freezes at least one additional coordinate, and satisfies and . Moreover, with and .
Proof. Fix a branch and define the exact boundary distances
Each downward rounding of a positive normal result loses at most a relative , so . Therefore , and is feasible. The pivot entry gives the stated endpoint caps. At the selected binding coordinate, the distance between and the endpoint used for explicit freezing is at most .
For every other updated coordinate, feasibility gives and . The rounded multiplication and addition therefore incur total absolute error at most . Clipping cannot increase the distance to . Additional snapping contributes at most . Combining these bounds proves the claim.
Corollary B.7 (Sufficient significant precision). Assume , that is exactly representable at the working precision, and use the implementation of Lemma B.6, retaining each pivot until it freezes. Suppose the least-squares solver satisfies, uniformly over all iterations and execution histories, and , where is a deterministic constant from the solver's backward-error bound, and is a uniform conditioning bound for the active systems. Compute and sample the branch probability as in Lemma B.3, using fresh unbiased random bits at each iteration. Let
For any target additive penalty , it suffices to choose
and
Then the linear MGF penalty in Theorem 2.3 satisfies . In particular, for every , we have
Proof. Since , Lemma B.3 gives
Substituting this bound, the assumed least-squares bound, and into Theorem 2.3 yields
The prescribed choices bound each term by . The discrepancy guarantee follows by applying the MGF bound to each signed coordinate direction, optimizing the Chernoff parameter, and taking a union bound, which completes the proof.
Remark B.8. For fixed and , these sufficient requirements have the orders
where L counts significant bits including the leading bit.
C LOWER BOUND
Theorem C.1 (Lower bound for bounded update errors). There exists a universal constant such that, for every integer and every , there is a full-column-rank matrix with and an admissible error process for the Gram-Schmidt Walk, initialized at , such that with , with exact step-selection probabilities, and whose terminal discrepancy satisfies
Here denotes the uncentered directional Orlicz norm. The errors are deterministic functions of the iteration, active set, and current pivot, which preserve all frozen coordinates, and the walk remains feasible and terminates after at most iterations.
Proof. Let be the standard basis of , and for all , set . We use a zero index based notation here for convenience; this convention is local to the lower bound. Each column has Euclidean norm one, and
is positive definite, so B has full column rank.
We first identify the exact update direction. For an active set of size and pivot , every feasible direction satisfies and for . Moreover,
Minimizing this strictly convex quadratic gives for and . In particular, we have . Set with . Writing and for the active set and pivot before iteration , define
Thus , and the errors vanish on the pivot and all previously frozen coordinates.
We now verify via mathematical induction that during the first iterations, both feasible endpoints are determined by the pivot and exactly that coordinate freezes. We argue by induction. Suppose this holds before iteration , so that . The two candidate pivot endpoints correspond to signed steps and , each of magnitude at most two.
Any has been an active non-pivot coordinate in every preceding iteration: a previous pivot would already have frozen. Hence, for either candidate step, its ideal updated value and its perturbed updated value both have absolute value at most
Previously frozen coordinates remain unchanged, while the pivot reaches 1 or -1 and receives zero error. Therefore both candidate endpoints are feasible before and after adding the error. Since extending either candidate step would move the pivot outside the cube, these are precisely the exact feasible endpoints. Every other active coordinate remains strictly interior, so exactly the pivot freezes. This completes the induction. After iteration , all errors vanish and the algorithm continues as an exact Gram-Schmidt Walk. Thus the entire process is admissible and terminates at some . Now, it remains to bound the accumulated discrepancy. Let
We condition on the history before selecting the step, including the current pivot. The exact step-selection probabilities ensure that . Since is determined by this history, each ideal discrepancy increment has conditional mean zero. Padding terminated runs with zero updates therefore gives
For , we have and . Consequently,
Furthermore, , which proves the lower bound on as is a unit vector. Finally, for every , Jensen's inequality gives
Using , it follows that
which completes the proof.
D EXPERIMENTAL DETAILS
For the distributional experiments in Figures 5–7, we generate independent walks per configuration, parallelized across CPU processes on a six-core laptop with single-threaded BLAS. Let denote the finite set of tested unit directions, and write , where is the original input matrix. We split the walks into disjoint selection and evaluation sets, and , of equal size. For either set , define , and the centered moment diagnostic
We select and report . The evaluation walks are independent of those used to select the direction. In particular, need not maximize the evaluation-set diagnostic. On the evaluation set, we also compute the empirical Orlicz statistic
by bisection, and the centered exceedance frequency
Directional medians and 10–90% bands summarize . Evaluation-set means are used separately to measure bias.
Interpretation and uncertainty. The statistics we compute in our experiments are finite-sample diagnostics over a finite direction set, and hence they cannot exactly certify population subgaussian parameters or maximize over the entire unit sphere. Similarly, the moment diagnostic uses orders 2, 4, 6 and is Gaussian-calibrated, so its population value for is . The Orlicz norm uses a different normalization. For , , whereas a symmetric Rademacher variable has Orlicz norm . The error bars in the main sweeps show the standard deviation of five batchwise maxima over the tested directions. The batches use evaluation samples centered by their full evaluation-set means. The standardized-tail experiment in Figure 6 uses a separate descriptive protocol. It computes uncentered moment diagnostics on all walks, selects the maximizing tested direction, and rescales that direction’s empirical survival curve using its diagnostic from the same samples. Figure 6 therefore describes the observed normalized tail shape.
Discussion. Figure 5 shows that the centered directional diagnostics decrease as precision increases and then approach a plateau; its directional bands describe variation across tested directions. Figure 6 compares empirically rescaled, uncentered survival curves across problem sizes and suggests similar behavior over part of the observed range, without establishing a common population tail law. Figure 7 compares rounding with independently injected noise and explores candidate rescalings. Finally, Figure 8 uses 150 walks with m = 2, n = 200, and five retained fraction bits. Along each float64 reference trajectory, we recompute directions in low precision at identical states and summarize their coefficient differences by the number of free nonpivot coordinates. The median and interquartile ranges reveal a pronounced error spike near k = m.
Input representation. Let be the original input and its working-precision representation. As the experiments start at , we have . So, discrepancy measured against includes input-representation error as well as discrepancy relative to the represented matrix.
Combined bias and fluctuation diagnostic. For the scaling-collapse plots, define
These terms may correspond to different directions. So, combines centered fluctuations and bias, rather than estimating the Orlicz norm or uncentered moment diagnostic of a single projection, such that .
Subgaussianity vs mantissa bits — higgs B (2x500), 1000 walks

Figure 5: Worst-direction vs. mantissa bits at fixed . The plateau ends near . Three one-parameter fits describe the low-precision side nearly equally well; of these, the quadrature form is the one consistent with the -sweep. The dotted norm sits about above the moment estimate throughout. Right: the median and 10–90% direction band.
Adversarial stress test. Figure 4 is a numerical stress test on Theorem 2.4: we inject on active non-pivot coordinates for the first steps without the cap (violated cells are drawn as open markers), and directions, probabilities, and updates are rounded at bits rather than exact. In our simulations, runs may also terminate within steps with unfrozen coordinates, on which we still report . It thus measures adversarial bias combined with rounding error.
Worst-direction tail shape vs n — standardised by (higgs B, 1000 walks)

Figure 6: Standardized empirical tails at two and three retained fraction bits for . We plot using the direction and scale selected from the same samples. The dashed curve is , which we use as a reference envelope. The curves show broadly similar behavior over part of the observed range, with deviations in the empirical far tail.
Rounding vs matched additive noise — higgs B, 1000 walks

Figure 7: Rounding is not additive noise. Solid curves run the walk’s arithmetic at b mantissa bits, dashed curves inject i.i.d. noise of the same magnitude per step. Rounding is reused coherently and grows like , so the cells collapse on the axis (middle). Independent noise accumulates like and does not collapse (right).
GSW step-landing error vs free-set size — higgs m=2, n=200, sig_bits=5, 150 samples

Figure 8: Coefficient differences on the float64 reference trajectory (150 walks, , , 5 mantissa bits). The error stays a small fraction of the unit roundoff for most of the walk, then spikes by orders of magnitude when the free set reaches and becomes nearly singular. We show the median and IQR because the rare blowups dominate the mean. This diagnostic compares coefficient vectors, not the image-error quantity , and it is evaluated on reference rather than perturbed trajectories.
D.1 DTYPE-BASED SOLVER COMPARISONS
In this subsection, a walk is classified as failed if it encounters a nonfinite direction or branch probability, a Cholesky or rank-one downdate breakdown, or exhausts the step budget before reaching a complete signing. The experiments we provide here use dtype-based float64, float32, and float16 arithmetic, including pairwise reductions in the selected dtype. The test families comprise Gaussian matrices, matrices with controlled condition numbers, near-collinear column pairs, and Harshaw
Worst-direction uncentered scale across ensembles

Figure 9: Worst-direction uncentered scale (1000 walks per cell, 64 directions). Top: clustered matrix : (left), vs at 6 precisions (fp64 black) (right) vs mantissa bits at , and the shaded band shows standard deviations of five batchwise direction-maxima of . The precision knee at matches the scaling observed on Higgs. Bottom: identity matrix is a degenerate control: is orthogonal to the active block, so the least-squares step is exact at every precision and is flat across and bits.
| n | Solver | Attempts | Failures | Fail. (%) | Successes | |
|---|---|---|---|---|---|---|
| 50 | QR | 2000 | 0 | 0.00 | 2000 | 0.756 |
| 50 | Cholesky | 2000 | 1948 | 97.40 | 52 | 1.24 |
| 50 | Cholesky, k = 10 | 2000 | 0 | 0.00 | 2000 | 1.37 |
| 50 | Explicit inverse | 2000 | 0 | 0.00 | 2000 | 0.754 |
| 200 | QR | 1000 | 0 | 0.00 | 1000 | 0.653 |
| 200 | Cholesky | 2000 | 2000 | 100.00 | 0 | — |
| 200 | Cholesky, k = 10 | 2000 | 1 | 0.05 | 1999 | 6.72 |
| 200 | Explicit inverse | 2000 | 0 | 0.00 | 2000 | 1.19 |
| 500 | QR | 20 | 0 | 0.00 | 20 | 0.582 |
| 500 | Cholesky | 2000 | 2000 | 100.00 | 0 | — |
| 500 | Cholesky, k = 10 | 2000 | 35 | 1.75 | 1965 | 19.2 |
| 500 | Explicit inverse | 300 | 0 | 0.00 | 300 | 3.36 |
Table 1: Float16 solver comparisons on correlated Harshaw designs with and . QR recomputes the least-squares direction from scratch; denotes Cholesky refactoring every ten steps. is the maximum empirical Orlicz estimate over 20 fixed random unit directions and the top and bottom left singular-vector directions, using only successful walks. A dash indicates no successful walks. The QR estimate at uses 20 walks.
designs, with . Attempted sample counts vary by solver and configuration. The repository reports 6.9 hours of wall-clock time with 32 workers and 211 CPU-hours of walks for the EPYC grid; this compute budget is separate from that of the main precision sweeps.
Here, the failure rates include all attempted walks. Orlicz and bias diagnostics exclude failed walks and therefore describe outputs conditional on successful execution, and discrepancy is evaluated using the original float64 matrix. Table 1 reproduces selected configurations from the stored EPYC-grid summaries, and the complete configuration tables are provided in the repository. For these configurations, refactoring substantially reduces the observed failure rate but does not eliminate discrepancy inflation among successful walks. At , its 35 failures comprise 26 Cholesky breakdowns and 9 downdate breakdowns. Across the 36 float16 Harshaw configurations with refactoring, the largest observed failure rate is , and all remaining configurations have rates at most .