Optimal Transport Distribution Alignment Study
A completed mathematics study comparing exact, entropic, debiased, sliced and unbalanced optimal transport under controlled distribution shifts.

Software compatibility
The pinned project environment and Docker workflow use Python 3.12. No MATLAB, Julia or hosted service is required.
Project definition
Problem statement
Comparing distributions requires more than comparing their means or variances because location, shape, support, contamination and missing mass can change independently.
Optimal transport provides a geometric comparison, but exact, entropic, sliced, debiased and unbalanced formulations answer different questions and their raw values are not always directly comparable.
Project objectives
- Generate deterministic source and target distributions with controlled translation, deformation and contamination.
- Implement exact balanced transport and verify its marginal constraints.
- Study entropic regularisation, numerical stability and transport-plan diffusion.
- Compare exact cost, debiased Sinkhorn divergence, sliced distance and unbalanced transport within their stated boundaries.
- Measure sensitivity to contamination, sample size and ambient dimension.
- Construct a Wasserstein barycentre and analyse its retained moments.
Project structure
Project components
Distribution generator
Creates seeded Gaussian-mixture samples, controlled transforms, contamination and equal empirical weights.
Balanced transport
Calculates an exact linear-program transport plan and a max-cost normalised log-domain Sinkhorn plan.
Alternative measures
Calculates debiased Sinkhorn divergence, sliced Wasserstein distance and stabilised unbalanced transport.
Sensitivity laboratory
Runs regularisation, contamination, bootstrap sample-size and dimension experiments from one versioned configuration.
Barycentre study
Builds a one-dimensional Wasserstein barycentre and compares its mean, spread and quantiles.
Evidence builder
Writes open tables, a machine-readable summary and thirteen labelled figures in raster and vector formats.
Methodology
Project workflow
- 01Load configuration
The study reads the fixed seed, sample count, regularisation grid, contamination levels, dimensions and projection count.
- 02Generate distributions
Source and target samples are produced from declared mixtures and controlled transformations.
- 03Solve transport problems
Exact, entropic, debiased, sliced and unbalanced calculations run with explicit numerical settings.
- 04Check constraints
The balanced plan is checked against both marginals and every reported value is required to remain finite.
- 05Run sensitivity experiments
Regularisation, contamination, sample-size, dimension and barycentre results are retained as open evidence.
- 06Export evidence
CSV, JSON, PNG and SVG files are rebuilt from the same production configuration.
Demonstration scenario
Two finite Gaussian-mixture distributions are compared after translation and deformation. The student presents exact and regularised couplings, then explains how regularisation, contamination, sample size, dimension and mass variation change the retained numerical evidence.
Engineering
Tools and method
- Tools
- The project uses Python 3.12, POT 0.9.7.post1, NumPy 2.5.2, SciPy 1.18.1, Matplotlib 3.11.1 for subject analysis, simulation, and results.
- Ground geometry
- Squared Euclidean cost matrices are used for finite empirical distributions.
- Exact method
- A balanced linear program establishes the reference coupling and transport cost.
- Regularised method
- Log-domain Sinkhorn iterations use max-cost normalisation to control numerical range.
- Robust variants
- Unbalanced transport permits mass variation, while sliced Wasserstein averages one-dimensional projections.
- Statistical analysis
- Paired bootstrap repetitions measure sample-size variability and controlled grids expose contamination and dimension response.
- Verification
- Automated tests, branch coverage, lint, dependency audit, Docker reproduction and repository validation check the release.
Testing
Evaluation
Evaluation measures
- Exact balanced cost of 1.526190 for the retained reference distributions
- Balanced-plan marginal error of 1.96e-14
- Debiased Sinkhorn divergence of 1.468217 under the retained setting
- Sliced Wasserstein estimate using 128 declared projections
- Unbalanced transported mass of 0.955975
- Transport response across five regularisation values and four contamination levels
- Forty-eight bootstrap records across four sample sizes
- Sensitivity across dimensions 2, 4, 8 and 16
- Wasserstein barycentre mean of 0.265739
Project boundaries
- The project uses finite synthetic samples and squared Euclidean ground costs.
- Raw values from exact, entropic, debiased, sliced and unbalanced formulations are not treated as interchangeable.
- The sliced result depends on the fixed projection count and seed.
- The sensitivity grids illustrate the declared cases and are not universal convergence proofs.
- The study does not establish causal effects, validate a physical system or support automated decisions about people.
Included
- 01Complete Python source code
- 02Exact balanced optimal transport solver
- 03Log-domain entropic Sinkhorn solver and debiased Sinkhorn divergence
- 04Sliced Wasserstein distance with 128 declared projections
- 05Stabilised unbalanced transport and transported-mass analysis
- 06Wasserstein barycentre experiment with moment analysis
- 07Regularisation, contamination, sample-size and dimension studies
- 08Five open CSV tables, one summary JSON file and thirteen paired PNG and SVG figures
- 0982-page project documentation in PDF and editable Word formats
- 10Setup and usage guide in PDF and editable Word formats
- 1140 annotated references and three licensed literature images
- 1225 automated tests with 96.60 percent branch-aware coverage
Project record
No information is collected on this page.
- Permanent project ID
- GP-MA-1TKDYSF
- Catalogued
- 21 Aug 2026
- Completed
- 28 Aug 2026
- Verified
- 28 Aug 2026
- Demonstration
- Included in repository
Handover
After purchase
- 01Payment is confirmed
The project is marked unavailable and cannot be purchased again.
- 02Repository access is granted
The buyer's submitted GitHub account receives access to the private repository.
- 03The purchase record is delivered
The certification sheet is prepared from the reviewed buyer details and sent privately by email.