Interpretable Distribution Features with Maximum Testing Power

Wittawat Jitkrittum, Zoltán Szabó, Kacper P. Chwialkowski, Arthur Gretton

Introduction

This paper introduces a novel approach to comparing two probability distributions by identifying the specific "features"—spatial or frequency locations—where they differ most. By optimizing these features to maximize statistical test power, the authors create a linear-time two-sample test that is not only as accurate as state-of-the-art quadratic-time methods but also provides human-interpretable explanations of how the distributions diverge.

The Challenge of Two-Sample Testing

In machine learning and statistics, researchers frequently need to determine if two sets of data come from the same distribution (known as the "two-sample test"). A common application is evaluating whether a generative model produces images that genuinely match the real dataset.

The standard tool for this task is the Maximum Mean Discrepancy (MMD). While powerful, MMD has two major drawbacks:

  1. Computational Cost: The most accurate version of MMD scales quadratically with the number of samples ($O(n^2)$), making it prohibitively slow for large datasets.
  2. Interpretability: MMD typically returns a single scalar value. In high-dimensional spaces like images or text, it is incredibly difficult to visualize why the test rejected the null hypothesis.

The authors aim to bridge this gap by creating a test that is computationally efficient (linear time) and points directly to the "witness points" or features that distinguish the two groups.

Proposed Methods

The authors propose two new "semimetrics" based on analytic representations of distributions:

  • Mean Embedding (ME) Test: This method looks for differences in expectations of analytic functions at specific spatial locations. Think of these as "sensor points" placed in the data space to detect where probability mass differs.
  • Smooth Characteristic Function (SCF) Test: This performs a similar comparison, but operates in the frequency domain.

The Key Innovation: Optimizing for Power Instead of picking test locations randomly, the authors derive a lower bound on the statistical test power (the probability of correctly detecting a difference). They employ a "split-data" approach:

  1. Training Phase: Use half the data to optimize the test locations (and the kernel width) using gradient ascent to maximize the power proxy.
  2. Testing Phase: Use the remaining half of the data to run the actual statistical test using these optimized features.

Because the test only evaluates the distributions at a small, fixed number of optimized locations ($J$), the computation remains linear ($O(n)$) relative to the sample size.

Experimental Setup

The researchers evaluated their methods on a mix of synthetic and high-dimensional real-world data:

  • Toy Problems: Gaussian Mean Difference (GMD), Gaussian Variance Difference (GVD), and a "Blobs" dataset consisting of grid-arranged Gaussians with subtle local differences.
Blobs dataset samples showing subtle local differences between distributions P and Q.
  • NIPS Papers: A text dataset where papers are represented as 2000-dimensional "bag-of-words" vectors (TF-IDF). The goal was to distinguish between categories like "Deep Learning" vs. "Neuroscience."
  • KDEF Facial Expressions: A dataset of human faces showing different emotions (Happy, Neutral, Surprised vs. Sad, Angry, Disgusted), resized to 1632-dimensional grayscale images.

Key Findings

  • Power as an Objective: The most striking idea is using the "ease of rejecting the null hypothesis" as a training signal. By maximizing the test power, the algorithm naturally gravitates toward the most discriminative regions of the data space.
  • Interpretability via Locations: In the ME test, the optimized locations are the explanation. When comparing two text distributions, if the optimized "test location" has high values for the words "Markov" and "Gibbs," researchers know exactly which topics distinguish the two sets of papers.
  • Spatial vs. Frequency: The paper demonstrates that spatial features (ME) are excellent for detecting shifts in mean or variance, while frequency features (SCF) are superior for detecting localized, periodic differences (like the "Blobs" problem).
  • Performance: On the "GVD" and "Blobs" tasks, the optimized ME-full and SCF-full tests significantly outperformed their non-optimized versions. By being "smart" about where to look, these linear-time tests can actually outperform the standard quadratic-time MMD, which essentially tries to look everywhere at once and can get lost in the noise of high dimensions.
Test power comparison on the GVD dataset as sample size increases.
  • Real-World Interpretability:
    • Text Analysis: When distinguishing "Bayesian" from "Neuroscience" papers, the ME test identified words like spike, markov, cortex, and gibb as the primary discriminators.
  • Image Analysis: In the facial expression test, the "average" optimized test location (visualized as an image) clearly highlighted the nasolabial folds (smile lines) and the mouth area as the key features distinguishing positive emotions from negative ones.

Limitations and Future Work

  • Data Splitting: The method requires splitting the data into training and testing sets. While this ensures statistical validity, it effectively reduces the number of samples available for the final test.
  • Non-Convexity: The optimization objective for finding test locations is non-convex. While the authors found gradient ascent worked well with good initialization, there is no guarantee of finding the global optimum.
  • Kernel Constraints: The theoretical consistency was proven specifically for Gaussian kernels. Extending this framework to a wider variety of kernels or more complex deep-learning-based features remains a natural next step for future research.

Summary updated

BibTeX
@inproceedings{jitkrittum2016interpretable,
  author = {Wittawat Jitkrittum and Zoltán Szabó and Kacper P. Chwialkowski and Arthur Gretton},
  title = {{Interpretable Distribution Features with Maximum Testing Power}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2016},
  url = {https://openreview.net/forum?id=QOeZM5Ia-D},
}
Figure