[MRG]Add UnifOrtho sampling of slicing directions for Sliced Wasserstein - #853
Open
Samuel-Vangu wants to merge 4 commits into
Open
Samuel-Vangu wants to merge 4 commits into
Samuel-Vangu wants to merge 4 commits into
Conversation
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #853 +/- ##
========================================
Coverage 96.85% 96.85%
========================================
Files 128 128
Lines 26160 26268 +108
========================================
+ Hits 25337 25443 +106
- Misses 823 825 +2 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
Motivation and context / Related issue
The Sliced Wasserstein distance only supports a low-discrepancy sampling
alternative to plain Monte Carlo (QSW/RQSW, PR #838) for
dim == 3. Thisleaves no principled alternative in higher dimension, where variance
reduction matters most.
Adds UnifOrtho sampling: independent blocks of mutually orthogonal
directions, drawn from the Haar measure on
O(dim), defined for anydimand recommended specifically for large dimension by a recentnumerical and theoretical study. Reuses the existing
get_random_rotationsdirectly, requiring no new randomization primitive.
Closes #850 .
How has this been tested (if it applies)
within a block, correctness for arbitrary dimensions (including
non-multiples of
dim), seed reproducibility, cross-backend consistency(NumPy, PyTorch, JAX, TensorFlow), and reduced approximation error
compared to uniform sampling in high dimension against a closed-form
reference distance.
plot_uniortho.py) demonstrating both theorthogonal block structure and the convergence gain in high dimension.
PR checklist