---
title: Quantile-Based Randomized Kaczmarz (QRK)
url: https://www.emergentmind.com/topics/quantile-based-randomized-kaczmarz-qrk
type: topic
---

# Quantile-Based Randomized Kaczmarz (QRK)

Quantile-based Randomized Kaczmarz (QRK), also called QuantileRK or qRK, is a robust Kaczmarz-family row-action method for large, overdetermined linear systems in which row updates are filtered by residual quantiles. Its central purpose is to solve systems whose measurement vector contains sparse, arbitrarily large corruptions, optionally together with widespread small-scale noise, without being driven toward corrupted hyperplanes. In the standard formulation, QRK computes a threshold from the empirical distribution of absolute residuals and accepts only rows whose residual magnitude is below that threshold; under suitable conditioning and corruption-fraction assumptions, this preserves linear convergence while suppressing the effect of outliers [2108.02304].

## 1. Problem model and conceptual basis

QRK is typically posed for a linear system with an underlying consistent component
\[
A x = \tilde b,
\]
where \(A \in \mathbb{R}^{m\times n}\), \(m \ge n\), and the target solution is \(x_* \in \mathbb{R}^n\). The observed right-hand side is contaminated:
\[
b = \tilde b + b^C + r,
\]
where \(b^C\) is a sparse corruption vector and \(r\) is a noise vector. The corruption fraction is
\[
\beta = \frac{|\{i : b^C_i \neq 0\}|}{m}.
\]
The standard analysis assumes row normalization, \(\|a_i\|_2 = 1\), so that the Kaczmarz projection step takes its simplest form [2108.02304].

The motivation is the failure mode of classical randomized Kaczmarz under sparse gross corruptions. Standard RK samples rows without regard to whether the corresponding equation is reliable; a projection onto a corrupted hyperplane can move the iterate far from \(x_*\). By contrast, QRK uses order statistics of current residuals to exclude the largest residual rows, which are likely to be corrupted, and thereby attempts to recover the solution of the clean system rather than the least-squares solution of the contaminated one. This filtering viewpoint distinguishes QRK from methods that deliberately target large residuals for acceleration on clean systems [2107.05554].

Two related conditioning notions recur in the theory. One is the restricted smallest singular value over sufficiently large row subsets, often written as \(\sigma_{q-\beta,\min}(A)\) or an analogous subset-conditioned quantity. The other is \(\sigma_{\max}(A)\). Their ratio governs whether the contraction induced by accepted clean rows dominates the expansion that can arise from occasionally accepting corrupted rows. This suggests that QRK is fundamentally a robust-selection method whose performance depends not only on the corruption fraction \(\beta\) but also on how well conditioned the surviving clean submatrices remain.

## 2. Core algorithmic mechanism

At iterate \(x\), QRK forms residuals
\[
r_i(x) = b_i - \langle a_i, x\rangle,
\]
and computes quantiles on the absolute residuals \(|r_i(x)|\). In the basic notation,
\[
Q_q(x) = q\text{-quantile}\left(\{|b_i - \langle a_i, x \rangle| : i \in [m]\}\right),
\]
and, for a subset \(S \subseteq [m]\),
\[
Q_q(x,S) = q\text{-quantile}\left(\{|b_i - \langle a_i, x \rangle| : i \in S\}\right).
\]
The accepted rows are those with residual magnitude no larger than the chosen quantile threshold [2108.02304].

A standard accept-if formulation proceeds as follows. At iteration \(j\), sample a set of \(t\) indices \(S_j = \{i_1,\dots,i_t\}\) uniformly from \([m]\), compute the sub-residual quantile \(q_j = Q_q(x_{j-1}, S_j)\), sample a candidate row \(k\) uniformly from \([m]\), and accept the row if
\[
|b_k - \langle a_k, x_{j-1}\rangle| \le q_j.
\]
If accepted, the normalized-row update is
\[
x_j = x_{j-1} - (\langle a_k, x_{j-1}\rangle - b_k)a_k
     = x_{j-1} + (b_k - \langle a_k, x_{j-1}\rangle)a_k;
\]
otherwise \(x_j=x_{j-1}\). In this form, both the \(t\)-row subsample and the candidate row are sampled uniformly, and the acceptance probability is approximately \(q\) by construction [2108.02304].

Later analyses distinguish two closely related sampling variants. In QuantileRK1, one samples \(i\) uniformly from \([m]\) and updates only if \(i\) lies in the admissible set
\[
B_k = \{\, i \in [m] : |r_{k,i}| \le Q_q(|r_k|)\,\},
\]
so the per-iteration acceptance probability is \(p=q\). In QuantileRK2, one samples directly from \(B_k\), so \(p=1\). In both cases, once an admissible row is chosen, the update is the usual Kaczmarz projection [2403.19874].

The algorithmic distinction from greedy residual methods is structural. QRK keeps rows with small residuals, not large ones. Reverse-quantile variants invert this rule and can accelerate convergence on clean consistent systems, but they do not inherit QRK’s corruption robustness. This difference is not cosmetic: in the sparse-corruption setting, selecting large residual rows is exactly the behavior QRK is designed to avoid [2410.13395].

## 3. Convergence theory

A deterministic QRK guarantee can be stated directly in terms of matrix-dependent subset conditioning. For normalized rows, sparse adversarial corruption with fraction \(\beta\), and a quantile parameter \(q \in (\beta,1-\beta)\), linear convergence in expectation holds if
\[
\frac{q - \beta}{q} \cdot \frac{\sigma_{q-\beta,\min}(A)^2}{q m}
\;>\;
\frac{2\beta}{q} \cdot \frac{\sigma_{\max}(A)^2}{m(1 - q - \beta)}.
\]
Under this inequality there exists \(c_{A,\beta,q}>0\) such that
\[
\mathbb{E}\,\|x_{k+1} - x_*\|_2^2
\le
(1-c_{A,\beta,q})\,\|x_k-x_*\|_2^2.
\]
This formulation makes explicit that QRK’s robustness is controlled by the competition between clean-subset contraction and the worst-case damage caused by admissible corrupted rows [2107.05554].

The 2021 noise analysis extends the corruption-only theory to the model \(b=\tilde b+b^C+r\), where \(r\) may affect every row and no distributional assumption is imposed in the theory beyond bounds through \(\|r\|_\infty\). Under standardized random-matrix assumptions—independent isotropic subgaussian rows, an entrywise density bound, and a tall system \(m \ge Cn\)—the full-quantile iterate satisfies
\[
\mathbb{E}\big[\|x^{(k)} - x_*\|_2^2\big]
\le
\left(1 - \frac{C_q}{n}\right)^k \|x^{(0)} - x_*\|_2^2
+
\frac{2 n}{c_1} \|r\|_\infty^2.
\]
The exponential factor matches the corruption-only case up to constants, while the additive term is a noise floor proportional to \(n\|r\|_\infty^2\). In the noiseless corrupted case, the additive horizon disappears [2108.02304].

A further extension allows time-varying perturbations,
\[
b_k = A x^* + n_k + c_k,
\]
with \(|\mathrm{supp}(c_k)| \le \beta m\) at each iteration. For QuantileRK1 and QuantileRK2 there are explicit constants \(p\) and \(\varphi>0\) such that the rate is \(1-p\varphi\), with \(p=q\) for QuantileRK1 and \(p=1\) for QuantileRK2; the asymptotic horizon depends on the first and second absolute moments of the noise. The same analysis also yields a Markov-inequality-based lower bound on the probability that the largest residual entries reveal the current corrupted indices, provided the corruption magnitude dominates the noise scale in the prescribed sense [2403.19874].

These results support a characteristic interpretation of QRK. In pure sparse-corruption models, QRK is a linearly convergent exact-recovery method under suitable conditioning. In mixed corruption-plus-noise models, it is a linearly convergent robust estimator with an explicit convergence horizon. A common misconception is to treat quantile filtering as eliminating noise; the available theory instead shows that it eliminates the effect of sparse gross corruptions while retaining a noise-dependent floor whenever pervasive noise remains.

## 4. Parameter regimes, cost, and practical tuning

The main parameter is the quantile level \(q\). Smaller \(q\) imposes stricter acceptance and thus greater robustness, but also reduces the number of usable updates. Larger \(q\) increases the admissible set and usually accelerates convergence, but risks admitting corrupted rows if \(q\) approaches \(1\) too closely. In the 2021 analysis the requirement is
\[
\beta \le \min(c q, 1-q),
\]
whereas other formulations use the simpler admissibility window \(\beta < q < 1-\beta\). Empirically, choosing \(q\) close to \(1-\beta\) was observed to work well and often accelerates convergence while maintaining robustness [2108.02304].

When the quantile is estimated from a subsample of size \(t\), the dominant per-iteration work is computing \(t\) inner products and residual magnitudes, so the cost is \(O(tn)\), plus \(O(t)\) expected quantile selection and \(O(n)\) for the candidate-row test and possible update. The experiments in the 2021 noisy-corrupted paper use \(t=400\), and the implementation guidance explicitly recommends choosing \(t\) large enough to stabilize the quantile estimate but small enough for efficiency, for example in the hundreds [2108.02304].

Subsampled quantile estimation has its own theory. One line of analysis studies sQRK with a sample fraction \(\alpha\), requiring
\[
\alpha q > \beta
\quad\text{and}\quad
\alpha(1-q) > \beta
\]
so that the accepted subsample still contains enough uncorrupted rows and the quantile remains informative. Under these constraints, sQRK converges linearly in expectation to the solution of the uncorrupted system when the derived rate constant is below \(1\) [2308.07987]. A later result sharpens the required subsample size dramatically: under standard scaling assumptions on \(A\), QRK with quantile subsample size
\[
D \ge \frac{C\log(T)}{\log(1/\beta)}
\]
linearly converges over the first \(T\) iterations with high probability, and this scaling is tight up to constants. A plausible implication is that robust quantile screening need not cost \(O(m)\) per iteration in the large-\(m\) regime [2507.15185].

Implementation advice is consistent across formulations. Rows should be normalized whenever possible; if they are not, the update must be divided by \(\|a_i\|_2^2\). Quantiles may be computed by selection algorithms, partial sorting, or streaming sketches. Stopping criteria include a fixed iteration budget, stabilization of \(\|x_k-x_{k-1}\|\), or plateauing residual behavior near the predicted noise floor. In large-scale settings, the ability to access rows in a streamed or sampled fashion is one of QRK’s defining practical advantages [2108.02304].

## 5. Variants and generalizations

A major extension replaces the single accepted-row update by an averaged block step. In QuantileABK and related block-averaged variants, one computes a quantile threshold, forms a trusted candidate set, and updates by averaging one-dimensional projections over a block \(B_k\). Under subgaussian-type assumptions, the resulting rate is constant in \(m\) and \(n\), yielding an \(n\)-fold speed-up over single-row QRK in the canonical random-matrix regime. The same work also shows that the classical projection-based block Kaczmarz method is not robust to sparse adversarial corruptions; robustness requires averaging one-dimensional projections rather than enforcing a corrupted block intersection [2206.12554].

QRK has also been integrated with sparse recovery via Bregman iterations and soft-thresholding. In Quantile-RaSK, sparsity is enforced through
\[
f(x)=\lambda\|x\|_1+\frac12\|x\|^2,
\]
with updates performed in a dual variable and the primal iterate recovered by soft-thresholding. The block-averaged Quantile-RaSKA inherits the same corruption filtering and achieves a factor-\(n\) acceleration in the subgaussian setting. More recently, adaptive heavy-ball momentum selected by a minimal dual function principle has been combined with quantile-based sampling in a unified framework for exact, noisy, and corrupted sparse systems, with linear convergence in expectation of Bregman distance up to a finite horizon related to the contamination level [2206.07356; 2603.29276].

Another extension incorporates external knowledge. QuantileSCRK imposes a hard subspace constraint \(A_L x = b_L\) on a trusted subset \(L\) of corruption-free equations and applies quantile-based constrained Kaczmarz updates only on the remaining rows. In projector form, the update uses
\[
P = I - A_L^\dagger A_L
\]
and replaces \(a_j\) by \(P a_j\). On Gaussian-like data this creates an effective dimension reduction, improving the rate from the ambient dimension \(n\) to the reduced dimension \(n-m_0\) when \(|L|=m_0\) [2309.04889].

Several works study alternative quantile filters. Reverse Quantile-RK keeps rows above a quantile threshold and accelerates clean consistent problems by focusing on larger residuals, but it is explicitly not robust to corruption. Double-Quantile RK (dqRK) introduces a band-pass rule,
\[
\tau_{q_0}^{(k)} < \frac{|r_i^{(k)}|}{\|a_i\|} \le \tau_{q_1}^{(k)},
\]
which combines an upper quantile for robustness with a lower quantile for acceleration. The per-iteration cost is essentially the same as QRK because both quantiles can be obtained from the same sort or selection pass. A separate error-horizon analysis for qRK and dqRK shows smaller horizons than their non-quantile counterparts in mixed noise-plus-sparse-corruption regimes [2410.13395; 2505.00258].

Other recent modifications include an online whitelist trust mechanism that maintains whitelist and blocklist sets, repeatedly removes rows with persistently large residuals, and adapts the quantile level according to the current effective corruption rate. Its theoretical rationale is that the QRK contraction factor improves monotonically as \(\beta\) decreases, so successful online elimination of unreliable rows should speed convergence [2602.12483]. Quantile gating has also been extended to tensor linear systems under the t-product. In QTRK, the quantile is computed over absolute tensor residual entries, entire row slices are excluded when any entry appears corrupted, and linear convergence in expectation is proved under the stated assumptions; the masked variant mQTRK performs partial column-slice updates but admits a pessimistic theory and explicit adversarial failure modes [2503.18190].

## 6. Empirical behavior, comparisons, and limitations

In the noisy-corrupted Gaussian experiments of the 2021 QuantileRK paper, the system is \(A \in \mathbb{R}^{2000\times 100}\) with standardized Gaussian rows, the corruption fraction is varied through \(\beta\), the corruption magnitudes are sampled from \(\mathrm{Uniform}(-k,k)\), the noise entries are \(\mathrm{Uniform}(-0.02,0.02)\), and the quantile estimate uses \(t=400\) sampled rows. For fixed \(q=0.7\) and \(\beta=0.2\), larger corruptions relative to the noise are easier to detect and exclude, producing faster convergence; when corruptions are small, QRK still converges down to the predicted noise-driven horizon. The same study reports that the final error after 2000 iterations supports choosing \(q\) very close to \(1-\beta\), and that across 100 trials the observed plateau aligns closely with the theoretical horizon \(\approx (2n/c_1)\|r\|_\infty^2\) [2108.02304].

Time-varying experiments show similar qualitative behavior. With \(A \in \mathbb{R}^{20000\times 100}\), normalized Gaussian rows, sparse supports that vary across iterations, and Gaussian noise levels \(\sigma \in \{0.0001, 0.01, 0.1\}\), QRK’s empirical convergence closely follows the theoretical upper bound for both static and time-varying perturbations. The reported corruption-detection experiments also show that the fraction of corrupted indices captured among the largest \(\beta m\) residual entries quickly approaches \(100\%\), while the Markov-based lower bound remains conservative [2403.19874].

The whitelist mechanism supplies a complementary empirical narrative. On synthetic systems with \(A \in \mathbb{R}^{5000\times 100}\), \(\beta=0.4\), and \(t=2000\), subsample WL-QRK converges faster than subsampled QRK across several corruption models, while standard RK does not converge meaningfully. On Wisconsin Breast Cancer and tomography systems, WL-QRK and QRK behave similarly during warm-up, after which the whitelist mechanism lowers the effective corruption rate and outpaces plain QRK. The same experiments report that subsampled WL-QRK performs similarly to full-sample WL-QRK at reduced per-iteration cost [2602.12483].

The main limitations are consistent across the literature. Most sharp convergence results assume tall systems, full column rank, normalized rows, and either subgaussian-style random designs or explicit restricted-singular-value conditions. Guarantees deteriorate when \(\beta\) becomes too large relative to \(q\), because the admissible set can then be polluted by corrupted rows. Dense or heavy-tailed noise weakens the separation between corrupted and uncorrupted residuals, so QRK may converge only to a horizon rather than exactly. Extremely small quantile subsamples can be unstable, and projection-based block Kaczmarz remains non-robust in sparse adversarial settings even when combined with quantile screening [2108.02304; 2206.12554; 2308.07987].

QRK is therefore best understood not as a universal cure for inconsistency, but as a family of robust row-selection mechanisms. Its defining contribution is to replace indiscriminate or large-residual row choice by a quantile-screened update rule that can preserve linear convergence in the presence of sparse gross corruption, while admitting a broad ecosystem of extensions—subsampled, block-averaged, sparse/Bregman, constrained, double-quantile, whitelist-based, and tensor-valued—that adapt the same principle to different geometric and computational regimes.

Source: https://www.emergentmind.com/topics/quantile-based-randomized-kaczmarz-qrk