Okay, you're proposing a method to compare a model distribution (M) to a human distribution (H) using the Wasserstein distance and a bootstrapping approach for interpretation. Let's break down the validity and potential for this approach, and whether similar methods exist.
Here's a summary of your idea:
- Calculate the Wasserstein distance: Compute the Wasserstein distance between the human distribution (H) and the model distribution (M). This gives you a measure of how different the two distributions are.
- Bootstrap on H: Create N bootstrap samples from the human distribution (H).
- Calculate mean distance between bootstrapped H samples: For each pair of bootstrapped samples of H, calculate the Wasserstein distance. Then, average these distances. This gives you an estimate of the "typical" variation within the human distribution.
- Comparison and Acceptance: Compare the Wasserstein distance between H and M to the mean Wasserstein distance between bootstrapped versions of H. If the H-M distance is "close" to the mean H-H distance, you consider the distributions to be similar.
Now, let's analyze the validity and potential issues:
Validity:
- Intuitive Interpretation: The core idea is valid. You're trying to establish a baseline for what constitutes a "small" distance, given the inherent variability in the human distribution. Bootstrapping is a reasonable way to estimate this variability.
- Wasserstein Distance Appropriateness: The Wasserstein distance (also known as Earth Mover's Distance) is a good choice for comparing distributions, especially if they have different supports or shapes. It measures the "cost" of transforming one distribution into the other.
- Statistical Rigor Needed: The "closeness" comparison in step 4 needs to be formalized. You can't just eyeball it. You'll need a statistical test or a pre-defined threshold.
Potential Issues and Considerations:
-
Choice of N (Number of Bootstrap Samples): How many bootstrap samples (N) is sufficient? This depends on the variability of H. More variable distributions require larger N. You'll want to perform a power analysis or sensitivity analysis to determine a suitable N. Generally, N should be at least 1000, and often much higher.
-
Defining "Close": How do you define "close" in step 4? You have several options:
- Threshold: Define a fixed threshold (e.g., "If the H-M distance is less than 1.5 times the mean H-H distance, accept"). The choice of threshold is somewhat arbitrary but can be based on domain knowledge.
- Statistical Test: A more rigorous approach would be to construct a confidence interval for the mean H-H distance. Then, see if the H-M distance falls within that interval. Or, you could perform a hypothesis test: Null hypothesis: H and M are from the same distribution. You'd need to figure out the appropriate test statistic and distribution.
- Effect Size: Consider calculating an effect size (e.g., Cohen's d) to quantify the difference between the H-M distance and the mean H-H distance. This gives you a standardized measure of the difference that is less dependent on the sample size.
-
Computational Cost: Bootstrapping can be computationally expensive, especially if H is large or the Wasserstein distance is slow to compute.
-
Assumptions of Bootstrapping: Bootstrapping relies on the assumption that your sample H is representative of the true human distribution. If H is biased, the bootstrapping results will also be biased.
-
Dimensionality: If your distributions are high-dimensional, the Wasserstein distance can become difficult to estimate accurately, and the curse of dimensionality can affect your bootstrapping results. Consider dimensionality reduction techniques if needed.
Has something similar been done?
Yes, the general idea of using bootstrapping to assess the similarity of distributions is a common practice in statistics and machine learning. Here are some related concepts and areas:
- Two-Sample Tests: Classical two-sample tests (e.g., t-test, Kolmogorov-Smirnov test) compare two distributions. However, these tests often make assumptions about the distributions (e.g., normality) that the Wasserstein distance doesn't require. Bootstrapping can be used to create non-parametric versions of these tests.
- Permutation Tests: Permutation tests are another non-parametric approach for comparing distributions. They involve randomly shuffling the data between the two groups (H and M) and calculating a test statistic. This can be used with the Wasserstein distance as the test statistic.
- Goodness-of-Fit Tests: These tests assess how well a sample distribution (M) matches a known distribution (H). Bootstrapping can be used to estimate the null distribution of the test statistic.
- Distributional Robustness: In machine learning, there's a growing interest in ensuring that models perform well not just on the training data, but also on slightly different ("perturbed") versions of the data. Bootstrapping could be used to create these perturbed versions.
In summary:
Your approach is a reasonable starting point for comparing distributions using the Wasserstein distance. However, you need to formalize the comparison step using statistical tests or effect sizes, and carefully consider the assumptions and limitations of bootstrapping. Look into two-sample tests, permutation tests, and goodness-of-fit tests for related techniques.
To find specific examples of people using this approach, consider searching for:
Okay, I've reviewed the search results and here's a refined summary and some specific pointers based on what I found:
Key Points & Validation of Your Approach
- Sound Idea: Your core idea of using the Wasserstein distance combined with bootstrapping to compare a model distribution to a human distribution is a valid and potentially powerful approach. It addresses the need to interpret the magnitude of the Wasserstein distance by comparing it to the inherent variability within the human distribution.
- Wasserstein Distance Justification: The Wasserstein distance is a good choice because it's suitable for comparing distributions with potentially different supports and geometries.
- Bootstrapping Rationale: Bootstrapping provides a way to estimate the variability within the human distribution (H) when you don't have access to the true underlying distribution, only a sample.
Refinements and Considerations Based on Search Results
-
Formalize the Comparison: As mentioned before, you must formalize how you decide if the H-M distance is "close" to the bootstrapped H-H distances. Here are your options, expanded with insights from the search results:
- Statistical Tests: Several search results point to using permutation tests or hypothesis tests in conjunction with the Wasserstein distance.
- Permutation Tests: "[4, 7, 12] The waddR package provides two testing procedures using the 2-Wasserstein distance to test whether two distributions FA and FB given in the form of samples are different by specifically testing the null hypothesis H0:FA=FB against the alternative H1:FA≠FB. The first, semi-parametric (SP), procedure uses a test based on permutations combined with a generalized Pareto distribution approximation to estimate small p-values accurately."[1] You could use a permutation test where you combine the H and M samples, then repeatedly shuffle and re-assign them to two groups (simulating the null hypothesis that they come from the same distribution). Calculate the Wasserstein distance between the shuffled groups for each permutation. Your p-value would be the proportion of times the Wasserstein distance from the permuted samples exceeds the Wasserstein distance you observed between your original H and M.
- "[2] A major methodological contribution of this paper is developing a novel test for the high-dimensional two-sample distribution problem based on the max-sliced Wasserstein distance (Deshpande et al., 2019) and bootstrapping."[2] This result also suggests a direction when dealing with high dimensional data.
- Confidence Intervals: Construct a confidence interval for the mean H-H Wasserstein distance from your bootstrap samples. If the H-M distance falls within that interval, you could consider the distributions similar.
- Effect Size: Calculate a standardized effect size to quantify the difference between the H-M distance and the mean H-H distance.
-
Number of Bootstrap Samples (N): "[14] estimate the Wasserstein distances multiple times, bootstrapping its expected value (36). Not only does this ease the computational burden tremendously (most algorithms for the transportation problem have at least a quadratic dependence on sample size), but it also supplies a quantitative measure of accuracy in the form of the bootstrapped self-distances."[3] The search results don't give a definitive answer for the optimal N, but emphasize the importance of a "sufficient" number to achieve a quantitative measure of accuracy. Consider starting with N = 1000 and evaluating if increasing N further changes your results significantly.
-
High Dimensionality:
- "[2] In this paper, we construct a novel test statistic to detect high-dimensional distributional differences based on the max-sliced Wasserstein distance to mitigate the curse of dimensionality.[2][4][5] By exploiting an intriguing link between the distance and suprema of empirical processes, we develop an effective bootstrapping procedure to approximate the null distribution of the test statistic."[2][4][5] If your distributions are high-dimensional, consider using the "max-sliced Wasserstein distance" to mitigate the curse of dimensionality.[2][4][5]
Specific Search Result Highlights
- [2, 6, 13] These articles discuss using bootstrapping with the max-sliced Wasserstein distance for two-sample testing in high dimensions.[2][4][5] This is highly relevant if your data is high-dimensional.[9]
- [4, 7] The
waddR package in R seems directly applicable for performing hypothesis tests based on the Wasserstein distance.
- [10] This paper proposes using the projected Wasserstein distance to improve performance in high-dimensional settings.[6]
- [12] Mentions
TDAstats that uses Wasserstein distance as a similarity metric between persistent homologies of two point clouds and conducts statistical inference with permutation tests.[10]
- [15] Suggests to resample smaller subseries from the reconstructed trajectory and to estimate the Wasserstein distances multiple times, bootstrapping its expected value.[11]
- [16] Proposes a new two-step test method based on the L2 Wasserstein distance and the approximate distribution of i th sample order statistic.
In conclusion: Your proposed method has a solid foundation. By addressing the statistical rigor of the comparison (point 1 above) and considering the dimensionality of your data, you can create a robust and interpretable method for comparing your model distribution to the human distribution. Make sure to explore the linked resources for specific implementations and theoretical details.