Whitening in ARC's QLD implementation
A source discrepancy, a small covariance check, and an unresolved question about the code behind the paper.
November 6, 2026 · Research note
ARC’s released QLD code labels a set of activations as whitened, but the expression leaves their covariance unchanged. The matrix multiplication applies only to the mean. Adding parentheses around the centering step applies it to every sample.
I reported this in issue #2. On November 6, 2026, the issue had no replies and the current source file still matched the version linked below. Which implementation produced the paper’s results remains unknown.
The transformation
In Estimating the Probabilities of Rare Outputs in Language Models, Gabriel Wu and Jacob Hilton study ways to estimate rare-output probabilities. Their Quadratic Logit Decomposition method works with transformed activations before the model’s final output layer. Whitening centers the samples and rescales their covariance toward the identity matrix.
The released expression at line 73 is:
u_samps = act_samps - mean @ th.inverse(A.T)
Python’s precedence rules evaluate the matrix multiplication before the subtraction. Every activation is therefore shifted by the same vector, mean @ th.inverse(A.T). Subtracting a constant does not change covariance.
The row-vector form of Algorithm 3’s centering and transformation is:
u_samps = (act_samps - mean) @ th.inverse(A.T)
The downstream calculation assumes these transformed coordinates. Its transformed output weights and biases should reconstruct the model’s original logits. Passing untransformed samples into that calculation generally tests the wrong points against the decision boundaries. Special geometries can happen to agree, so a check needs inputs with nontrivial scale and correlation.
A check without a model
This is the small example already included in the issue. It needs PyTorch but no model weights or downloaded data. The first printed covariance stays close to the input covariance; the second is close to the identity.
import torch as th
th.manual_seed(0)
cov = th.tensor([[4.0, 1.5], [1.5, 1.0]])
act_samps = th.distributions.MultivariateNormal(th.tensor([3.0, -2.0]), cov).sample((200_000,))
mean = act_samps.mean(dim=0)
A = th.linalg.cholesky(th.cov(act_samps.T))
as_written = act_samps - mean @ th.inverse(A.T) # line 73
bracketed = (act_samps - mean) @ th.inverse(A.T) # Algorithm 3, step 7
print(th.cov(as_written.T)) # about [[4.0, 1.5], [1.5, 1.0]]: unchanged, not whitened
print(th.cov(bracketed.T)) # about [[1, 0], [0, 1]]: whitened
The downloadable example and source record preserve that snippet unchanged. The original posting record says it was run before sending; it was not rerun for this note.
The example isolates the two expressions. The full implementation adds a small covariance regularizer before taking the Cholesky factor, so even the parenthesized version need not produce exactly identity covariance. That regularizer does not explain why the original expression leaves the covariance unchanged.
What remains unresolved
The issue also records our checked model results and a separate question about line 103: it computes an interval using the whole transformed sample, despite first computing an orthogonal component that the algorithm uses. Fixing the parentheses alone does not settle that question or validate the whole estimator.
Our model checks are limited by activation samples, token subsets and the fitting procedure. Agreement with one fitted table entry cannot identify the historical implementation. The released source may differ from the code used for the paper, but that remains an explanation to test with the authors’ recipe, rather than a conclusion from the bug.
The reusable check is to test the transformation’s promised identity before interpreting the final score: inspect the transformed mean and covariance, then check that the corresponding output calculation reconstructs the original logits. An independently reproduced counterexample, a maintainer clarification or fix, or use of this check in another estimator would advance this work. Silence on the issue does not resolve it.
Confidence is high in the source-level discrepancy; the paper’s code provenance remains unresolved. The earlier source and numerical checks were performed by independent AI agents, with later corrections to rank and median conventions. This note uses that reviewed scope and adds no model experiment. Errors are mine; corrections are welcome.