Introduction: The Challenge of Model Selection
In modern machine learning, researchers and practitioners are frequently faced with multiple generative models—such as competing GAN architectures—and must decide which one is "better." Traditional goodness-of-fit tests ask a strict question: Does this model perfectly match the data? In high-dimensional spaces, the answer is almost universally "no," rendering the test results trivial and unhelpful for practical model selection.
A more useful question is relative: Given two candidate models $P$ and $Q$, which one is closer to the real data $R$, and in what specific ways?
Existing solutions, such as the Relative Maximum Mean Discrepancy (Rel-MMD) test, suffer from two major flaws. First, they carry a quadratic computational cost ($O(n^2)$), making them painfully slow for large datasets. Second, they lack interpretability; they provide a single scalar score but fail to explain why one model is better or where the models are failing in the data space.
Proposed Methods: Rel-UME and Rel-FSSD
To address these limitations, this paper introduces two new nonparametric statistical tests that run in linear time ($O(n)$) and provide interpretable "informative features." These tests extend recent work on witness functions to compare models relative to a target dataset:
- Rel-UME (Relative Unnormalized Mean Embeddings): A sample-based test that compares samples from model $P$ and model $Q$ against the target data $R$. It evaluates which model places probability mass more accurately relative to the target distribution.
- Rel-FSSD (Relative Finite-Set Stein Discrepancy): A density-based test requiring access to the gradients of the models' log-densities. It evaluates the "shape" or local structure of the model distributions, penalizing models whose derivatives differ most from the target.
The "Aha!" Innovation: Instead of picking random points to compare the models, the researchers optimize a set of "test locations" to maximize the statistical power of the test. If the test rejects the null hypothesis (meaning one model is definitively better), these optimized locations serve as a visual diagnostic—informative features—showing the user the specific regions in the data space where one model significantly outperforms the other.
Key Insights and Spatial Diagnostics
- Relative is Better than Absolute: In an era where "all models are wrong," a relative test provides the only meaningful signal for model selection and iterative improvement.
- Spatial Diagnostics: The ability to produce informative features is a game-changer for debugging generative models. For example, in MNIST experiments, the test can reveal that a GAN improved its generation of the digit "6" but simultaneously degraded its ability to generate "3" and "9" during the same training window.
- Mass vs. Shape: Rel-UME and Rel-FSSD are complementary tools. Rel-UME identifies where a model has too much or too little probability mass, while Rel-FSSD identifies where the local "flow" of the density is incorrect.
Experimental Results
The authors evaluated their methods on a mix of synthetic benchmarks (Isotropic Gaussians, Gaussian mixtures/Blobs, Restricted Boltzmann Machines) and real-world datasets (CIFAR-10, CelebA, MNIST).
The experiments yielded several compelling results:
- Speed and Scalability: By reducing complexity from $O(n^2)$ to $O(n)$, the new tests are an order of magnitude faster than the state-of-the-art Rel-MMD. This allows them to be integrated into standard training pipelines for large-scale generative models without becoming a bottleneck.
- Local Sensitivity: On the "Blobs" dataset, where differences between distributions are localized and small-scale, Rel-UME significantly outperformed Rel-MMD. Its optimized test locations successfully "zoomed in" on discrepancies that the median-heuristic kernel of MMD smoothed over.
- Calibration: Unlike the popular Fréchet Inception Distance (FID), which can yield misleading results when two GANs have equal goodness of fit, the proposed tests feature a well-calibrated threshold. This allows users to strictly control the false positive rate.
Limitations and Future Work
While powerful, the proposed methods have a few constraints. Rel-FSSD requires the gradient of the log-density. While available for many energy-based models, this is not directly accessible for "implicit" models like standard GANs (which only provide samples); in such cases, users must rely on Rel-UME. Additionally, the optimization of test locations depends on a good initial pool of candidates.
Finally, the current tests require a fixed ordering (e.g., asking "Is $Q$ better than $P$?") beforehand, which dictates whose strengths the test locations will prioritize. Investigating a more symmetric approach remains a fruitful area for future research.
Summary updated