You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add lazy EMD solver with O(n) memory requirement (#788)
* Add lazy EMD solver with on-the-fly distance computation
- Implement emd_c_lazy in C++ network simplex for memory-efficient OT
- Add lazy mode to emd2() accepting coordinates (X_a, X_b) instead of cost matrix
- Support sqeuclidean, euclidean, and cityblock metrics
- Add __restrict__ for SIMD optimization
- Remove debug output from network_simplex_simple.h
- Add tests for lazy solver and metric variants
* Add emd2_lazy function and fix SciPy sparse matrix compatibility
* small fix errors not appearing locally
* Fix SciPy version compatibility for distance metrics
* fixed issues added Release info
* Modified OpenMP implementation to allow build
* Removed set cost array with bulk
* Updated release
Copy file name to clipboardExpand all lines: RELEASES.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,18 @@
2
2
3
3
## 0.9.7.dev0
4
4
5
-
This new release adds support for sparse cost matrices in the exact EMD solver. Users can now pass sparse cost matrices (e.g., k-NN graphs, sparse graphs) and receive sparse transport plans, significantly reducing memory footprint for large-scale problems. The implementation is backend-agnostic, automatically handling scipy.sparse for NumPy and torch.sparse for PyTorch, and preserves full gradient computation capabilities for automatic differentiation in PyTorch. This enables efficient solving of OT problems on graphs with millions of nodes where only a sparse subset of edges have finite costs.
5
+
This new release adds support for sparse cost matrices and a new lazy EMD solver that computes distances on-the-fly from coordinates, reducing memory usage from O(n×m) to O(n+m). Both implementations are backend-agnosticand preserve gradient computation for automatic differentiation.
6
6
7
7
#### New features
8
+
- Add lazy EMD solver with on-the-fly distance computation from coordinates (PR #788)
8
9
- Migrate backend from deprecated `scipy.sparse.coo_matrix` to modern `scipy.sparse.coo_array` (PR #782)
9
-
- Geomloss function now handles both scalar and slice indices for i and j. Using backend agnostic reshaping. Allows to do plan[i,:] and plan[:,j] (PR #785)
10
+
- Geomloss function now handles both scalar and slice indices for i and j (PR #785)
10
11
- Add support for sparse cost matrices in EMD solver (PR #778, Issue #397)
0 commit comments