Manuscript Offprint
arXiv:2611.07209Task-Calibrated Random Features via Influence-Based Error Cancellation
Abstract
Random features approximate kernel integrals by Monte Carlo, yet only selected frequency-sampling errors affect a downstream task. We propose Task-Calibrated Random Features (TCRF), which balance frequency moments constructed from task-specific influence using weights shared across kernel entries. Closed-form weights coincide with classical minimum-distance calibration; the contribution is a reusable, task-derived calibration space. We show that first-order variance equals the residual variance after projection onto this space. For kernel ridge regression, complete cancellation yields a non-Gaussian second-order limit. For kernel Stein discrepancy, a subset identity and disjoint-block variance decomposition eliminate the linear component of pilot noise. Positive exponential-tilting weights preserve the positive-semidefinite feature representation and support higher feasible calibration ranks. Paired experiments show improved approximation to exact kernel ridge regression at larger frequency budgets and to the exact empirical Stein discrepancy under a fixed alternative, even after accounting for a frequency-equivalent pilot budget. Gains are smaller with cross-validated ridge, landmark pilots require conservative rank selection, and near the Stein null allocating the pilot budget to additional ordinary frequencies is preferable.
1 Introduction
Random Fourier features replace a shift-invariant kernel integral by a finite Monte Carlo average over sampled frequencies (Rahimi and Recht, 2007). Their computational appeal is clear, but the approximation error is not equally important in every direction. The error that propagates to a downstream task often occupies only a few of the directions in which a finite frequency sample deviates from its spectral law. This paper asks whether those task-relevant directions can be identified in advance and cancelled directly on the sampled frequencies, without changing the sampling distribution. The baseline construction uses a closed-form weight and no inner optimisation; a positive exponential-tilting extension is investigated separately.
Our point of departure is the estimated-sampler phenomenon of Henmi et al. (2007). There, even when the true sampling distribution of an importance sampler is known, re-estimating its nuisance parameter on the same Monte Carlo sample reduces the variance, because the score equation removes the component of the target fluctuation that lies in the score space. If the target fluctuation lies entirely in the span of the score, the first-order asymptotic variance is zero. We use this zero- and near-zero-variance geometry as a design principle for random features, but we do not estimate a sampler parameter. What we retain is the projection: the space onto which the Monte Carlo fluctuation is projected can be designed, and when it is designed from the downstream task it removes precisely the error that the task sees.
We propose Task-Calibrated Random Features (TCRF). Here calibration means exact moment balancing of the sampled frequencies, not probabilistic calibration of predictive probabilities. Given a few frequency functions with known mean zero, the closed-form version assigns each sampled frequency one weight, shared by all kernel entries and test points, so that the empirical moments vanish exactly. The weights require only a sample mean and covariance. The first-order error is the task fluctuation projected onto the orthogonal complement of the calibration space, so complete containment yields zero first-order variance and approximate containment yields near-zero variance. We also consider KL-based exponential tilting (ET), which maintains positive weights on feasible calibration problems and can enlarge the practically usable calibration space.
In kernel ridge regression the relevant frequency-wise quantity is the contribution of a single frequency to the prediction error, not the error of an isolated kernel entry. We construct a low-rank calibration space from the principal directions of this prediction influence, show that it minimises the residual variance at a given rank, and derive the second-order regime that remains when the first-order influence is cancelled completely: the error then decreases in inverse proportion to the number of frequencies, rather than its square root, and its limit is a signed quadratic form in Gaussian kernel errors. In the kernel Stein discrepancy the frequency integral is itself the computational target. A subset identity shows that the centred integrand of a random subset of the data recovers, in expectation, the full-data zero-variance direction up to a single isotropic scale term. Disjoint-block pilots remove the linear component of subset noise exactly; under a fixed alternative, the subset size required for fixed relative precision need not grow with the sample size, so the pilot cost scales linearly with that size.
The closed-form weights themselves are not new. They are exactly the minimum-distance calibration weights of the regression or generalised regression form of Deville and Särndal (1992), and for a scalar Monte Carlo target the TCRF estimator is algebraically identical to a same-sample regression control-variate estimator (Lavenberg et al., 1982; Nelson, 1990; Davidson and MacKinnon, 1992; Portier and Segers, 2019). Our contribution is to design the controls from downstream learning influence and to reuse the resulting common weights as a random-feature representation. When the selected weights are nonnegative, they can be absorbed into the feature coordinates, so the weighted kernel remains positive semidefinite with unit diagonal and the squared Stein discrepancy remains nonnegative. The ET extension enforces positive weights on feasible instances, at an additional numerical optimisation cost, and is therefore a complementary implementation rather than a change to the projection theorems. It is related to exponential-tilting calibration in survey sampling and entropy balancing in observational studies (Kim, 2010; Hainmueller, 2012), but balances sampled frequencies rather than survey or treatment groups. A generic signed correction applied after the fact need not preserve these structures, a representational issue already highlighted in the moment-matching literature (Shen et al., 2017).
A substantial literature reduces random-feature error by changing the frequency design. Moment matching removes low-order empirical frequency fluctuations (Shen et al., 2017); orthogonal random features replace independent Gaussian directions by suitably scaled orthogonal ones (Yu et al., 2016); and quasi-Monte Carlo constructions use low-discrepancy sequences (Yang et al., 2014; Huang et al., 2024). These methods improve the spectral design without using the downstream influence that is central here. Kernel quadrature and random feature expansions are linked by Bach (2017), and Rudi and Rosasco (2017) study learning guarantees for random features; our focus is conditional Monte Carlo error in a fixed downstream computation. A second line of work adapts the sampling distribution to the learning problem: Avron et al. (2017) analyse random features for kernel ridge regression through spectral approximation and leverage-based sampling, and Li et al. (2019) develop a unified risk analysis with a data-dependent scheme based on ridge leverage scores. These methods change which frequencies are sampled, whereas TCRF reweights a given frequency sample so as to annihilate selected task-relevant moments; the two approaches are complementary. On the downstream side, Yao et al. (2023) estimate how random-feature error propagates into particular learning tasks and use this information for adaptive computation; we instead cancel the first-order influence directly. For the Stein discrepancy, random-feature and importance-sampling approximations were studied by Huggins and Mackey (2018), while Jitkrittum et al. (2017) design features for a linear-time goodness-of-fit test. Our construction targets the frequency-integration error of the existing empirical discrepancy, rather than a new discrepancy or test.
The zero-variance principle has a broader history in variance-reduced Monte Carlo computation, including zero-variance estimators for quantum Monte Carlo and Markov chain Monte Carlo (Assaraf and Caffarel, 1999; Mira et al., 2013) and control-functionals integration (Oates et al., 2017). Those works modify an estimator for a specified integration target; our emphasis is on extracting a downstream learning influence to construct common frequency weights that retain the random-feature representation. Closely related frequency-adaptive approaches include data-driven Stein-effect shrinkage of Fourier-feature weights (Chang et al., 2017), data-dependent compression or selection of random features (Agrawal et al., 2019), and learning kernels through their random-feature distributions (Sinha and Duchi, 2016). Unlike these approaches, the central construction here imposes exact balance on prespecified, analytically centred task directions without learning a new spectral law; ET changes only the calibration divergence and finite-sample positive-weight implementation.
Section 2 recalls the estimated-sampler geometry and introduces the two downstream computations. Section 3 develops the closed-form calibration principle and presents two central results: the second-order limit for kernel ridge regression and the disjoint-block variance decomposition for the kernel Stein discrepancy. Section 4 reports paired Monte Carlo experiments, and Section 5 discusses the scope and limitations of the method. Additional proofs and derivations appear in the Appendix, while additional numerical results are given in Appendix D.
2.1 Cancellation by the estimated sampler
Consider the integral
with sampling density , and let be generated from for a known true value . The ordinary importance sampling estimator is
Write
Instead of using the true , let be the maximum likelihood estimator computed from the same sample and set
A first-order expansion (derived in Appendix F) gives
where . Thus the second term is the projection of onto the span of the score in . Consequently, the first-order asymptotic variances satisfy
The benefit of the estimated sampler does not come from the accuracy with which the nuisance parameter is estimated, but from the fact that the score equation absorbs part of the Monte Carlo fluctuation of interest. Writing for the span of the score and for the orthogonal projection onto it in , the asymptotic variance of the estimated-sampler estimator is
Therefore, the first-order asymptotic variance is exactly zero if and only if lies in the linear span . What matters is not the direct construction of a perfect zero-variance sampler, but the inclusion of the target fluctuation in the cancellation space. Complete inclusion gives zero variance, and approximate inclusion leaves only the magnitude of the orthogonal residual as variance. This zero- and near-zero-variance viewpoint is the point of contact with the learning problems considered below.
The use of the same sample is essential. If were computed from an independent sample, the cancellation arising from the covariance between and the score fluctuation would not occur. The score equation
on the same sample can be read as implicitly determining an empirical regression or control-variate coefficient. In this sense the structure found by Henmi et al. (2007) is not merely a correction to importance sampling, but a self-calibration mechanism that projects the target fluctuation onto the nuisance tangent space on a single Monte Carlo sample. The method proposed below uses only this projection geometry, and computes neither the sampler parameter nor its estimate.
2.2 Frequency approximation in KRR and KSD
Gaussian features and moment matching. For the Gaussian kernel with bandwidth , let
For brevity, write when the bandwidth is fixed. The spectral representation with entails . One frequency defines the real two-dimensional feature block
For independent , the ordinary random Fourier feature (RFF) kernel approximation is
To distinguish two existing methods of reducing its Monte Carlo error, put
and suppose that is nonsingular. Gaussian moment matching (MM) centres and whitens these same sampled frequencies, giving
By contrast, the estimated-sampler (ES) construction estimates the mean and covariance of a Gaussian sampling density from these frequencies and reweights each original frequency. With the density of and , define
ES and MM operate differently—the former reweights frequencies and the latter transforms them—but, for fixed and , their first-order asymptotic expansions coincide. In particular, . Both remove the same Gaussian covariance-score component of the frequency fluctuation to first order; by symmetry the Gaussian mean-score component vanishes at this order. Hence Gaussian sampler re-estimation alone is not our contribution. What matters for the proposed method is to select cancellation directions from the downstream task rather than to fix them a priori as Gaussian scores. Detailed expansions and covariance computations appear in Appendix B; see also Shen et al. (2017) for Gaussian moment matching.
Kernel ridge regression. The first task we consider is kernel ridge regression (KRR). For large training samples, exact KRR requires memory to store the Gram matrix and arithmetic operations for a direct factorisation. Random Fourier features replace the kernel with a low-dimensional feature representation, so that a much smaller linear system can be solved when the number of features is far below . Our immediate purpose is to quantify the Monte Carlo error of this computational approximation, before introducing any task calibration.
Fix training data , with and , and choose . Define the exact kernel Gram matrix and test-to-training kernel vector by
Write and . The exact KRR predictor is
For the sampled frequencies defined above, stack the paired cosine and sine features as
The training feature matrix is
The random-feature approximations to the training Gram matrix and the test-to-training kernel vector are
They satisfy and , where the expectation is over the sampled frequencies conditional on the training data.
The random-feature KRR predictor is
It can also be computed in feature space as
The second representation follows from , , and the matrix identity
which holds for . When , a dense feature-space fit costs operations, including feature construction, and memory if the feature matrix is stored. The feature Gram matrix can also be accumulated in batches. These are costs for the random-feature fit, not for constructing task-influence calibration directions.
The solver used in a numerical experiment need not use the smaller feature-space system. The main KRR and landmark experiments in Section 4 form the weighted Gram matrix and solve the -dimensional dual system for all frequency budgets, even when . They are controlled accuracy comparisons, not timing benchmarks for a feature-space implementation. By contrast, the large-sample benchmark in Appendix E chooses the smaller of the -dimensional dual and -dimensional primal systems. The full-influence approach also requires the exact kernel matrices and exact KRR solution for its pilot directions; the landmark construction instead uses a reduced exact problem, and the separate Nyström–Taylor approximation has its own centring cost. The feature-space complexity alone therefore does not establish an end-to-end speed-up of the full-influence procedure.
The gain in computation comes with a frequency-sampling approximation error relative to the exact predictor . To express its first-order perturbation, define the contribution of one frequency to the training Gram matrix by
Likewise, define its contribution to the test-to-training kernel vector by
Consequently, and , with and . For fixed training data, and , the first-order expansion is
Here the prediction influence of a single frequency is
It is centred under the spectral law:
This quantity measures how a single sampled frequency perturbs the KRR prediction, not merely one entry of the Gram matrix. It is therefore the appropriate task-dependent fluctuation to examine. The derivation and its rank-two implementation are given in Appendix C.
Kernel Stein discrepancy. The second task is the kernel Stein discrepancy (KSD). Let be a target density on with score , let be the data, and consider the Gaussian kernel
Thus for the standard Gaussian frequency used in the KRR part. For the Langevin Stein operator, define the real-valued Stein feature
The Stein kernel associated with admits the real Fourier representation
Its empirical V-statistic defines the squared kernel Stein discrepancy used for goodness of fit (Liu et al., 2016; Chwialkowski et al., 2016):
where the frequency integrand is
The random-feature discrepancy of Huggins and Mackey (2018) is the average of over sampled frequencies. For the fixed dataset put
In contrast with kernel ridge regression, the frequency integral is itself the computational target, so no linearisation is involved. The exact statistic requires evaluations of the Stein kernel, at cost of order , whereas the random-feature computation with frequencies costs order . The gain is substantial when , provided that the frequency error is small, and the integrand plays here exactly the role of the target fluctuation of the estimated-sampler problem.
3 Main result
3.1 Closed-form task calibration
Let be the base spectral distribution (the law of for kernel ridge regression and of for the Stein discrepancy), and let be independent and identically distributed according to . For a scalar integrand , define the Monte Carlo target . Define its centred fluctuation by . Next, choose calibration functions and collect them into the vector . Their expectations are assumed known and equal to zero: . Define the sample mean of the calibration functions and the empirical covariance matrix by
We define Task-Calibrated Random Features (TCRF) as the random-feature procedure that assigns common, task-calibrated weights to the sampled frequencies. When is nonsingular, its closed-form frequency weights are
The associated TCRF estimator of the scalar target is
The TCRF weights require no sampler parameter, dual parameter or iterative optimisation. Direct substitution gives the exact finite-sample balance relations
The weights in (1) are a special case of classical calibration weights. With equal base weights and known auxiliary mean zero, they solve the quadratic minimum-distance problem
which is the chi-square calibration construction of Deville and Särndal (1992) specialised to equal base weights with the intercept included among the auxiliary variables. Indeed, the first-order condition of (3) makes an affine function of ; the constraint centres this function at , and the balance constraint then fixes its coefficient vector at , which is (1). Strict convexity of the objective makes this solution unique. Because the weights are affine in , which has empirical mean zero, substituting them into gives, with
the finite-sample identity
For a scalar target, TCRF is therefore exactly a same-sample regression-calibration or control-variate estimator in finite samples, and we do not claim a new regression adjustment. The methodological contribution is to construct the calibration functions from downstream learning influence and then to use the resulting common frequency weights as the random-feature representation. For any fixed , define the residual . Exact balance gives
so that the part of the Monte Carlo fluctuation lying in the calibration space is removed exactly on the observed frequency sample.
To describe the remaining fluctuation, we suppose throughout that and are square integrable under and that is positive definite; these conditions hold for the bounded calibration functions of kernel ridge regression and, under the Gaussian spectral law, for those of the Stein discrepancy. Let , and let denote the orthogonal projection onto in . By the normal equations, with , and the corresponding residual satisfies .
Proposition 1 (First-order variance projection). As ,
and the asymptotic variance under scaling is
Proof. Put . By square integrability and the Cauchy–Schwarz inequality,
so the laws of large numbers give and . Since is positive definite, is nonsingular with probability tending to one and . Furthermore, and the central limit theorem yield . The identity (4) now gives
whose second term is . Since and is centred and square integrable, the i.i.d. central limit theorem proves the asymptotic expansion and its variance formula.
Since is finite dimensional and hence closed in , this asymptotic variance vanishes if and only if . If holds -almost surely, the exact balance (2) further gives on every sample for which is nonsingular. Thus complete containment removes the fluctuation in finite samples, while approximate containment leaves the squared norm of its orthogonal residual as the first-order variance. The closed-form weights need not be nonnegative on every finite sample. For fixed , if and is positive definite, then and the probability that all weights are positive tends to one. In kernel ridge regression the calibration functions are bounded combinations of cosine features. In the Stein discrepancy they have quadratic growth in the frequency, but Gaussian spectral tails give a maximum of logarithmic order in fixed dimension, so the required control holds there as well.
Preservation of the weighted feature representation. The identity (4) makes the relation to control variates exact rather than merely first order, and the algorithmic distinction lies in how the weights are used. The controls are derived from the downstream learning influence, and the resulting weights are shared by every occurrence of a sampled frequency in every kernel entry. If for all , then, with the feature block of Section 2,
is a valid feature map, and its inner product is the weighted random-feature kernel, namely the average of over the sampled frequencies. Hence nonnegative common weights preserve positive semidefiniteness, and the normalisation in (2) preserves the unit diagonal. For the Stein discrepancy every frequency contribution is nonnegative, so the weighted squared discrepancy also remains nonnegative. A generic signed scalar or entrywise control-variate correction need not preserve either representation, which is why a weight-based formulation is preferred here even though the first-order projection is shared with control variates.
Closed-form rank selection. Because the weights are invariant to an invertible linear reparameterisation of the calibration functions, a conditioning diagnostic should not depend on the arbitrary scale of each direction. For a candidate rank , let , let denote its centred empirical covariance on the main frequencies, and let be its diagonal part. We consider only candidates for which is nonsingular, and define the empirical correlation matrix
It has unit diagonal, but it need not be the identity because the calibration directions may be correlated. Our scale-free conditioning score is
For each such candidate, let be the closed-form weight (1) computed with in place of , for , and put . We select the rank by
If no positive rank satisfies these conditions, we set ; throughout, . The fixed-rank theory above and the adaptive choice of are kept conceptually separate.
In the population, the residual variance decreases monotonically in the rank. In finite samples, by contrast, increasing makes the estimation of less stable and the weights more variable. For the Gaussian benchmark of classical control variates the mean squared error including coefficient estimation carries the loss factor , so that adding a further direction that removes population variance from a residual variance is worthwhile only when , a criterion implied by the classical loss factor discussed by Nelson (1990). We do not adopt this approximation as the rank-selection rule; instead, (6) screens for positivity and conditioning. For each candidate rank only and an covariance matrix are needed, and no nonlinear optimisation is involved.
Positive exponential-tilting calibration. As an optional implementation extension of the closed-form construction, motivated by classical exponential-tilting calibration (Kim, 2010), we consider the KL calibration problem
Writing , the constrained problem (7) has, when a finite dual solution exists, normalised exponential-tilting (ET) weights
The dual variable is distinct from the Gaussian sampling parameter in Section 2. The ET weights are strictly positive and satisfy exact empirical balance up to numerical tolerance. Positivity itself does not ensure existence: when is nonsingular, a finite dual solution exists if and only if the origin lies in the interior of the convex hull of the observed control vectors. Our implementation checks dual convergence and the balance residual for each candidate rank, and drops infeasible candidates.
The relation to the closed-form formula is local. For a fixed-dimensional control vector with zero population mean, nonsingular , and sufficient moment and regularity conditions for the Taylor expansion, the ET multiplier obeys
and the exponential weights have the first-order expansion
for each fixed index . Thus the closed-form weights are the linearised ET calibration weights; (4) is an exact finite-sample identity for the closed-form case, not for ET. For fixed rank and exactly centred controls, both constructions have the same first-order projection variance under the corresponding regularity conditions. The second-order KRR limit in Theorem 1, however, is proved for the closed-form estimator and is not asserted automatically for ET, growing selected ranks, or approximately centred controls.
3.2 Kernel ridge regression
Throughout this subsection, the training data, , and test point are fixed; all randomness comes from sampled frequencies. Using the same closed-form weights for the training Gram matrix and the test-to-training kernel vector, put
which, for nonnegative weights, are the Gram matrix and kernel vector of the feature map (5), and define the calibrated predictor by
By Proposition 1, the first-order variance of this predictor associated with a calibration space is
When , the weighted first-order term vanishes exactly and . The predictor is nonlinear in the kernel matrix, however, so a second-order error remains. The next theorem identifies its limit. The centred frequency vector and its projection residual are
Let be a centred jointly Gaussian matrix-vector pair with
Theorem 1 (Second-order limit after exact cancellation). Suppose that . Then, as ,
Proof. Put , and . The fixed-data setup makes , , and fixed, with nonsingular because . The entries of and are bounded for fixed training and test points, so Proposition 1 applies to each component of , and is invertible with probability tending to one. Because the dimension of is fixed, the multivariate central limit theorem yields the joint convergence
Consequently and .
Define . Since is nonsingular and , the inverse defining exists with probability tending to one and . The resolvent identity gives
Using the definitions of and , we obtain the exact identity
Because , we have as an equality in for a fixed vector . Thus, for the independently sampled frequencies, this equality holds almost surely. The common weights and exact calibration then give
Consequently the first term on the right of (11) vanishes exactly. Finally, multiply the remaining term by . The joint limit (10), and the continuous mapping theorem yield (9).
The prediction error is thus of order , unless the limit is degenerate. The limit is a quadratic form in correlated Gaussian kernel errors, distributed as a weighted sum of independent chi-square variables with one degree of freedom; the weights can have either sign. Consequently its expectation need not vanish, and bias and standard deviation can be of the same order. Weak convergence alone does not establish convergence of finite-sample bias or mean squared error without suitable uniform integrability. When almost surely, still faster convergence or even exact finite-sample agreement may occur.
Theorem 1 concerns frequency-sampling randomness conditional on the fixed training data; it does not involve or . It applies to independent original frequencies with one-stage exact calibration. A hybrid using prior moment matching or an estimated calibration space requires separate asymptotic justification. In particular, when for a fixed space, the usual fluctuation remains even if this variance is small. For spaces varying with , the residual first-order norm must be of order to balance the quadratic contribution, with appropriate uniform control of pilot estimation and conditioning. The experiments below assess near-zero variance; they do not establish this second-order limit for adaptive procedures.
For representative points , let
Let denote its eigenvalues and corresponding eigenvectors, and set
In implementation only directions corresponding to positive eigenvalues are used. This choice has a clear optimality property with respect to near-zero variance: for with , where , the space is the best -dimensional calibration space for the representative influence family.
Proposition 2 (Optimal rank-r calibration space). The subspace is the unique solution of
and the minimum equals .
Proof. The influence functions are bounded, so is finite, symmetric and positive semidefinite. For put . Since , these functions are orthonormal in and span the linear span of ; moreover . Let be an -dimensional subspace with orthogonal projection and orthonormal basis , and put . By Bessel's inequality, . Expanding each in the functions gives , so that the objective equals . Because for and ,
Hence the objective is at least , with equality for , for which when and otherwise. Conversely, if attains the minimum, both inequalities are equalities. Since for , this forces , that is, for , and gives .
Since the total variance of the representative influence family is , the proportion of first-order variance removed by is
When the eigenvalue tail is small, a few calibration directions can capture most of the task-relevant variation. An influence matrix evaluated on independent pilot frequencies estimates these principal directions by singular value decomposition. The resulting method approximates a task-specific zero-variance space, rather than reducing arbitrary kernel-entry errors. Its prediction influence is response-adaptive through ; this paper focuses on approximating the fitted prediction, whereas response-independent spectral approximation addresses a different objective.
Task-derived directions can overlap with Gaussian covariance-score directions, as the Hermite calculation in Appendix B shows. This suggests augmenting the task directions by covariance-score directions in a single calibration step, with an effective rank that depends on their overlap. We also examine a two-stage hybrid that centres and whitens the frequencies before closed-form calibration. Its transformed frequencies are dependent, so the independent-frequency projection theorem does not directly describe that hybrid.
Computing the exact influence requires the exact matrices and and the exact coefficient vector , which defeats the purpose when the goal is to approximate large-scale kernel ridge regression. We therefore select landmarks from the training sample and solve a small exact problem. Writing for the landmark Gram matrix, for the landmark responses, , , for the exact kernel vector between a test point and the landmarks, and and for the landmark analogues of and , the landmark influence is
whose expectation under the spectral distribution is zero, so valid calibration directions are produced from small exact kernel computations alone. We learn the principal space of this family on pilot frequencies and calibrate the main frequency sample with it, using the full exact solution only as the benchmark. Complete zero variance with respect to the full task influence is not attained in general, but if the landmark influence space approximates the dominant directions of the full influence space then the residual norm is small and near-zero variance can be expected. The landmark bias is accordingly to be interpreted not as a generic nuisance approximation error but as the approximation error of a zero-variance space, measured by the residual criterion of Proposition 2 evaluated at the full influence. The large-sample Nyström–Taylor implementation adds a distinct issue: approximating the full Gram matrix in the centring term can introduce a nonzero spectral mean even when the empirical calibration equations are solved exactly. The identity and an independent centring diagnostic are given in Appendix E.
3.3 Kernel Stein discrepancy
For the Stein discrepancy the computation of Section 2 is exactly the Monte Carlo target of Proposition 1, with . The conditional first-order variance associated with a calibration space is
and if a fixed contains then the weighted discrepancy agrees with exactly on any sample for which is nonsingular. No quadratic remainder of the kind appearing in Theorem 1 survives, because is itself the frequency integrand. This statement concerns the integration error for a fixed dataset and must be distinguished from the null distribution of a test in which grows. The residual ratio measures the degree of near-zero variance, and a value close to zero indicates that a computation close to the exact empirical discrepancy is attainable with few frequencies. Using the centred integrand itself as a calibration function would require the exact discrepancy and would defeat the purpose, so the question is how to obtain a cheap surrogate. Random subsets of the data provide one. For a subset of size , define its frequency integrand by
and define the centred control, isotropic direction and full-data diagonal contribution by
Let be a simple random sample of size from the fixed dataset, with . The inclusion indicators satisfy
Expand , separate diagonal from off-diagonal terms, and use the corresponding full-data identity for . We obtain for every frequency
with . For the Langevin Stein feature, , so centring with respect to the spectral law yields the subset identity
A subset average is therefore a noisy surrogate for the full-data zero-variance direction, biased only along the isotropic direction . If is an average of subset functions whose expectation is , the two-dimensional space contains up to the subset noise. Given and the subsets, is a fixed function of the frequency, so Proposition 1 applies conditionally and no pilot frequencies are required. The function is proportional to the isotropic Gaussian scale score, so the correction needed to pass from a subset average to the full integrand appears automatically as one of the directions contained in moment matching; this does not mean that the whole covariance-score effect degenerates to a single direction, only that one additional direction suffices for the subset-to-full correction. The integrand and the subset functions have quadratic growth in the frequency, since the empirical characteristic function of a finite dataset does not decay uniformly. Because the closed-form construction introduces no global sampler density, what is required is only stability of second moments and of the sample covariance in , which holds under the Gaussian spectral law.
There is, however, a computational point that the identity alone does not settle. The centring constant is the exact V-statistic on the subset and requires evaluations of the Stein kernel. With independent subsets the pilot needs pair evaluations, and this can exceed the evaluations of the exact statistic; for instance , and give against . The design of the subsets is therefore part of the computational problem.
To analyse the subset noise, fix and consider for the centred pair function
which satisfies . Since the diagonal terms centre to , one has and . For the symmetric array has a unique finite-population Hoeffding decomposition
in which is the average of the pair functions, the linear terms are the finite-population analogues of the Hájek projection, and is the doubly centred, or degenerate, part (Appendix Lemma A.1). All components are functions of , and we write
which are finite under the Gaussian spectral law. We compare two pilot designs with subsets of size , where , and . In the independent design, are independent simple random samples. In the disjoint-block design, the first entries of a uniformly random permutation of are cut into consecutive blocks, so that the blocks are disjoint and, when , form a uniformly random partition of the data. In both designs we write .
Theorem 2 (Disjoint-block variance decomposition). For a fixed dataset , the disjoint-block design satisfies
whereas the independent design satisfies
Proof. The finite-population Hoeffding decomposition separates the subset fluctuation into linear and degenerate terms. In a full random partition every observation has exactly s-1 blockmates, so the linear term cancels identically. Computing the remaining pairwise selection covariances gives the displayed variance formulas; the full enumeration appears in Appendix A.
Because each subset is marginally a simple random sample of size , (12) shows that both designs have the same mean function . Consequently, for and ,
When the blocks form a random partition, and the first term of (13) vanishes: the balancing mechanism that underlies the calibration weights here acts on the data. The dependence between blocks is therefore not a nuisance to be controlled but the source of the improvement. Comparing (13) with (14) at equal and , the independent design minus the disjoint design equals
Disjoint blocks are thus preferable whenever , a condition that does not involve or , and for the price paid otherwise is a degenerate term larger by a factor of at most . The same formula covers a number of observations that is not a multiple of : taking as the integer part of leaves fewer than observations outside the blocks, and the linear term then carries the factor in place of . Averaging independent partitions divides (13) by .
The two displays also quantify the subset-noise contribution to an upper bound on the residual ratio. The number of pair evaluations needed for the exact centring constants is . For a full partition with , Theorem 2 bounds the squared subset noise approximately by , and division by gives a corresponding relative-error upper bound. Under a fixed alternative with a spectral signal bounded away from zero and bounded projected pair moments, the resulting upper bound is of order ; a fixed subset size therefore gives a subquadratic centring cost as increases. Under the null hypothesis, the usual degenerate-U-statistic scaling makes the full-data spectral fluctuation small, so the subset-noise upper bound need not provide a useful relative-error guarantee when . This limitation of the bound does not imply that a pilot with quadratic cost is necessary. The bound uses the fixed coefficient , whereas calibration projects onto with optimal coefficients; Appendix Proposition A.1 gives the exact residual, which depends on the alignment of subset noise with the signal.
The computational cost of the full-partition pilot is as follows. The centring constants require evaluations of the Stein kernel, at cost of order . The values of the subset functions at the main frequencies are obtained from block sums of the vectors , which are computed anyway for , so the calibration functions add only order operations, and the closed-form weights for a two-dimensional space add order . The calibrated random-feature discrepancy therefore costs order , compared with order for the exact statistic, and it requires neither pilot frequencies nor additional feature evaluations. The independent design with the same budget has the same degenerate term, up to the factor above, and an additional linear term of approximate size , which does not decrease as grows; this is the term that the partition removes.
4 Numerical experiment
We evaluate the cancellation mechanism in paired Monte Carlo experiments. All comparisons within a replication use the same training and test samples and nested frequency sequences; independent replications use fixed, documented random seeds. For the kernel ridge regression experiments we use ,
with , a test set of size 1000, and Gaussian-kernel bandwidth equal to the median pairwise distance in the training sample. Our primary predictive evaluation selects the ridge parameter by five-fold cross-validation within each replication, over 26 logarithmically spaced values in under the convention . We also report the fixed setting to isolate the calibration mechanism. For a controlled comparison of frequency approximations, cross-validation uses the exact training Gram matrix; it is a reference-tuning experiment, not an inexpensive RF-based tuning algorithm for very large . Every method within a replication uses the same fitted ridge parameter and paired training, test, and frequency draws; because , the random-feature predictors are computed by solving the system directly. Closed-form weights use (6) with and ; ET uses (15) and the same conditioning screen. Monte Carlo errors and sensitivity results are reported in Appendix D, together with a separate large-sample closed-form benchmark (Appendix E).
4.1 Kernel ridge regression
The closed-form method uses (6). For ET, a converged positive solution replaces the minimum-weight screen, subject to the same conditioning and feasibility checks. The full-KRR experiments select the feasible rank (including ) that minimises the pilot proxy
Here are the weights (8) computed with in place of , and is the residual spectral energy of prediction influence at validation design points x'_1,\ldots,x'_J', drawn independently of the representative points. Let collect the values of at the pilot frequencies, and let be the orthogonal projection in onto the span of the first calibration functions evaluated at the same frequencies. Then
where, for the hybrids with MM, the Gaussian covariance-score directions are also projected out and the degrees of freedom are reduced accordingly. The second factor equals , where is the effective sample size, and penalises weight concentration. This is a proxy for frequency-approximation error, not an unbiased estimate of test prediction MSE. The same pilot frequencies are used to construct the directions and evaluate the proxy, while prediction test points are excluded from selection. A conservative sensitivity rule selects the largest feasible rank with ; we use for landmark checks. Adaptive-rank and ET performance are evaluated empirically rather than by the fixed-rank projection theorem.
For full kernel ridge regression we use 120 representative design points, an independent set of 120 validation design points, and 1600 pilot frequencies to estimate the principal directions of prediction influence and its residual energy. Both sets of design points are sampled independently from . The candidate ranks are , and the number of sampled frequencies is (giving real features). We compare ordinary random Fourier features (RFF), Gaussian moment matching (MM), closed-form TCRF, TCRF-ET, and their hybrids with MM over 200 independent replications. Table 1 reports RMSE relative to exact KRR prediction; Table 2 additionally reports prediction error relative to the true regression function. The two targets answer different questions and must not be conflated.
Under the fixed (Table 1 and Figure 1), the ET hybrid reaches an approximation-RMSE ratio of 0.287 to RFF at , compared with 0.406 for the positive closed-form hybrid, while the mean selected ranks are 64.0 and 33.5, respectively. Positive ET weights therefore allow substantially more task directions to be used without introducing negative feature coefficients. This comparison is not an isolated fixed-rank effect of the weight formula: a diagnostic signed closed-form fit, which does not guarantee a positive-semidefinite random-feature kernel, reaches a ratio of 0.293 at mean rank 64. The main finite-sample ET benefit here is access to a richer positive-weight calibration space.
Table 1: Kernel ridge regression approximation error over 200 replications. The RFF column gives the mean RMSE with respect to exact KRR; the remaining columns give the ratio of the mean RMSE to RFF, with the mean selected rank in square brackets. TCRF and MM-TCRF use the closed-form weights with rank rule (6); TCRF-ET and MM-TCRF-ET use exponential-tilting weights with the pilot-proxy rank rule (15). Lower is better.
| m | RFF RMSE | MM | TCRF | MM-TCRF | TCRF-ET | MM-TCRF-ET |
|---|---|---|---|---|---|---|
| λ = 0.02 | ||||||
| 50 | 0.1054 | 0.782 | 0.965 [3.5] | 0.739 [7.3] | 0.886 [10.9] | 0.691 [13.6] |
| 100 | 0.0768 | 0.767 | 0.894 [6.5] | 0.673 [11.4] | 0.615 [23.8] | 0.529 [25.8] |
| 200 | 0.0558 | 0.755 | 0.777 [10.8] | 0.574 [16.7] | 0.440 [44.6] | 0.388 [49.0] |
| 400 | 0.0388 | 0.771 | 0.605 [18.4] | 0.479 [23.8] | 0.329 [63.5] | 0.311 [63.8] |
| 800 | 0.0273 | 0.775 | 0.476 [27.5] | 0.406 [33.5] | 0.298 [64.0] | 0.287 [64.0] |
| λ by five-fold cross-validation (median 2.5 × 10⁻⁴) | ||||||
| 50 | 0.1794 | 0.901 | 0.995 [1.9] | 0.901 [2.6] | 1.010 [6.4] | 0.911 [6.2] |
| 100 | 0.1266 | 0.925 | 0.996 [2.8] | 0.921 [3.8] | 1.008 [14.0] | 0.933 [14.9] |
| 200 | 0.0936 | 0.925 | 0.977 [4.5] | 0.901 [5.5] | 0.932 [28.1] | 0.865 [29.4] |
| 400 | 0.0677 | 0.937 | 0.958 [6.1] | 0.894 [7.5] | 0.800 [54.9] | 0.755 [57.6] |
| 800 | 0.0492 | 0.943 | 0.927 [9.6] | 0.862 [11.1] | 0.680 [63.9] | 0.654 [63.8] |
With chosen by cross-validation, the relative gains decrease, particularly at small . At and 100, the ET hybrid ratios 0.911 and 0.933 are slightly worse than those of the closed-form hybrid (0.901 and 0.921). From onward ET improves the approximation, reaching 0.654 rather than 0.862 at . At the mean ET hybrid rank is 63.8, versus 11.1 for closed form. Thus positivity, rank adaptation, and the nonlinear weights jointly affect the reported improvement; the fixed-rank projection theorem does not quantify their separate contributions. The stand-alone ET method improves on MM from under the fixed ridge, but only from under the cross-validated ridge. The rank ceiling of 64 is active at large , motivating the separate extended-grid sensitivity analysis in Table D.1 and Figure D.1.
The fixed ridge leads to mean prediction RMSE 0.6791 for exact KRR, whereas the cross-validated ridge reduces this to 0.2733 (median ; Table 2). Under cross-validation, at the ET hybrid has RMSE 0.2732, matching exact KRR within Monte Carlo uncertainty (paired difference , standard error 0.0008); no superiority to exact KRR is implied. Under the fixed ridge the ET hybrid lies slightly below exact KRR for (paired differences about ); this small effect concerns an over-regularised reference fit and is not interpreted as an improvement over exact KRR. For , frequency approximation changes the final prediction error relatively little because the regularised reference itself has substantial error. The importance of approximation for prediction depends on ridge selection and frequency budget. Conversely, a large relative reduction in approximation RMSE need not translate proportionally into test prediction improvement. For the finite-dimensional calibration subproblem, solving ET across candidate ranks took about 14–72 milliseconds per fit, versus 1.5–4 milliseconds for closed form (Appendix D); these local timings do not constitute an equal-wall-time comparison.

Figure 1: KRR approximation RMSE relative to RFF under the fixed and cross-validated ridge parameters, comparing closed-form and ET calibration; bars are paired-bootstrap 95% intervals. The candidate-rank grid ends at 64; ET often selects this boundary for the larger frequency budgets.
4.2 Landmark kernel ridge regression
We next replace the full exact influence used to construct the calibration space by a small exact KRR problem on training landmarks. We use 120 representative and 120 distinct validation design points, 1400 pilot frequencies, , and candidate ranks . Each configuration is repeated 150 times. The full exact KRR serves as the approximation benchmark and, in the cross-validated ridge runs, selects the shared reference ; it is not used to construct the landmark influence directions. This design tests whether directions learned from a small KRR problem remain useful for approximating full-sample predictions.
Under (Table 3 and Figure 2), the positive ET hybrid improves on closed form except at the smallest budget (, ), and it generally improves with the landmark budget. The improvement over closed form is not monotone in ; at the closed-form/MM ratios 0.923, 0.838, 0.752, and 0.679 become 0.807, 0.698, 0.655, and 0.637 with ET for , respectively. These results demonstrate that a low-dimensional exact subproblem can supply useful directions without solving the full exact problem to construct the pilot. The cross-validated ridge reveals an important qualification.
Table 2: Statistical error: mean RMSE against the true regression function. The block headings give the error of exact KRR; the entries include the additional frequency-approximation error.
| RFF | MM | MM-TCRF | MM-TCRF-ET | |
|---|---|---|---|---|
| ; exact KRR 0.6791 | ||||
| 50 | 0.7016 | 0.6895 | 0.6954 | 0.6924 |
| 100 | 0.6912 | 0.6855 | 0.6860 | 0.6821 |
| 200 | 0.6855 | 0.6820 | 0.6819 | 0.6780 |
| 400 | 0.6824 | 0.6802 | 0.6797 | 0.6780 |
| 800 | 0.6814 | 0.6799 | 0.6791 | 0.6784 |
| by five-fold cross-validation; exact KRR 0.2733 | ||||
| 50 | 0.3136 | 0.3026 | 0.3021 | 0.3015 |
| 100 | 0.2922 | 0.2883 | 0.2874 | 0.2835 |
| 200 | 0.2840 | 0.2819 | 0.2801 | 0.2732 |
| 400 | 0.2788 | 0.2784 | 0.2759 | 0.2729 |
| 800 | 0.2762 | 0.2760 | 0.2742 | 0.2727 |
Closed-form landmark calibration has little effect, with ratios approximately 0.96–1.00 relative to MM. ET with the pilot proxy (15) can worsen approximation by about 4–11% at , even though its weights are positive and empirically balanced. The pilot influence describes the landmark KRR task, and its residual-energy proxy need not identify the directions that best approximate the full-data prediction map. In a separate 100-replication check, imposing the conservative ESS constraint largely removes the small-budget losses: ratios are typically 0.98–1.01 for , while at , they reach about 0.92. Independently cross-validating within the landmark subproblem has only modest additional benefit. Table D.2 gives the detailed sensitivity comparison. Thus useful landmark directions are available, but their gain is conditional on task alignment and sufficiently conservative rank selection.
4.3 Kernel Stein discrepancy
We first examine the subset-recovery mechanism of (12) and Theorem 2. The target is with , and Gaussian bandwidth , and the population frequency projection is approximated on 3000 frequencies. We use two moment-matched alternatives that are deliberately difficult for low-order moment correction: a symmetric two-component Gaussian mixture with and for , where is Rademacher and independently, and a standardised multivariate distribution with identity covariance. Each point in Figure 3 is averaged over 100 independent replications. The pilots in this diagnostic are independent simple random samples, the design of (14). The purpose is to examine the recovery mechanism rather than the computational cost, and the larger configurations use more pair evaluations than the exact statistic, which is the situation that the disjoint-block design of Theorem 2 is meant to avoid.
Table 3: Landmark hybrid relative to moment matching over 150 paired replications: ratio of the mean RMSE of MM–Landmark-TCRF to that of MM, with closed-form weights (CF) and exponential-tilting weights (ET). Lower is better.
| CF | ET | CF | ET | CF | ET | |
| 100 | 0.964 | 1.011 | 0.943 | 0.905 | 0.923 | 0.807 |
| 200 | 0.935 | 0.909 | 0.885 | 0.811 | 0.838 | 0.698 |
| 400 | 0.863 | 0.825 | 0.820 | 0.749 | 0.752 | 0.655 |
| 800 | 0.834 | 0.802 | 0.776 | 0.733 | 0.679 | 0.637 |
| by five-fold cross-validation | ||||||
| 100 | 0.998 | 1.102 | 0.997 | 1.095 | 0.997 | 1.042 |
| 200 | 0.993 | 1.111 | 0.989 | 1.106 | 0.992 | 1.053 |
| 400 | 0.983 | 1.019 | 0.977 | 1.007 | 0.981 | 0.974 |
| 800 | 0.983 | 0.967 | 0.976 | 0.954 | 0.962 | 0.920 |
With , increasing the number of subsets from to 100 decreases the residual ratio from 0.929 to 0.467 for the moment-matched mixture and from 0.488 to 0.096 for the standardised . At fixed , increasing the subset size from 25 to 200 decreases the same ratio from 0.869 to 0.141 for the mixture and from 0.367 to 0.032 for . Both sweeps agree qualitatively with (14). At fixed the subset-noise variance decreases as , while the observed residual ratio decreases slowly at first, consistent with the dependence of the exact residual on noise–signal alignment (Appendix Proposition A.1). At fixed , increasing reduces both the linear and the degenerate terms and is more effective per subset in these experiments, at a cost that grows as . The standardised alternative is uniformly easier, which in terms of Theorem 2 indicates a larger variance of the full-data integrand relative to the pair noise. Full summaries with Monte Carlo standard errors are given in Table D.6.
The residual ratios in the preceding diagnostics measure the recovery of the frequency integrand, rather than the finite-frequency approximation error itself. We therefore compare the random-feature estimators directly against the exact empirical squared V-KSD computed by the analytic Stein kernel over all data pairs. The target is , with Gaussian kernel bandwidth . We generate data either from the null or from the fixed alternative . For each scenario, we consider , subset sizes , and sampled frequencies. All configurations have 100 independent datasets and eight independent frequency resamples per dataset; comparisons between methods use the same frequencies on the same dataset. The exact squared V-KSD is calculated once per dataset, without frequency approximation. Pilot subsets are sampled once per dataset and reused for its eight frequency replicates. The random seed for this experiment is 20261024.
We compare ordinary random Fourier features (RFF), calibration using only the centred isotropic scale score , and two-dimensional calibration on span ,

Figure 2: Paired percentage reduction in landmark-hybrid approximation RMSE relative to MM over 150 replications, with 95% intervals; positive values favour the hybrid. The two ridge choices reveal that ET gains under the fixed setting need not carry over to the cross-validated full-sample prediction task.
where averages the centred subset frequency integrands. The pilot subsets are either independently sampled subsets of size or the disjoint blocks of a uniform random partition. The expectation needed to centre each subset integrand is computed exactly as the corresponding subset squared V-KSD, with pair evaluations in either design (for ). Closed-form weights use (6) with candidate ranks 2, 1, 0, and , where rank one contains only . ET uses the largest of these ranks with the same conditioning check and a converged positive dual solution, without the minimum-weight screen. Unlike KRR, no pilot-proxy rank rule is used in this rank-two KSD comparison. We measure the squared error relative to the exact empirical squared V-KSD on each dataset and then compute RMSE across datasets and frequency replications. Confidence intervals for RMSE ratios use a paired bootstrap that resamples entire datasets, not individual frequency repetitions. Because the exact centring constants cost pair evaluations, comparable to the cost of additional frequencies, Table 4 also reports RFF with frequencies as an equal-budget baseline.
Under the fixed mean shift (Table 4 and Figure 4), the disjoint-block ET method improves most at the smaller frequency budget. With , , the disjoint/RFF ratios at are 0.293, 0.267, and 0.182 for closed form, compared with 0.210, 0.167, and 0.105 for ET. Some closed-form samples fall back below rank two because of its positivity screen, whereas the ET solver maintains rank two in the reported small-budget cases. This is consistent with the importance of feasible positive-weight calibration, although the observed loss cannot be attributed solely to rank fallback without a separate fixed-rank ablation. At , the ET and closed-form disjoint/RFF ratios are 0.193 versus 0.195 at , 0.162 versus 0.169 at , and 0.103 versus 0.115 at . Thus ET gives an implementation improvement without changing the fixed-data subset identity or the disjoint-block theorem. The gain persists at equal budget: RFF with frequencies

Figure 3: Recovery of the KSD zero-variance direction with independent pilot subsets. The residual ratio is shown against the number of pilot subsets at fixed subset size (left) and against subset size at fixed (right). Error bars are 95% Monte Carlo intervals over 100 replications.
attains ratios 0.57–0.82, three to eight times larger than those of the disjoint ET estimator.
Under the null, ET and closed-form disjoint pilots are nearly identical: their mutual RMSE ratios are close to one, while their ratios to uncalibrated RFF are about 0.94–0.98. At equal budget, however, spending the pilot cost on additional frequencies is more effective: RFF with frequencies attains ratios 0.57–0.82. The conversion of pair evaluations into frequencies counts operations rather than wall-clock time. In the timing check of Appendix D, at , and the pilot costs about as much as 230 additional frequencies, so the comparison is unchanged in wall-clock terms, while the calibrated approximation is about seven times faster than the exact statistic. This experiment concerns approximation of the empirical statistic, not the size or power of a resulting goodness-of-fit test.
Table 4: Frequency-approximation RMSE relative to the exact empirical squared V-KSD (): ratio to ordinary RFF with frequencies over 100 datasets and eight frequency draws per dataset. RFF () spends the pilot budget of kernel evaluations on additional frequencies. CF denotes the closed-form weights with rank rule (6); ET denotes exponential-tilting weights. Square brackets give paired-bootstrap 95% intervals for Disjoint ET over RFF.
| RFF () | Scale score | Indep. CF | Indep. ET | Disjoint CF | Disjoint ET | ||
|---|---|---|---|---|---|---|---|
| Null | |||||||
| 50 | 1000 | 0.574 | 0.996 | 0.959 | 0.961 | 0.962 | 0.957 [0.922, 0.994] |
| 50 | 2000 | 0.578 | 0.977 | 0.961 | 0.949 | 0.978 | 0.971 [0.935, 1.005] |
| 50 | 5000 | 0.608 | 0.989 | 0.999 | 0.994 | 0.974 | 0.967 [0.939, 0.997] |
| 200 | 1000 | 0.810 | 0.981 | 0.924 | 0.923 | 0.938 | 0.938 [0.913, 0.963] |
| 200 | 2000 | 0.806 | 0.976 | 0.951 | 0.950 | 0.941 | 0.939 [0.916, 0.964] |
| 200 | 5000 | 0.821 | 0.982 | 0.974 | 0.974 | 0.967 | 0.967 [0.942, 0.995] |
| Mean shift | |||||||
| 50 | 1000 | 0.596 | 0.492 | 0.334 | 0.251 | 0.293 | 0.210 [0.195, 0.225] |
| 50 | 2000 | 0.574 | 0.427 | 0.299 | 0.218 | 0.267 | 0.167 [0.155, 0.179] |
| 50 | 5000 | 0.573 | 0.382 | 0.228 | 0.142 | 0.182 | 0.105 [0.098, 0.112] |
| 200 | 1000 | 0.824 | 0.363 | 0.248 | 0.245 | 0.195 | 0.193 [0.180, 0.207] |
| 200 | 2000 | 0.824 | 0.351 | 0.211 | 0.207 | 0.169 | 0.162 [0.152, 0.172] |
| 200 | 5000 | 0.815 | 0.296 | 0.143 | 0.138 | 0.115 | 0.103 [0.096, 0.110] |

Figure 4: Exact empirical squared V-KSD approximation error under the fixed mean shift: closed-form and ET calibration with independent and disjoint-block pilots (). Error ratios are relative to uncalibrated RFF on paired datasets and frequencies; bars are paired-bootstrap 95% intervals. Null results are reported in Table 4.
5 Discussion
Kernel ridge regression and the kernel Stein discrepancy differ in an instructive way. Because the prediction map involves the inverse of the kernel matrix, a second-order error remains after the first-order term has been cancelled; under complete containment a regime of order appears in which the limit is a signed quadratic form rather than a normal distribution, and the bias and the standard deviation then have the same order. For a fixed near-zero space the rate remains , and only the leading variance constant is reduced. For the Stein discrepancy the frequency integrand is itself the target fluctuation, so exact containment removes the frequency error completely, and the subset identity turns cheap computations on subsets of the data into a surrogate for the full-data zero-variance direction. The disjoint-block analysis applies the same balancing idea to the data: a random partition balances the linear component of the subset noise exactly, so that the pilot budget is governed by the ratio of the degenerate variance to the variance of the full-data integrand rather than by the sample size.
This analysis also delimits the scope of the Stein discrepancy construction. Under a fixed alternative, the pilot cost relative to the exact statistic vanishes as the sample size grows, the calibrated random-feature discrepancy costs order , and its accuracy gain persists against random features of equal budget. Under the null hypothesis, degenerate-U-statistic scaling makes the subset-noise bound uninformative when , and the same budget is better spent on additional frequencies. Whether a pilot of linear cost can reduce the frequency error near the null remains open, as does a full evaluation of the size and power of the resulting goodness-of-fit test, in which calibration and pilot construction must be accounted for when generating the null reference distribution.
The regression experiments separate calibration effects from ridge selection. Under a common ridge parameter the positive ET weights allow larger calibration ranks than the closed-form positivity screen, reducing the approximation-RMSE ratio of the hybrid at m = 800 from 0.406 to 0.287 for and from 0.862 to 0.654 under cross-validation; since the adaptive rank rules differ, these comparisons measure complete practical procedures rather than a fixed-rank effect of the weight family. Cross-validation reduces the true-function prediction RMSE of exact KRR from 0.6791 to 0.2733, so the prediction value of a frequency-approximation gain depends on regularisation and budget. The landmark version shows that an aggressively selected ET rank can harm full-sample prediction at small m, while a conservative ESS screen limits this loss; calibration gains thus depend on alignment between the pilot influence and the final prediction task. The large-sample check in Appendix E charges the pilot to the frequency budget but is limited to closed-form weights and a fixed ridge parameter.
The theory proved here covers fixed-rank, exactly centred calibration with closed-form weights. It requires square-integrable calibration functions, which is automatic for kernel ridge regression, whose controls are bounded, but for the Stein discrepancy requires finite fourth moments of the spectral law; this excludes, for example, Matérn kernels of smoothness at most two. A rigorous treatment of adaptive or growing rank, of approximately centred Nyström–Taylor controls, and of the second-order regime of the ET weights is left for future work, as are a comprehensive equal-wall-time accuracy frontier and further models.
References
Raj Agrawal, Trevor Campbell, Jonathan H. Huggins, and Tamara Broderick. Data-dependent compression of random features for large-scale kernel approximation. In Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics, volume 89 of Proceedings of Machine Learning Research, pages 1822–1831, 2019.
Roland Assaraf and Michel Caffarel. Zero-variance principle for Monte Carlo algorithms. Physical Review Letters, 83(23):4682–4685, 1999.
Haim Avron, Michael Kapralov, Cameron Musco, Christopher Musco, Ameya Velingker, and Amir Zandieh. Random Fourier features for kernel ridge regression: Approximation bounds and statistical guarantees. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 253–262, 2017.
Francis Bach. On the equivalence between kernel quadrature rules and random feature expansions. Journal of Machine Learning Research, 18(21):1–38, 2017.
Wei-Cheng Chang, Chun-Liang Li, Yiming Yang, and Barnabás Póczos. Data-driven random Fourier features using Stein effect. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, pages 1497–1503, 2017. doi: 10.24963/ijcai.2017/207.
Kacper Chwialkowski, Heiko Strathmann, and Arthur Gretton. A kernel test of goodness of fit. In Proceedings of the 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pages 2606–2615, 2016.
Russell Davidson and James G. MacKinnon. Regression-based methods for using control variates in Monte Carlo experiments. Journal of Econometrics, 54(1–3):203–222, 1992. doi: 10.1016/0304-4076(92)90106-2.
Jean-Claude Deville and Carl-Erik Särndal. Calibration estimators in survey sampling. Journal of the American Statistical Association, 87(418):376–382, 1992. doi: 10.1080/01621459.1992.10475217.
Jens Hainmueller. Entropy balancing for causal effects: A multivariate reweighting method to produce balanced samples in observational studies. Political Analysis, 20(1):25–46, 2012. doi: 10.1093/pan/mpr025.
Masayuki Henmi, Ryo Yoshida, and Shinto Eguchi. Importance sampling via the estimated sampler. Biometrika, 94(4):985–991, 2007. doi: 10.1093/biomet/asm076.
Zhen Huang, Jiajin Sun, and Yian Huang. Quasi-Monte Carlo features for kernel approximation. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 20134–20165, 2024.
Jonathan H. Huggins and Lester Mackey. Random feature Stein discrepancies. In Advances in Neural Information Processing Systems, volume 31, 2018.
Wittawat Jitkrittum, Wenkai Xu, Zoltán Szabó, Kenji Fukumizu, and Arthur Gretton. A linear-time kernel goodness-of-fit test. In Advances in Neural Information Processing Systems, volume 30, 2017.
Jae Kwang Kim. Calibration estimation using exponential tilting in sample surveys. Survey Methodology, 36(2):145–155, 2010. URL https://www150.statcan.gc.ca/n1/pub/12-001-x/2010002/article/11377-eng.pdf.
Stephen S. Lavenberg, Thomas L. Moeller, and Peter D. Welch. Statistical results on control variables with application to queueing network simulation. Operations Research, 30(1): 182–202, 1982. doi: 10.1287/opre.30.1.182.
Zhu Li, Jean-Francois Ton, Dino Oglic, and Dino Sejdinovic. Towards a unified analysis of random Fourier features. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 3905–3914, 2019.
Qiang Liu, Jason Lee, and Michael I. Jordan. A kernelized Stein discrepancy for goodness-of-fit tests. In Proceedings of the 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pages 276–284, 2016.
Antonietta Mira, Reza Solgi, and Daniele Imparato. Zero variance Markov chain Monte Carlo for Bayesian estimators. Statistics and Computing, 23(5):653–662, 2013.
Barry L. Nelson. Control variate remedies. Operations Research, 38(6):974–992, 1990. doi: 10.1287/opre.38.6.974.
Chris J. Oates, Mark Girolami, and Nicolas Chopin. Control functionals for Monte Carlo integration. Journal of the Royal Statistical Society Series B: Statistical Methodology, 79(3):695–718, 2017.
François Portier and Johan Segers. Monte carlo integration with a growing number of control variates. Journal of Applied Probability, 56(4):1168–1186, 2019. doi: 10.1017/jpr.2019.78.
Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems, volume 20, 2007.
Alessandro Rudi and Lorenzo Rosasco. Generalization properties of learning with random features. In Advances in Neural Information Processing Systems, volume 30, 2017.
Weiwei Shen, Zhihui Yang, and Jun Wang. Random features for shift-invariant kernels with moment matching. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, pages 2520–2526, 2017. doi: 10.1609/AAAI.V31I1.10825.
Aman Sinha and John C. Duchi. Learning kernels with random features. In Advances in Neural Information Processing Systems, volume 29, pages 1298–1306, 2016.
Jiyan Yang, Vikas Sindhwani, Haim Avron, and Michael Mahoney. Quasi-Monte Carlo feature maps for shift-invariant kernels. In Proceedings of the 31st International Conference on Machine Learning, volume 32 of Proceedings of Machine Learning Research, pages 485–493, 2014.
Junwen Yao, N. Benjamin Erichson, and Miles E. Lopes. Error estimation for random Fourier features. In Proceedings of the 26th International Conference on Artificial Intelligence and Statistics, volume 206 of Proceedings of Machine Learning Research, pages 2348–2364, 2023.
Felix Xinnan X. Yu, Ananda Theertha Suresh, Krzysztof M. Choromanski, Daniel N. Holtmann-Rice, and Sanjiv Kumar. Orthogonal random features. In Advances in Neural Information Processing Systems, volume 29, 2016.
Appendix
A Disjoint-block pilots for the kernel Stein discrepancy
Throughout this section the dataset is fixed, , and , and all statements hold pointwise in the frequency before integration against . We use the notation of the Stein discrepancy part: for , , , and for the number of pilot subsets containing both and (so that in the disjoint-block design). Since and , the diagonal terms of centre to , and therefore
where the last identity uses .
Lemma A.1 (Finite-population Hoeffding decomposition). Let be a symmetric real array with , and put
Then
give the unique decomposition
The decomposition also satisfies, for arbitrary real ,
Proof. Since , the sum to zero. For fixed , using ,
For uniqueness, suppose for all with and . Summing over gives for every , and summing over gives , hence because , and then . The orthogonality relation follows from , its symmetric counterpart, and . For the last identity, the cross term between and the linear part is , and .
Applied to the pair functions for each , the lemma defines , and as fixed linear combinations of the . In particular, , and the quantities and are finite whenever the Stein features have finite fourth moments under the spectral law, which holds for the Gaussian law because the pair functions grow at most quadratically in the frequency. The decomposition is a finite-population analogue of the Hoeffding decomposition of a U-statistic: the linear terms play the role of the Hájek projection, and the doubly centred terms that of the degenerate kernel, which is what makes the two contributions in Theorem 2 separate cleanly.
Lemma A.2 (Joint selection probabilities). In the disjoint-block design, let be the union of the blocks, and for let are in the same block}. Then, for distinct indices ,
and
The union is a simple random sample of size , with , and depends on the indices only through whether .
Proof. The blocks are consecutive segments of the first entries of a uniformly random permutation, so is a simple random sample of size , every unit of has exactly blockmates, and units outside have none. Given , which has probability , the other members of its block form a simple random sample from the remaining units, which gives the first two probabilities. Given that and share a block , the other units occupy the remaining positions of the permutation in uniformly random order: positions in , positions in the other blocks, and positions outside . The ordered pair therefore occupies a uniformly distributed ordered pair of distinct positions among these , of which there are . Of these pairs, lie in and lie within one of the other blocks, so that and share a block with conditional probability
Multiplying by gives ; the count is valid for every . The last statement follows from exchangeability of the units under a uniformly random permutation.
Proof of Theorem 2. In both designs , with as in Lemma A.2; in the independent design this is times the probability that a single subset contains both units. Hence , and since and , this equals .
Consider the disjoint-block design and put . Insert the decomposition of Lemma A.1. By Lemma A.2, , so contributes nothing. The linear part contributes
because , and the degenerate part contributes , because . Thus with and . Since is a simple random sample of size and the sum to zero,
The cross moment is . By the last part of Lemma A.2 the probability takes one value when and another when , and for each both and vanish by double centring, so the cross moment is zero. For ,
Fix an ordered pair and group the ordered pairs by their overlap with . The two pairs with contribute with probability ; the pairs sharing exactly one index contribute with the common probability ; and since , the disjoint pairs contribute with the common probability . Therefore , and the identity gives
Dividing by , integrating against , and using and gives (13).
In the independent design, is the average of independent copies of for a single simple random sample of size , which is the disjoint-block design with and . Its variance is therefore given by (13) with , and dividing by and using gives (14). Finally, and , so , and taking expectations completes the proof.
The exact residual of the subset calibration on has a simple closed form. It also isolates the component along , which the two-dimensional calibration space reproduces without error, so that only the component of orthogonal to has to be recovered from the subsets. Let denote the orthogonal projection in onto the orthogonal complement of , and put and ; norms and inner products below are those of .
Proposition A.1 (Exact residual of the subset calibration). If and , then
Proof. Since by (12) and , one has , and is the orthogonal sum of and . The component of along is therefore reproduced exactly, and the squared distance equals . Expanding gives .
When the realised cross term vanishes and , the residual relative to equals
Although conditionally on the dataset, the realised cross term need not vanish, and it cannot be removed from the nonlinear residual formula before taking expectations; the display above therefore describes the orthogonal-noise case rather than the expected residual.
For every subset realisation, a consequence that does not require this orthogonality condition is
The first bound follows because contains ; the second follows by approximating with . Consequently, whenever ,
where the expectation is over the subset design with the dataset fixed.
Because and the finite-population Hoeffding decomposition are linear, Theorem 2 applies to after replacing each pair function by its projection onto the orthogonal complement of . A full partition therefore removes the linear component of the projected subset noise exactly. Under a fixed alternative with a spectral signal bounded away from zero and bounded projected pair moments, the resulting bound decreases at order for . Near the null, the smaller spectral signal can make this relative-error bound uninformative, although this neither establishes a lower bound on the pilot cost nor rules out variance reduction beyond the isotropic direction.
B First-order expansion for Gaussian random features and moment matching
We record the relations used in the framework section, with , and as defined there. For fixed and fixed , as the number of frequencies grows,
The first-order term of the mean correction vanishes because by symmetry. The estimated-sampler estimator obtained by estimating the mean and covariance parameters of the Gaussian spectral sampler from the same frequency sample has the same first-order term, so that . Writing , the residual after removing the Gaussian covariance-score projection is
and for two lags and the covariances before and after the projection are
In particular, as , one has and . This higher-order cancellation explains the strength of Gaussian moment matching for nearby inputs, but the proposed method does not place its novelty here; the task-derived calibration space is designed for the prediction influence, which also involves lags that are not small.
Overlap of task and Gaussian-score directions. Absorb the bandwidth into the lag and write . Because the KRR influence is a finite linear combination of centred kernel entries, it may be expressed using a discrete signed measure on the lag space as . Let be the Gaussian covariance-score space. The Hermite projection of the influence onto is
Hence task and covariance-score directions need not be orthogonal; the joint rank depends on the prediction problem.
C Derivation of the task influence for kernel ridge regression
We use the standardised frequency and the Gaussian bandwidth . In particular, , , and the single-frequency contributions have entries
Let and . Since , the resolvent expansion is
and therefore
With these definitions, and . The first-order term is then
and the influence function is defined as the summand, from which follows. This representation does not require the dense matrix to be formed. With the paired cosine and sine representation the contribution of one frequency is of rank two, so that the matrix-vector product can be evaluated through two inner products. The dominant cost of the pilot influence matrix is therefore of order , where is the number of pilot frequencies and the number of representative points, and of order in the landmark version.
D Additional numerical results
This section reports ET and cross-validated-ridge experiments alongside an independent closed-form-only benchmark. The KRR experiment has 200 datasets, the landmark experiment has 150 per configuration, and the exact empirical KSD benchmark has 100 datasets with eight frequency resamples on each dataset. The separate closed-form benchmark uses independent random seeds and therefore does not support paired comparisons with the ET/CV tables.
D.1 Positive ET weights, rank sensitivity and cross-validation
The KRR experiments use , , the specified Gaussian-kernel bandwidth and regression model, and . The cross-validated ridge is selected separately in each training replication by five folds of exact KRR, on a 26-point logarithmic grid from to . The median selected value is . This is a reference-calibration comparison; it does not eliminate the need to tune an RF or Nyström method at acceptable cost in large datasets. All approximation methods use the same within a replication.
For each KRR dataset we draw 120 representative design points and a disjoint set of 120 validation design points independently from , together with 1600 pilot frequencies. The validation points are distinct from the held-out test points; the pilot frequency sample is shared between fitting the principal directions and computing the rank proxy . The ET dual is solved with damped Newton iterations, after checking candidate feasibility and conditioning. The reported fit-level timings for the candidate-rank ET solves are 14–72 ms, compared with 1.5–4 ms for closed form, on the measured local configuration; these do not include exact-KRR cross-validation or all pilot construction. The KRR, landmark and KSD seeds are 20261022, 20261023, and 20261024, respectively. The extended rank-grid check uses seed 20261025. The arXiv ancillary archive TCRF_reproduction.zip contains reproduction scripts, raw CSVs, dataset-level aggregates and plotting commands for the numerical results.
The KRR rule sensitivity in Table D.1 separates admissibility from the nonlinear weight family. The signed closed-form diagnostic allows higher ranks but may destroy positive semidefiniteness. For example, at the ratios to RFF for the positive closed-form, signed closed-form and ET hybrid are, respectively, 0.406, 0.293, and 0.287 under , and 0.862, 0.714, and 0.654 under cross-validated . The corresponding ranks under the fixed ridge are about 33.5, 64, and 64. Thus the ET gain is partly a positive-rank admissibility gain; these figures do not identify a pure fixed-rank ET effect. Signed closed-form weights can also be extremely unstable: at under cross-validation its mean error ratio is
Table D.1: Sensitivity of MM–TCRF to the weight family and the rank rule: ratio of the mean RMSE to RFF, with the mean selected rank in square brackets. CF is the closed-form rule (6); ET-ESS selects the largest rank whose exponential-tilting weights have effective sample size at least ; ET-pMSE minimises the pilot proxy (15). †The candidate grid is extended by 80, 96 and 112, on an independent set of 100 replications. Lower is better.
| CF | ET-ESS | ET-ESS | ET-pMSE | ET-pMSE | |
|---|---|---|---|---|---|
| 50 | 0.739 [7.3] | 0.694 [15.6] | 0.742 [5.7] | 0.691 [13.6] | 0.674 [13.6] |
| 100 | 0.673 [11.4] | 0.520 [28.2] | 0.670 [11.0] | 0.529 [25.8] | 0.507 [25.8] |
| 200 | 0.574 [16.7] | 0.388 [48.2] | 0.532 [20.1] | 0.388 [49.0] | 0.374 [49.6] |
| 400 | 0.479 [23.8] | 0.310 [63.9] | 0.410 [34.0] | 0.311 [63.8] | 0.276 [85.4] |
| 800 | 0.406 [33.5] | 0.287 [64.0] | 0.303 [58.0] | 0.287 [64.0] | 0.196 [111.8] |
| by five-fold cross-validation | |||||
| 50 | 0.901 [2.6] | 0.992 [11.3] | 0.895 [2.9] | 0.911 [6.2] | 0.923 [6.2] |
| 100 | 0.921 [3.8] | 0.985 [20.4] | 0.915 [6.4] | 0.933 [14.9] | 0.914 [14.4] |
| 200 | 0.901 [5.5] | 0.890 [35.3] | 0.868 [13.0] | 0.865 [29.4] | 0.885 [28.7] |
| 400 | 0.894 [7.5] | 0.757 [58.8] | 0.810 [23.8] | 0.755 [57.6] | 0.764 [60.2] |
| 800 | 0.862 [11.1] | 0.654 [63.8] | 0.712 [42.1] | 0.654 [63.8] | 0.558 [104.3] |
about 249, so it is a diagnostic rather than a structure-preserving competitor.
In the independent extended-grid run (100 datasets; Figure D.1 and the last column of Table D.1), adding ranks 80, 96, and 112 changes the ET hybrid/RFF ratio at from 0.287 to 0.196 with fixed , and from 0.654 to 0.558 under cross-validation. The two replication sets are independent; these are sensitivity contrasts, not a paired improvement estimate. The main rank grid often reaches its ceiling 64, so the reported rank is not an unconstrained optimum. Any frequency-equivalent budget estimated by extrapolating the observed RFF curve past is heuristic rather than directly observed.
The landmark sensitivity check in Table D.2 uses 100 paired replications, whereas the primary landmark table (Table 3) has 150. The ESS rule admits the largest feasible ET rank with . This conservative criterion avoids most small- degradation under the reference-CV ridge; fitting a separate ridge parameter within the landmark subsample has relatively limited incremental effect. These results support an ESS safeguard for the landmark implementation, not a theorem of monotone predictive improvement.
D.2 Independent closed-form benchmark and diagnostics
Tables D.3–D.5 report a separate closed-form-only Monte Carlo benchmark with and base seed 20260923. These estimates are not paired with the ET/CV tables. In this KRR and landmark experiment the pilot-standardised covariance screen and the main-sample correlation check selected identical ranks; the nonnegative-weight condition was the active restriction. The largest empirical balance error recorded for those closed-form fits was below . The KSD recovery diagnostic in Table D.6, which underlies Figure 3, uses

Figure D.1: Sensitivity of the KRR ET approximation to increasing the candidate-rank limit from 64 to 112. The extended grid uses an independent 100-replication run rather than the primary 200-replication sample.
independent subsets and the same base seed.
D.3 Exact-KSD benchmark for both subset sizes and timing
Table D.7 extends Table 4 to both subset sizes and all frequency budgets , using the same run: target , Gaussian bandwidth , data from or , , 100 datasets for each scenario and , eight frequency draws per dataset, and seed 20261024. The exact squared V-KSD uses the analytic Stein kernel on every ordered pair, evaluated by block matrix products to avoid storing an array. For each dataset , its exact squared V-KSD is held fixed across frequency replicates , and the reported accuracy statistic is
Pilot subsets, with , are drawn once per dataset, and every value of uses a prefix of one frequency sample of size 300, so that comparisons across methods and frequency budgets are paired. Closed-form weights use candidate ranks 2, 1, 0, in this order; rank one contains only the centred scale score , and rank two adds the averaged,
Table D.2: Landmark hybrid under cross-validated full-data ridge (100 paired replications): ratio of mean approximation RMSE to MM. Full uses the full-data cross-validated ridge in the landmark subproblem; landmark CV selects a separate subproblem ridge by five-fold cross-validation on landmarks. Lower is better.
| m | Full | Landmark CV | |||||
|---|---|---|---|---|---|---|---|
| CF | ET-pMSE | ET-ESS | CF | ET-pMSE | ET-ESS | ||
| 30 | 100 | 0.996 | 1.113 | 0.995 | 1.005 | 1.072 | 1.006 |
| 30 | 200 | 0.996 | 1.115 | 1.004 | 0.995 | 1.061 | 1.003 |
| 30 | 400 | 0.987 | 1.018 | 0.994 | 0.994 | 1.002 | 0.993 |
| 30 | 800 | 0.991 | 0.964 | 0.967 | 0.983 | 0.971 | 0.972 |
| 50 | 100 | 0.999 | 1.094 | 1.003 | 1.000 | 1.059 | 1.000 |
| 50 | 200 | 0.994 | 1.122 | 1.000 | 0.990 | 1.052 | 0.995 |
| 50 | 400 | 0.975 | 1.008 | 0.978 | 0.982 | 0.979 | 0.979 |
| 50 | 800 | 0.975 | 0.954 | 0.953 | 0.974 | 0.935 | 0.935 |
| 100 | 100 | 0.996 | 1.041 | 0.989 | 0.995 | 1.043 | 0.992 |
| 100 | 200 | 0.999 | 1.068 | 1.003 | 0.985 | 1.037 | 0.983 |
| 100 | 400 | 0.987 | 0.988 | 0.973 | 0.979 | 0.964 | 0.956 |
| 100 | 800 | 0.962 | 0.922 | 0.924 | 0.966 | 0.912 | 0.914 |
exactly centred subset frequency integrand. At the selected rank the minimum weight must be at least 0.01 and the standardised sample-covariance eigenvalue ratio at least ; at rank zero the estimator reduces to ordinary RFF. ET and closed-form pilots use the same controls, and KSD ET chooses the largest converged admissible rank rather than the KRR pilot-proxy rule. Exact subset centring costs kernel-pair evaluations in both pilot designs, comparable to additional frequencies, which defines the RFF column. Figure D.2 shows the corresponding absolute errors at and . Under the null both positive calibration solutions have nearly the same RMSE and are less accurate than RFF , while under the mean shift ET improves substantially at over the positivity-screened closed-form calibration and both remain far more accurate than RFF . No significance-test size or power is inferred from these computational approximation experiments.
A separate timing check measured wall-clock times on a two-thread CPU at , and under the mean shift, taking the minimum of three runs for each of five datasets. The mean times were 0.652 seconds for the exact squared V-KSD, 0.088 seconds for the disjoint-block calibrated approximation with closed-form weights and 0.087 seconds with ET weights, both including the exact pilot centring and the main features, and 0.038 and 0.060 seconds for ordinary RFF with and frequencies. Pilot-subset index generation and frequency generation are excluded from the timed paths. In wall-clock time the pilot therefore costs about as much as 230 additional frequencies, and the calibrated approximation is about seven times faster than the exact statistic.
Table D.3: Detailed kernel ridge regression results. Rank-0 is the percentage of replications in which no positive task-calibration rank was admissible. ESS is the effective sample size of the frequency weights.
| m | Method | Mean RMSE | MCSE | /RFF | Mean rank | Rank-0 (%) | ESS |
|---|---|---|---|---|---|---|---|
| 50 | RFF | 0.1083 | 0.0013 | 1.000 | - | - | - |
| 50 | MM | 0.0823 | 0.0010 | 0.760 | - | - | - |
| 50 | TCRF | 0.1040 | 0.0015 | 0.961 | 3.2 | 41.0 | 47.5 |
| 50 | MM-TCRF | 0.0774 | 0.0012 | 0.715 | 7.1 | 13.5 | 46.2 |
| 100 | RFF | 0.0774 | 0.0009 | 1.000 | - | - | - |
| 100 | MM | 0.0585 | 0.0006 | 0.756 | - | - | - |
| 100 | TCRF | 0.0689 | 0.0011 | 0.890 | 6.3 | 19.5 | 93.9 |
| 100 | MM-TCRF | 0.0499 | 0.0008 | 0.644 | 11.1 | 2.0 | 92.9 |
| 200 | RFF | 0.0546 | 0.0006 | 1.000 | - | - | - |
| 200 | MM | 0.0415 | 0.0005 | 0.760 | - | - | - |
| 200 | TCRF | 0.0417 | 0.0009 | 0.763 | 11.3 | 5.5 | 189.0 |
| 200 | MM-TCRF | 0.0300 | 0.0005 | 0.550 | 17.6 | 0.0 | 187.8 |
| 400 | RFF | 0.0389 | 0.0005 | 1.000 | - | - | - |
| 400 | MM | 0.0295 | 0.0003 | 0.758 | - | - | - |
| 400 | TCRF | 0.0236 | 0.0006 | 0.606 | 18.1 | 3.0 | 380.4 |
| 400 | MM-TCRF | 0.0184 | 0.0003 | 0.472 | 24.3 | 0.0 | 381.8 |
| 800 | RFF | 0.0273 | 0.0003 | 1.000 | - | - | - |
| 800 | MM | 0.0207 | 0.0002 | 0.758 | - | - | - |
| 800 | TCRF | 0.0127 | 0.0003 | 0.463 | 26.9 | 0.5 | 770.4 |
| 800 | MM-TCRF | 0.0108 | 0.0002 | 0.396 | 31.9 | 0.0 | 774.4 |
Table D.4: Paired kernel ridge regression gains relative to moment matching. The gain is the RMSE of MM minus that of the method, so positive values favour the method; the positive fraction is the percentage of replications in which the method has smaller approximation RMSE than MM.
| m | Method | Mean gain | MCSE | 95% interval | Positive (%) |
|---|---|---|---|---|---|
| 50 | TCRF | -0.02172 | 0.00123 | [-0.02412, -0.01932] | 10.5 |
| 50 | MM-TCRF | 0.00490 | 0.00078 | [0.00336, 0.00643] | 60.0 |
| 100 | TCRF | -0.01041 | 0.00093 | [-0.01223, -0.00858] | 23.0 |
| 100 | MM-TCRF | 0.00863 | 0.00053 | [0.00760, 0.00966] | 88.0 |
| 200 | TCRF | -0.00019 | 0.00075 | [-0.00166, 0.00127] | 52.5 |
| 200 | MM-TCRF | 0.01148 | 0.00038 | [0.01073, 0.01223] | 99.5 |
| 400 | TCRF | 0.00590 | 0.00051 | [0.00490, 0.00690] | 84.0 |
| 400 | MM-TCRF | 0.01111 | 0.00028 | [0.01055, 0.01167] | 100.0 |
| 800 | TCRF | 0.00806 | 0.00025 | [0.00756, 0.00856] | 99.0 |
| 800 | MM-TCRF | 0.00989 | 0.00019 | [0.00951, 0.01027] | 100.0 |
Table D.5: Detailed landmark results for the task-calibrated methods. RMSE is the mean RMSE with respect to exact KRR, and Rank-0 is the percentage of replications with no admissible positive rank. The final column is the paired percentage reduction in RMSE relative to MM for the hybrid; the standalone method is left blank in that column.
| m | Method | RMSE | MCSE | /RFF | Rank | Rank-0 (%) | Red. (%) | |
|---|---|---|---|---|---|---|---|---|
| 30 | 100 | Landmark-TCRF | 0.0708 | 0.0010 | 0.940 | 6.7 | 6.7 | - |
| 30 | 100 | MM-Landmark-TCRF | 0.0565 | 0.0007 | 0.750 | 11.1 | 0.7 | 1.6 |
| 30 | 200 | Landmark-TCRF | 0.0474 | 0.0008 | 0.885 | 10.8 | 2.0 | - |
| 30 | 200 | MM-Landmark-TCRF | 0.0383 | 0.0005 | 0.716 | 15.1 | 0.0 | 5.8 |
| 30 | 400 | Landmark-TCRF | 0.0308 | 0.0005 | 0.817 | 16.5 | 0.7 | - |
| 30 | 400 | MM-Landmark-TCRF | 0.0252 | 0.0004 | 0.668 | 21.1 | 0.0 | 10.7 |
| 30 | 800 | Landmark-TCRF | 0.0196 | 0.0003 | 0.742 | 22.6 | 0.0 | - |
| 30 | 800 | MM-Landmark-TCRF | 0.0169 | 0.0002 | 0.637 | 25.3 | 0.0 | 16.3 |
| 50 | 100 | Landmark-TCRF | 0.0689 | 0.0011 | 0.914 | 7.1 | 7.3 | - |
| 50 | 100 | MM-Landmark-TCRF | 0.0546 | 0.0008 | 0.726 | 11.1 | 1.3 | 4.9 |
| 50 | 200 | Landmark-TCRF | 0.0459 | 0.0008 | 0.857 | 10.7 | 1.3 | - |
| 50 | 200 | MM-Landmark-TCRF | 0.0364 | 0.0005 | 0.681 | 15.5 | 0.0 | 10.6 |
| 50 | 400 | Landmark-TCRF | 0.0286 | 0.0005 | 0.757 | 17.1 | 0.0 | - |
| 50 | 400 | MM-Landmark-TCRF | 0.0234 | 0.0003 | 0.620 | 21.5 | 0.0 | 17.1 |
| 50 | 800 | Landmark-TCRF | 0.0183 | 0.0003 | 0.692 | 22.8 | 0.0 | - |
| 50 | 800 | MM-Landmark-TCRF | 0.0156 | 0.0002 | 0.588 | 25.8 | 0.0 | 22.8 |
| 100 | 100 | Landmark-TCRF | 0.0679 | 0.0011 | 0.902 | 6.9 | 6.0 | - |
| 100 | 100 | MM-Landmark-TCRF | 0.0524 | 0.0008 | 0.696 | 11.1 | 2.0 | 8.9 |
| 100 | 200 | Landmark-TCRF | 0.0439 | 0.0008 | 0.821 | 11.1 | 0.7 | - |
| 100 | 200 | MM-Landmark-TCRF | 0.0340 | 0.0005 | 0.636 | 16.1 | 0.0 | 16.5 |
| 100 | 400 | Landmark-TCRF | 0.0260 | 0.0005 | 0.690 | 16.9 | 0.0 | - |
| 100 | 400 | MM-Landmark-TCRF | 0.0210 | 0.0003 | 0.558 | 22.5 | 0.0 | 25.7 |
| 100 | 800 | Landmark-TCRF | 0.0156 | 0.0003 | 0.590 | 23.7 | 0.0 | - |
| 100 | 800 | MM-Landmark-TCRF | 0.0137 | 0.0002 | 0.517 | 26.0 | 0.0 | 31.9 |

Figure D.2: Absolute RMSE to the exact empirical squared V-KSD as a function of the number of frequencies m at n = 5000 and s = 100. Left: Gaussian null; right: fixed mean-shift alternative.
Table D.6: KSD subset-recovery diagnostics with independent pilot subsets. The two sweeps vary at fixed and vary at fixed , respectively.
| Scenario | Sweep | Setting | Mean | MCSE | 95% interval |
|---|---|---|---|---|---|
| Mixture | 0.9287 | 0.0066 | [0.9157,0.9416] | ||
| Mixture | 0.9023 | 0.0072 | [0.8881,0.9165] | ||
| Mixture | 0.8484 | 0.0077 | [0.8334,0.8634] | ||
| Mixture | 0.7214 | 0.0095 | [0.7029,0.7400] | ||
| Mixture | 0.4667 | 0.0082 | [0.4505,0.4829] | ||
| Mixture | 0.8687 | 0.0076 | [0.8538,0.8837] | ||
| Mixture | 0.7186 | 0.0094 | [0.7002,0.7371] | ||
| Mixture | 0.4077 | 0.0079 | [0.3923,0.4231] | ||
| Mixture | 0.1411 | 0.0036 | [0.1340,0.1482] | ||
| 0.4884 | 0.0053 | [0.4780,0.4988] | |||
| 0.4510 | 0.0054 | [0.4404,0.4615] | |||
| 0.3546 | 0.0052 | [0.3444,0.3649] | |||
| 0.2181 | 0.0040 | [0.2103,0.2259] | |||
| 0.0961 | 0.0021 | [0.0920,0.1002] | |||
| 0.3672 | 0.0053 | [0.3569,0.3776] | |||
| 0.2231 | 0.0040 | [0.2153,0.2309] | |||
| 0.0966 | 0.0020 | [0.0926,0.1005] | |||
| 0.0325 | 0.0007 | [0.0312,0.0337] |
Table D.7: Exact empirical squared V-KSD benchmark for both subset sizes: ratio of frequency-approximation RMSE to ordinary RFF with frequencies, over 100 datasets and eight frequency draws per dataset. RFF () spends the pilot budget of kernel evaluations on additional frequencies; CF and ET denote closed-form and exponential-tilting weights with independent (Indep.) or disjoint-block (Disj.) pilots. The rows with , repeat Table 4.
| Scenario | n | s | m | RFF () | Indep. CF | Indep. ET | Disj. CF | Disj. ET |
|---|---|---|---|---|---|---|---|---|
| Null | 1000 | 50 | 50 | 0.698 | 0.972 | 0.974 | 0.992 | 0.999 |
| Null | 1000 | 50 | 100 | 0.822 | 0.952 | 0.951 | 0.971 | 0.966 |
| Null | 1000 | 50 | 200 | 0.891 | 0.961 | 0.960 | 0.959 | 0.959 |
| Null | 1000 | 100 | 50 | 0.574 | 0.959 | 0.961 | 0.962 | 0.957 |
| Null | 1000 | 100 | 100 | 0.717 | 0.941 | 0.936 | 0.956 | 0.955 |
| Null | 1000 | 100 | 200 | 0.810 | 0.924 | 0.923 | 0.938 | 0.938 |
| Null | 2000 | 50 | 50 | 0.720 | 0.975 | 0.973 | 0.982 | 0.985 |
| Null | 2000 | 50 | 100 | 0.802 | 0.968 | 0.967 | 0.964 | 0.963 |
| Null | 2000 | 50 | 200 | 0.875 | 0.960 | 0.960 | 0.956 | 0.955 |
| Null | 2000 | 100 | 50 | 0.578 | 0.961 | 0.949 | 0.978 | 0.971 |
| Null | 2000 | 100 | 100 | 0.713 | 0.956 | 0.955 | 0.953 | 0.951 |
| Null | 2000 | 100 | 200 | 0.806 | 0.951 | 0.950 | 0.941 | 0.939 |
| Null | 5000 | 50 | 50 | 0.744 | 0.990 | 0.988 | 0.974 | 0.975 |
| Null | 5000 | 50 | 100 | 0.817 | 0.963 | 0.962 | 0.969 | 0.969 |
| Null | 5000 | 50 | 200 | 0.905 | 0.971 | 0.971 | 0.974 | 0.975 |
| Null | 5000 | 100 | 50 | 0.608 | 0.999 | 0.994 | 0.974 | 0.967 |
| Null | 5000 | 100 | 100 | 0.693 | 0.964 | 0.958 | 0.946 | 0.945 |
| Null | 5000 | 100 | 200 | 0.821 | 0.974 | 0.974 | 0.967 | 0.967 |
| Mean shift | 1000 | 50 | 50 | 0.734 | 0.353 | 0.272 | 0.339 | 0.253 |
| Mean shift | 1000 | 50 | 100 | 0.812 | 0.285 | 0.277 | 0.255 | 0.245 |
| Mean shift | 1000 | 50 | 200 | 0.915 | 0.277 | 0.275 | 0.242 | 0.237 |
| Mean shift | 1000 | 100 | 50 | 0.596 | 0.334 | 0.251 | 0.293 | 0.210 |
| Mean shift | 1000 | 100 | 100 | 0.712 | 0.248 | 0.243 | 0.223 | 0.196 |
| Mean shift | 1000 | 100 | 200 | 0.824 | 0.248 | 0.245 | 0.195 | 0.193 |
| Mean shift | 2000 | 50 | 50 | 0.687 | 0.318 | 0.228 | 0.311 | 0.207 |
| Mean shift | 2000 | 50 | 100 | 0.835 | 0.274 | 0.234 | 0.224 | 0.214 |
| Mean shift | 2000 | 50 | 200 | 0.904 | 0.237 | 0.232 | 0.216 | 0.210 |
| Mean shift | 2000 | 100 | 50 | 0.574 | 0.299 | 0.218 | 0.267 | 0.167 |
| Mean shift | 2000 | 100 | 100 | 0.710 | 0.218 | 0.208 | 0.182 | 0.164 |
| Mean shift | 2000 | 100 | 200 | 0.824 | 0.211 | 0.207 | 0.169 | 0.162 |
| Mean shift | 5000 | 50 | 50 | 0.679 | 0.262 | 0.167 | 0.231 | 0.150 |
| Mean shift | 5000 | 50 | 100 | 0.844 | 0.175 | 0.165 | 0.161 | 0.152 |
| Mean shift | 5000 | 50 | 200 | 0.875 | 0.166 | 0.157 | 0.150 | 0.141 |
| Mean shift | 5000 | 100 | 50 | 0.573 | 0.228 | 0.142 | 0.182 | 0.105 |
| Mean shift | 5000 | 100 | 100 | 0.741 | 0.155 | 0.143 | 0.123 | 0.108 |
| Mean shift | 5000 | 100 | 200 | 0.815 | 0.143 | 0.138 | 0.115 | 0.103 |
E Pilot-inclusive large-sample KRR checks
This section isolates the large-sample behaviour of the closed-form NY-MM-TCRF construction, which combines Nyström-approximated influence coefficients, moment matching and TCRF calibration, under its fixed protocol. It is an additional numerical check rather than a comparison between ET and closed-form weighting or between ridge-tuning procedures. The data-generating model matches the Gaussian KRR model of Section 4.
The large-sample experiment uses , , independent test samples of size 2000, Gaussian-kernel bandwidth obtained from a 600-observation training subsample, and ridge parameter under the convention. To avoid transductive design, the prediction-influence design points (the representative points of Section 3.2) are generated independently from , without using test responses or test covariates. The pilot uses 30 training landmarks in a full-sample Nyström KRR approximation, pilot frequencies and principal task directions; there are no additional inducing points for centring. A degree-four Gaussian Taylor kernel approximation provides 126 explicit centring features. We use ranks , minimum admissible weight 0.01 and main-sample correlation conditioning threshold . A separate one-worker timing check used 12 replications per frequency budget. Mean fitting times (NY-MM-TCRF versus ORF) were 1.269 versus 1.206 seconds at and 1.368 versus 1.459 seconds at . Bootstrap 95% intervals for the corresponding ratios of mean times were [0.998, 1.107] and [0.864, 1.020]. These times include pilot construction, Taylor centring, feature matrix construction, calibration and the ridge solve, but exclude data generation, the reference fit, bandwidth selection and frequency generation. The intervals include unity, so the measured runtimes do not establish an equal-time advantage.
The benchmark is a separately fitted 500-inducing-point Nyström KRR, not full exact KRR. Orthogonal random features (ORF) use frequencies generated in independent blocks of orthogonal directions with radial corrections. ORF has frequencies, whereas NY-MM-TCRF has prediction frequencies and frequencies used only for task pilot construction.
At and 800, the closed-form method reduces frequency-approximation RMSE relative to the pilot-budget-matched ORF reference by 6.9% and 8.3%, respectively; at the difference is not resolved. Table E.2 reports the complete pilot-inclusive frequency grid for . This does not establish superiority in predictive risk against the true regression function or on an equal-wall-time basis.
For , we explored and four independent seeds for on the first 50 replications while holding the training data, main/pilot frequencies and pilot landmarks fixed. The choice was then validated on the remaining 50 replications. The resulting ratios of mean RMSE for relative to were 0.978 on the exploratory half and 0.975 on the held-out half (95% paired-bootstrap interval [0.959, 0.990] on the latter). With 100 replications in total, the mean selected ranks for and were 15.94 and 13.70, respectively. Changing the design point count alters the available principal task space, so this is a model-specific tuning effect rather than a monotonicity theorem. The results for in Table E.1 were computed using different data seeds from those used to select at .
For the runs with fresh data seeds, the mean NY-MM-TCRF RMSE (Monte
Table E.1: Large-sample closed-form KRR approximation with the pilot-inclusive frequency budget (, , 100 paired replications). RMSE is measured against the 500-point Nyström KRR reference. The last column reports the ratio of mean RMSEs with a 95% paired-bootstrap interval.
| ORF () | NY-MM-TCRF () | NY-MM-TCRF () | /ORF | |
|---|---|---|---|---|
| 700 | 0.03196 | 0.03229 | 0.03153 | 0.987 [0.956,1.019] |
| 750 | 0.03184 | 0.03007 | 0.02966 | 0.931 [0.903,0.961] |
| 800 | 0.03129 | 0.02948 | 0.02870 | 0.917 [0.887,0.950] |
Table E.2: Complete pilot-inclusive frequency grid with design points. Each entry is the mean RMSE over 100 paired replications relative to the independently fitted Nyström-500 reference. The last column is a ratio of mean RMSEs with a 95% paired-bootstrap interval.
| ORF () | NY-MM-TCRF () | TCRF/ORF [95% CI] | |
|---|---|---|---|
| 400 | 0.03959 | 0.04272 | 1.079 [1.046,1.113] |
| 500 | 0.03700 | 0.03685 | 0.996 [0.964,1.031] |
| 600 | 0.03453 | 0.03428 | 0.993 [0.962,1.025] |
| 700 | 0.03196 | 0.03229 | 1.011 [0.980,1.042] |
| 750 | 0.03184 | 0.03007 | 0.945 [0.916,0.974] |
| 800 | 0.03129 | 0.02948 | 0.942 [0.913,0.973] |
Carlo SE) was 0.02966 (0.00033) at and 0.02870 (0.00031) at , with mean selected ranks 17.02 and 16.86. The corresponding 100-replication ORF means were 0.03184 and 0.03129; the ratios of means and their paired-bootstrap intervals are reported in Table E.1. On the same paired samples the RMSE ratios of relative to were 0.986 ([0.971, 1.001]) at and 0.973 ([0.960, 0.986]) at .
The small-landmark influence defined in Section 3.2 is exactly centred because its kernel expectations are computed on the landmark set. The large-sample implementation instead approximates coefficients of the full-data influence and may also approximate the kernel used to centre it. Let and approximate and , respectively, and let be the degree- Taylor approximation of . The implemented influence is
Because and , its spectral mean is . Thus approximate Nyström coefficients alone preserve exact centring when the kernel expectation is retained, whereas Taylor centring can introduce a nonzero spectral mean. For the implemented calibration vector , write . If the weights are normalised to , exact empirical balance gives
Hence exact empirical balance and exact population centring are distinct; a fixed Taylor degree does not by itself make vanish as , whereas the fixed-rank projection and second-order theorems of Section 3 assume exactly centred calibration functions. To quantify the centring error, condition on the training dataset, the calibration directions and the selected rank , let be the th implemented control, and put and
where is the empirical standard deviation of the th implemented control over the prediction frequencies, with when . An independent diagnostic experiment with 100 datasets and three frequency budgets evaluated for a Taylor-centred variant that uses a Nyström influence with 100 landmarks, principal directions estimated from the prediction frequencies and exponential-tilting weights. Over its 300 fits the median and maximum of were 0.30 and 0.69. These diagnostics belong to that separate experiment and are not matched to the RMSE entries of Table E.1; is a standardised diagnostic of centring error, not a confidence bound, and the moment-matched frequencies and the data-adaptive selection of directions preclude interpreting as an automatically valid sampling standard error.
F Derivation of the estimated-sampler expansion
We derive the first-order expansion used in Section 2.1. Retain its notation: are independent from , , and . Assume a common support, an interior true parameter, nonsingular Fisher information , and the usual differentiability, integrability, and likelihood regularity conditions.
Since is the MLE computed from these same observations, Taylor expansion of its score equation and the information identity give
and hence
Differentiating the importance weight with the observations held fixed,
Because and , the expectation of this derivative is . A Taylor expansion of the weighted average around therefore yields
The remainder in (F.2) follows from the assumed smoothness and a uniform law of large numbers for the derivative near . Substituting (F.1) gives
The subtracted term is the projection of onto the score span. Thus the -scale asymptotic variance is
The covariance cancellation in (F.3) relies on using the same sample for and . Although is constant in , the derivative above keeps the sampling distribution fixed at .