Pith. sign in

REVIEW 3 major objections 4 minor 8 references

Maximum Mean Discrepancy with Unequal Sample Sizes via Generalized U-Statistics

T0 review · 3 major / 4 minor · reviewed 2026-08-03 · deepseek-v4-flash

Pith's one-line read This paper establishes the asymptotic distributions of the MMD estimator for two-sample tests with unequal sample sizes, scaling with the smaller sample, and thereby enables kernel selection that uses all available data.

desk verdict Solid extension of MMD asymptotics to unequal sample sizes, but the variance proof has a kernel mismatch and the power criterion has an acknowledged gap for non-analytic kernels with disjoint supports. read the letter →

arxiv 2512.13997 v2 pith:HCV56LB3 submitted 2025-12-16 stat.ML cs.LGmath.STstat.MEstat.TH

classification stat.MLcs.LGmath.STstat.MEstat.TH MSC 62G1062G2062E20
keywords MaximumMeanDiscrepancygeneralizedU-statisticstwo-sampletestingunequalsamplesizesasymptoticdistributiondegeneratekernelselectiontestpower
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper establishes the asymptotic theory needed to run Maximum Mean Discrepancy (MMD) two-sample tests when the two sample sizes are unequal, removing the usual requirement of equal subsamples or proportional sample sizes. The key finding is that the standard unbiased MMD estimator, scaled by the smaller sample size n = min(nX, nY), has a well-defined null limit—a weighted shifted chi-square distribution—and a normal limit under the alternative, even when one sample is asymptotically dominant. This yields a practical power criterion, MMD^2 divided by the asymptotic standard deviation, which can be maximized to choose kernels without discarding any data. The paper also clarifies a subtle degeneracy property: zero MMD forces the estimator to be degenerate, but a degenerate estimator can sometimes occur with nonzero MMD, though not under common analytic or overlapping-support conditions.

What carries the argument

The central object is the MMD estimator written as a two-sample generalized U-statistic with kernel h(x, x'; y, y') = k(x,x') + k(y,y') - (1/2)[k(x,y') + k(x',y) + k(x,y) + k(x',y')]. This lets the authors apply a new asymptotic theory for generalized U-statistics that allows sample sizes to grow at different rates, with n = min(nX, nY) as the natural scaling. The variance decomposition in Theorem 3.4, expressed through the covariance operators and mean embeddings of the two distributions, identifies the leading terms and yields the degeneracy conditions; the same machinery yields the first-order degenerate limit via an SVD of the conditional kernels.

What would settle it

Run a simulation with P = N(0,1), Q = N(0,1.2), a Gaussian kernel, and nX = 100, nY = 10,000; if the empirical distribution of sqrt(min(nX,nY)) * (MMD^2 - MMD^2) does not match a normal distribution with variance 4 zetaX + 0.04 zetaY (zetaX, zetaY estimated from the samples), the normality claim fails. Alternatively, with P = Q, the quantiles of min(nX,nY) * MMD^2 must match the weighted shifted chi-square of Theorem 3.7.

Watch

Extended reading notes

Core claim

On the authors' own terms, the central discovery is that the ordinary unbiased MMD estimator, viewed as a two-sample generalized U-statistic, remains asymptotically tractable when nX does not equal nY, provided the scaling is min(nX, nY). Under the null MMD = 0, min(nX, nY) times the estimator converges to (rhoX + rhoY) times a weighted shifted chi-square sum, where rhoX and rhoY are the limiting ratios of the smaller sample size to each sample size. Under a non-degenerate alternative, sqrt(min(nX, nY)) times the centered estimator converges to a normal distribution with variance 4 rhoX zetaX + 4 rhoY zetaY. These limit laws justify choosing a kernel by maximizing the signal-to-noise ratio M

Load-bearing premise

The power-criterion and normality results hinge on the estimator being non-degenerate under the alternative, a condition the paper proves in common settings but leaves open for continuous non-analytic kernels with disjoint supports.

Editorial extensions

If this is right

  • Two-sample MMD tests remain valid with unequal sample sizes: no need to subsample or discard data, and power increases as more data is used.
  • Kernel choice for MMD tests can be optimized under unequal sample sizes by maximizing the estimated signal-to-noise ratio MMD^2/(sigma_hat + lambda), with sigma_hat computed via simple plug-in estimators from the kernel matrices.
  • The null limiting distribution (a weighted shifted chi-square) supports the common practice of permutation thresholds, while the alternative normal limit gives a consistent test as long as MMD is positive and the non-degeneracy condition holds.
  • When sample sizes are equal, the new formulas reduce to the previously known U-statistic results, unifying equal and unequal cases.
  • The degeneracy results correct the assumption that nonzero MMD always yields a non-degenerate estimator; a degenerate estimator with nonzero MMD can occur, but not under real-analytic kernels with positive-mass supports or continuous kernels with overlapping supports.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • Inference: the asymptotic variance being governed by the smaller sample implies that collecting additional data from the larger group has diminishing returns once one sample dominates; the paper does not draw this practical conclusion explicitly.
  • Inference: the variance decomposition in Theorem 3.4 could be used to construct unbiased variance estimators for unequal sample sizes, paralleling existing unbiased estimators for equal sizes; this would likely improve finite-sample kernel selection.
  • Inference: the degeneracy counterexample (disjoint supports with a compact kernel) suggests that practitioners using kernels whose support is disjoint from the data (for instance in anomaly detection) may need to verify that the normal approximation holds, because the leading variance terms can behave unexpectedly.
  • Inference: the generalized U-statistic theory for first-order degeneracy may transfer to other two-sample statistics beyond MMD, such as energy distance, enabling unequal-sample-size analysis for those methods.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 4 minor

Summary. The paper extends the asymptotic theory of the unbiased Maximum Mean Discrepancy (MMD) estimator to settings with unequal sample sizes by representing it as a generalized U-statistic. The main theoretical results are: (i) a null limiting distribution for min(nX,nY)·MMD² when MMD²=0, valid also in non-proportional regimes such as nY = nX²; (ii) asymptotic normality of √min(nX,nY)(MMD²−MMD²) under a non-degenerate alternative, with variance 4ρXζX + 4ρYζY; (iii) a characterization of degeneracy showing that a nonzero MMD can still produce a degenerate estimator, though not in typical analytic-kernel settings; and (iv) a proposed power-optimization criterion based on the ratio MMD²/σ. The paper also gives an exact finite-sample variance formula (Theorem 3.4) and reports experiments on Gaussian data and CIFAR-10 vs. CIFAR-10.1.

Significance. If the main results are made fully correct, the paper fills a real gap: MMD-based kernel choice has mostly assumed equal sample sizes, wasting data when sizes differ, and previous proportional-regime asymptotics do not cover cases like nY = nX². The paper is also valuable for its transparent treatment of degeneracy, including an explicit example of first-order degeneracy under a nonzero MMD, and for clearly stating the unresolved continuous non-analytic disjoint-support case. Detailed proofs are provided in appendices. However, the exact variance claim in Theorem 3.4 is false as stated, and the derivation of the power approximation contains a recurring algebraic error. These issues require a substantial revision before the paper can be accepted.

major comments (3)
  1. [Section D / Theorem 3.4] The proof uses h(x,x';y,y') = ⟨k(x,·)−k(y,·), k(x',·)−k(y',·)⟩, which is not the block-symmetric kernel (6) and is not symmetric under per-block permutations. Sen's variance formula (7) does not apply to this h. The resulting variance formula is incorrect. Counterexample: let k(x,y)=xy, P=N(1,1), Q=N(0,1), nX=nY=3. Direct expansion of (1) gives Var = 4/3δ²(σP²+σQ²)+1/3(σP⁴+σQ⁴)+4/9σP²σQ² = 34/9 for δ=1, σP=σQ=1. Theorem 3.4 evaluates to 8/9+8/9+1/3+1/3+4/9+4/9 = 30/9. The leading O(1/n) terms are correct, but the exact finite-sample formula is false. This invalidates Theorem 3.4 and any finite-sample variance corrections built on it.
  2. [Sections 2.4 and 3.3] The power approximation contains a repeated algebraic error. From the normal limit, n·MMD² > cα is equivalent to T_n > (cα − n·MMD²)/(σ√n) = cα/(σ√n) − √n·MMD²/σ. The manuscript instead writes (cα√n − √n·MMD²)/σ and consequently derives the CDF as Φ(√n·MMD²/σ − cα√n/σ). The correct expression is Φ(√n·MMD²/σ − cα/(σ√n)). The asymptotic dominance of MMD²/σ is unaffected, but the displayed formula is not correct as written.
  3. [Section 5 / Corollary 3.9] The power criterion MMD²/σ is presented as a general method, but it is only established when the estimator is non-degenerate with positive limiting variance. The manuscript explicitly leaves open the case of continuous non-analytic kernels with disjoint supports, relevant to neural-network kernels. In that regime ζX or ζY can vanish (e.g., the triangular-kernel example in Theorem 2.7(ii)), so the sqrt(n) normal approximation and the power criterion are not guaranteed. This is acknowledged in the conclusion, but the abstract and introduction state the power-optimization result more broadly than the assumptions currently justify.
minor comments (4)
  1. [Corollary 3.9] The second variance term is typographically wrong: ζY should be ⟨µP−µQ, C_Q(µP−µQ)⟩, not ⟨µP−µQ, C_P(µP−µQ)⟩. The plug-in formulas in Section 3.3 use the correct definition.
  2. [Proof of Theorem 3.7] The proof says 'so we seek to use Theorem 3.7' but the intended reference is Theorem E.5. Also, the displayed definition of ˜hYY contains a typo: it should be ⟨φ(Y)−µP, φ(Y')−µP⟩, not an expression involving X and Y.
  3. [Appendix E, Lemma E.3] The statement of the lemma uses \widehat{U}_{n,r+1}, but the proof concludes a bound involving \widehat{U}_{n,r}. The notation should be aligned to avoid confusion about which projection is being controlled.
  4. [Equation (6)] The kernel h is written with i and j reused for both X and Y blocks, which is easy to misread. Using four distinct argument names (e.g., x1,x2;y1,y2) would make the block-wise symmetry and the cross-term structure clearer.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the asymptotic distributions and power criterion are derived in the paper from generalized U-statistics theory, with proofs reproduced in the appendix; self-citations are supporting, not load-bearing.

full rationale

The paper's central derivation chain is self-contained. The main results (Theorem 3.7, Corollary 3.9, and the variance formula Theorem 3.4) are proved from stated assumptions on the kernel and distributions, using textbook U-statistics asymptotics and a generalized U-statistic theorem (Theorem E.5) whose proof is included in the appendix. No parameter is fitted to data and then re-derived as a prediction; the power criterion MMD^2/σ is a population signal-to-noise ratio obtained as a corollary of the asymptotic normality result, not an output that has been baked into the inputs. The self-citations to He et al. (2025) and Sutherland & Deka (2019) are not load-bearing: Proposition 2.6 says it 'uses the approach of He et al. (2025, Theorem 6.1)' but the proof is reproduced in Section B, and Sutherland & Deka (2019) is cited only for comparison with prior unbiased variance estimators. The acknowledged limitation in Section 5 — that positivity or sign-matching of ζX and ζY is not established for continuous non-analytic kernels with disjoint supports — is a genuine gap in the scope of the power criterion, but it is an explicitly stated assumption limitation rather than a circular reduction. Within Setting B and the stated regularity conditions, the degeneracy characterization (Theorem 2.7) is proved using external results (Chwialkowski et al. 2015, Mityagin 2015), not by assuming the target conclusion. Thus the paper's claims do not reduce by construction to their inputs, and no specific circular step can be exhibited.

Assumptions & free parameters 0 free parameters · 7 assumptions · 0 invented entities

No free parameters are fitted to data in the derivations; the kernel, P, Q, and sample sizes are inputs. No new entities are postulated. The central claims rest on standard RKHS assumptions, classical U-statistics theory, and explicitly stated analyticity/support conditions.

assumptions (7)
  • domain assumption Setting A: k induces a separable RKHS and E k(X,X) is finite for all considered distributions.
    Used throughout to guarantee mean embeddings, covariance operators, and square-integrability of kernel products (Section 2.1, Prop 2.1).
  • domain assumption Setting B: X=R^d, k is real-analytic, sup k(x,x) is finite, and supports of P and Q each have positive Lebesgue measure.
    Used for Theorem 2.7(iv)/(v) and for positivity of the asymptotic variance in Corollary 3.9.
  • domain assumption Samples S_P and S_Q are mutually independent and i.i.d. from P and Q respectively.
    Standard two-sample testing setup assumed in the estimator definition and all limit theorems.
  • standard math Sen (1974) variance formula for c-sample generalized U-statistics.
    Basis for the exact variance decomposition of the MMD estimator in Theorem 3.4.
  • standard math Classical U-statistic asymptotic results of Lee and Serfling for non-degenerate and degenerate U-statistics.
    Background for the CLT and chi-square limits; the paper extends these to unequal sample sizes and asymmetric kernels.
  • standard math Hilbert-Schmidt operator theory and the singular value decomposition of square-integrable kernels (Lemma E.4).
    Used for the eigenvalue expansions in Theorem E.5 and the null distribution of MMD.
  • domain assumption Square-integrability of the conditional kernels in Theorem E.5.
    In the MMD case this follows from Setting A via Proposition 2.1, but it is stated as an assumption for the general theorem.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Maximum Mean Discrepancy with Unequal Sample Sizes via Generalized U-Statistics." pith.science (2026). https://pith.science/paper/HCV56LB3

@misc{pith2026251213997,
  author       = {Pith},
  title        = {Pith review of: Maximum Mean Discrepancy with Unequal Sample Sizes via Generalized U-Statistics},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/HCV56LB3}},
  note         = {Machine review of arXiv:2512.13997}
}
read the original abstract

Existing two-sample testing techniques, particularly those based on choosing a kernel for the Maximum Mean Discrepancy (MMD), often assume equal sample sizes from the two distributions. Applying these methods in practice can require discarding valuable data, unnecessarily reducing test power. We address this long-standing limitation by extending the theory of generalized U-statistics and applying it to the usual MMD estimator, resulting in new characterization of the asymptotic distributions of the MMD estimator with unequal sample sizes (particularly outside the proportional regimes required by previous partial results). This generalization also provides a new criterion for optimizing the power of an MMD test with unequal sample sizes. Our approach preserves all available data, enhancing test accuracy and applicability in realistic settings. Along the way, we give much cleaner characterizations of the variance of MMD estimators, revealing something that might be surprising to those in the area: while zero MMD implies a degenerate estimator, it is sometimes possible to have a degenerate estimator with nonzero MMD as well; we give a construction and a proof that it does not happen in common situations.

Figures

Figures reproduced from arXiv: 2512.13997 by the authors.

Figure 1
Figure 1. Histograms of n MMD \2 for P = Q = Laplace(0, 1/ √ 2) and a unit-lengthscale Gaussian kernel; orange (top) rows use n = min(nX, nY ), while blue (bottom) rows use n = nX +nY . In the proportional set￾ting (panel a), both converge; the only difference is a constant scaling, since nX + nX/2 = 3 min(nX, nX/2). In the non-proportional setting (panel b), however, it is clear that the nX + nY scaling is not converging in … view at source ↗
Figure 2
Figure 2. Histograms of √ n(MMD \2 − MMD) for P = Laplace(0, 1/ √ 2), Q = Laplace(0, 3), and k is a unit￾lengthscale Gaussian kernel; here MMD(P, Q) > 0 is estimated based on 5000 samples. As in [PITH_FULL_IMAGE:figures/full_fig_p008_2.png] view at source ↗
Figure 3
Figure 3. Type-I error rate stays controlled as nX changes, while the power increases. CIFAR-10 vs. CIFAR-10.1. In this experiment, we compare the test subset of CIFAR-10 (Krizhevsky, 2009), consisting of 10,000 images, with the CIFAR-10.1 dataset (Recht et al., 2019) of 2,031 images. Following the experimental setup of Liu et al. (2020), we extend the framework to accommodate unequal sample sizes, taking advantage of the fle… view at source ↗

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

8 extracted references · 3 linked inside Pith

  1. [1]

    Two-Sample Test Statistics for Measuring Discrep- ancies Between Two Multivariate Probability Density Functions Using Kernel-Based Density Estimates

    N.H. Anderson, P . Hall, and D.M. Titterington (1994). “Two-Sample Test Statistics for Measuring Discrep- ancies Between Two Multivariate Probability Density Functions Using Kernel-Based Density Estimates.” InJournal of Multivariate Analysis50.1, pp. 41–54. Mikołaj Bi ´ nkowski, Danica J. Sutherland, Michael Arbel, and Arthur Gretton (2018). “Demystifying...

  2. [2]

    The same holds for changing a singley i. This difference is also mean zero, so since all of the2nargumentsx i,yi are mutually independent, we can apply McDiarmid’s inequality to get Pr ( | \MMD2− \MMDU 2|≤ 8K n2 √ 1 2(2n) log 2 δ ) ≥1−δ. B Proof of U-statistic variance decomposition (Proposition 2.6) Proposition 2.6.In Setting A, we have that Var SP∼Pn SQ...

  3. [5]

    These have nonzero kernel covariance operators: for instance, ⟨k(1,·),C Pk(1,·)⟩= Var X∼P [k(1,X)] = 1 2·1 2 + 1 2·0 2− (1 2·1 + 1 2·0 )2 = 1 2− 1 4 = 1 4 >0

    For a degenerate case, considerX=R,k(x,y) = max(1−|x−y|,0),P= Uniform({1,2}), andQ= Uniform({3,4}). These have nonzero kernel covariance operators: for instance, ⟨k(1,·),C Pk(1,·)⟩= Var X∼P [k(1,X)] = 1 2·1 2 + 1 2·0 2− (1 2·1 + 1 2·0 )2 = 1 2− 1 4 = 1 4 >0. We also haveµ P ̸=µ Q, as can be seen by considering their inner products with e.g.k(2.2,·), or be...

  4. [6]

    For (iii), letxbe in the support ofP, and suppose that∆ =µ P−µQ has∆(x)̸=c P

    But notice that ∥µP−µQ∥2 =⟨µ P,∆⟩−⟨µ Q,∆⟩=E X∼P [∆(X)]−E Y∼Q [∆(Y)] =c P−cQ, and so ifcP =c Q thenµP =µ Q. For (iii), letxbe in the support ofP, and suppose that∆ =µ P−µQ has∆(x)̸=c P . But then by continuity there is an open neighbourhoodNx∋xfor which|∆(x ′)−c P|>ϵfor allx ′∈N x; sincexis in the support ofP,P(N x)>0, contradicting that∆(x) =c P P-almost ...

  5. [7]

    The result follows. 22 E Asymptotics of Generalized U-statistics This section characterizes the asymptotic behaviour of generalized U-statistics by filling in and generalizing the approach of Serfling (1980, Chapter 5). Throughout the section we fix a generalized U-statisticU n constructed from the kernelh(x 11,...,x m11,...,x 1c,...,x mcc)and random samp...

  6. [8]

    Therefore the final term vanishes asL→∞

    It is a standard result that∥k∥ 2 =∥T∥ HS. Therefore the final term vanishes asL→∞. Observe that ˆUn,2 is a linear combination of the conditional kernels ˜hjj :=E( ˜h(X)|X 1j =·,X 2j =·),1≤j≤c ˜hst :=E( ˜h(X)|X 1s =·,X 1t =·),1≤s<t≤c. Now assuming each ˜hjj∈L 2(µ2 j)and ˜hst∈L 2(µs×µt)leads to a variety of kernel decompositions. For the symmetric kernel ˜...

  7. [825]

    A Class of Statistics with Asymptotically Normal Distribution

    Wassily Hoeffding (1948). “A Class of Statistics with Asymptotically Normal Distribution.” InAnnals of Mathematical Statistics19, pp. 308–334. Sadeep Jayasumana, Srikumar Ramalingam, Andreas Veit, Daniel Glasner, Ayan Chakrabarti, and Sanjiv Kumar (2024). “Rethinking FID: Towards a Better Evaluation Metric for Image Generation.” InCVPR. Ilmun Kim, Sivaram...

  8. [2291]

    Weak Convergence of GeneralizedU-Statistics

    Pranab Kumar Sen (1974). “Weak Convergence of GeneralizedU-Statistics.” InThe Annals of Probability2.1, pp. 90–102. Robert J. Serfling (1980).Approximation Theorems of Mathematical Statistics. Wiley Series in Probability and Mathematical Statistics. Hoboken, New Jersey: Wiley.DOI:10.1002/9780470316481. Bharath K. Sriperumbudur, Kenji Fukumizu, and Gert R....

Pith tools

Reviewed August 3, 2026 · model on record in the stance chip above.