# Optimal Transport Meets t-SNE: Integrated Visualization without Batch Effects in OT-tSNE

OT-tSNE uses optimal transport to integrate batches without nearest-neighbor matching

Akhmetova, Azhar, Eichhorn, Edward, Landa, Boris, Kobak, Dmitry, Damrich, Sebastian · arXiv · 2026-11-24

- **Problem** Batch effects split datasets into separate groups in t-SNE. Existing fixes add cross-batch nearest-neighbor links, which are local and can be unreliable, since hub points collect many links and pull clusters together without mixing them.
- **Method** OT-tSNE replaces nearest-neighbor matching with an entropic optimal transport plan that decides which cross-batch pairs get linked. It then lays out the joint affinities with t-SNE.
- **Results** On seven single-cell datasets, OT-tSNE had the lowest aggregated rank, 2.0, compared to 4.4 for MultiMAP. It achieved a Pareto-efficient trade-off between batch mixing and biological conservation.

![Figure 1: a.Unintegrated t-SNE plot of the Lupus (Kang et al., 2018) data shows a clear batch effect. b.Our OT-tSNE integrates the batches.c – f.t-SNE with var…](https://refivu.com/papers/d3dac575-8b8b-4708-aa8c-3d0db81121bd/figures/figure-cbd30bd2437f950327b9f63c44331153.png?thumb=512)

**Figure 1** :a.Unintegrated t-SNE plot of the Lupus (Kang et al., 2018) data shows a clear batch effect. b.Our OT-tSNE integrates the batches.c – f.t-SNE with various affinity graphs on 2D toy data. d – f use the cross-batch edges in addition to the kNN graph. The cross-kNN variants only move the clusters close to each other (“kissing problem”), while optimal transport integrates them.g.OT-tSNE and MultiMAP achieved most top-3 ranks across all evaluation metrics and datasets.

[Original paper](https://arxiv.org/abs/2611.32402v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Akhmetova, Azhar, Eichhorn, Edward, Landa, Boris, Kobak, Dmitry, Damrich, Sebastian · Optimal Transport Meets t-SNE: Integrated Visualization without Batch Effects in OT-tSNE · Original paper figure · Extracted the figure area from page 2 of the original PDF.

## Why nearest-neighbor links fail across batches

Batch effects are structural differences between datasets recorded separately, such as varying protocols or donor sex. Plain t-SNE lays out a k-nearest-neighbor graph, and with a strong batch effect no edge crosses between batches. The result is two separated groups, one per batch.

Existing tools add cross-batch edges by taking mutual or shared nearest neighbors. Each point picks its neighbors on its own, so a few hub points can collect many cross-batch edges, especially near the fringes of a batch. In a 2D layout, such local links can pull clusters toward each other without mixing them, which is the kissing problem.

The underlying weakness is that local matching never asks which overall pairing is best for the two batches.

The authors argue that the trouble persists even when the batch effect is orthogonal to the biological signal, the assumption behind several correction methods. In that setting nearest-neighbor cross-batch affinities can still struggle, while OT-tSNE is shown to be unaffected.

## A global transport plan as cross-batch edges

The key idea is to let one transport plan decide which cross-batch pairs get linked, instead of letting each point pick its own neighbors. The plan comes from entropic optimal transport between the two batches, using the squared Euclidean cost \\(C\_{ij}\\) between points of batch 0 and batch 1. Its marginal constraints give every point of each batch an equal share of the total mass.

The entropy weight \\(\\epsilon\\) is set to \\(r\\) times the median of \\(C\_{ij}\\), with r = 1 by default. Larger \\(\\epsilon\\) gives more uniform plans, and smaller \\(\\epsilon\\) gives more concentrated ones.

## Filling the joint affinity matrix

The joint matrix \\(A\\) has four blocks, and the plan \\(P\\) fills the off-diagonal cross-batch blocks. The within-batch blocks still have to be filled, and the default takes them from a singular value decomposition of \\(P\\).

The within-batch blocks \\(S\_0\\) and \\(S\_1\\) are chosen so that \\(A\\) equals a scaled version of \\(E\\Sigma E^\\top\\). This makes the EOT eigenmap coordinates eigenvectors of \\(A\\), while the cross-batch plan \\(P\\) stays as its cross-batch affinity. The authors compare four other within-batch constructions: zeros, Gram matrices, a self OT plan, and a shared kNN graph.

The Gram variant uses different powers of the singular values in its two blocks than the default does.

## Sparsifying for t-SNE and optimizing the layout

The dense matrix is far from the sparse affinities t-SNE uses in practice, so the method removes self-edges. It then keeps k = 15 neighbors per observation, a default taken from UMAP and NCVis. To keep the larger batch from dominating, the neighbor budget is split in proportion to batch sizes, as \\(k\_b \\approx k\\,\\frac{n\_b}{n\_0+n\_1}\\) with \\(k\_0+k\_1=k\\).

For each point the strongest k0 links go to batch 0 and the strongest k1 links go to batch 1. An edge is kept if either endpoint selects the other, and the graph is then binarized and normalized to total mass one. This step can introduce a mild imbalance into the affinities.

The starting 2D layout uses the second and third columns of \\(E\\), so cross-batch information is present from the start. The t-SNE objective is then minimized on the sparse joint affinities with openTSNE, using a Kullback-Leibler divergence between the high- and low-dimensional similarities.

## Why orthogonal batch effects leave the plan unchanged

Take two batches and add a nuisance vector to each point, where every nuisance is orthogonal to the data and to the other batch's nuisances. Under those assumptions the squared cost changes only by row and column offsets, \\(\\tilde C\_{ij} = C\_{ij} + \\nu^{(0)}\_i + \\nu^{(1)}\_j\\). Those offsets add up to a fixed constant over any feasible coupling, because the marginals fix their total.

So with fixed \\(\\epsilon\\), the optimal EOT plan is unchanged by the perturbation. Nearest-neighbor affinities have no such guarantee, since the nuisance magnitudes can reorder pairwise distances and change which points are neighbors. The authors also cite prior analyses of more general orthogonal nuisance models.

The MNIST test uses two disjoint, class-balanced batches, and each digit class gets its own nuisance direction and magnitude, scaled by \\(\\lambda\\). The nuisance directions come from 30 trailing PCA components per batch, so the two noise subspaces are mutually orthogonal. Because the clean signal is the raw pixels, the orthogonal decomposition is only approximate, and projecting onto the leading PCA subspace makes it exact.

The authors also let \\(\\epsilon\\) grow with \\(\\lambda\\), since the median cost rises with the corruption strength. Cross-batch digit-label purity stayed similar under fixed and adaptive \\(\\epsilon\\).

## Stability of cross-batch affinities on MNIST

Affinity stability is measured by neighbor purity, the fraction of retained neighbors that share a digit label. The share of points with a reciprocal cross-batch edge fell from 98% at \\(\\lambda = 0\\) to 11% at \\(\\lambda = 20\\). The EOT affinities stayed stable over the same corruption range.

The authors then asked whether this difference carries into 2D, comparing OT-tSNE with MultiMAP and with Scanorama followed by t-SNE. OT-tSNE kept batch mixing and digit purity nearly unchanged across \\(\\lambda\\), while Scanorama's batch mixing deteriorated progressively. MultiMAP was more robust but also declined as the batch effect grew.

Digit purity stayed high for all three methods. The authors read the drop as a loss of cross-batch alignment rather than a loss of class structure. So under heterogeneous orthogonal batch effects, balanced transport gives more stable cross-batch affinities than local matching, and this persists in 2D.

## Real single-cell benchmark results

The seven single-cell datasets vary in size from ≈4000 to ≈30 000 points. Their batch effects range from replicated identical conditions to different single-cell measurement techniques. The authors compared OT-tSNE with 23 method configurations for 2D batch visualization.

Batch mixing is scored with kBET and iLISI, and biological conservation with neighborhood purity and silhouette. Within each dataset, every metric is min-max normalized across methods before the methods are ranked.

Averaged over the seven datasets, OT-tSNE had the lowest aggregated rank, 2.0, compared to 4.4 for MultiMAP. Its pooled kBET and iLISI scores were among the best, and it placed in the top three more often than any competing method.

MultiMAP was the strongest competitor and was slightly better on biological conservation, while OT-tSNE mixed batches better. BC t-SNE, RC t-SNE and Ref t-SNE integrated batches much worse. The default spectral within-batch construction gave the highest kBET and iLISI among the OT-tSNE variants.

General-purpose methods followed by t-SNE were competitive but less consistent across datasets. Adapting them to 2D embeddings generally reduced biological conservation, with scVI 2D as the notable exception. Joint t-SNE preserved biological structure but left batches separated, while joint PCA mixed batches at a cost to biological conservation.

On Mouse Atlas, B cells made up roughly 29% of one batch and 8% of the other, and OT-tSNE still had the best trade-off among the compared methods. The authors note that this dataset was generally hard to integrate for all methods.

## Sensitivity to hyperparameters and initialization

The authors evaluated 25 combinations of neighborhood size k and relative regularization r on the seven datasets. Near the default (k, r) = (15, 1), average batch mixing and biological conservation changed little.

On Lupus, random seeds gave different cluster arrangements, while the deterministic initializations reproduced the same layout with jitter disabled.

## Limitations

Balanced transport with uniform marginals must move mass from a cell type that's abundant in one batch to other cell types. Unbalanced optimal transport and density-reweighted EOT are named as possible extensions, and the paper doesn't try either.

OT-tSNE is currently formulated for two batches, and a multi-batch version would add pairwise plans as off-diagonal blocks.

In the CPU-only benchmark, affinity matrix creation increasingly dominated runtime as dataset size grew. The authors' randomized SVD truncated to 200 components cut runtime and kept the first-place aggregate ranking. Landmark approximations and GPU acceleration of the Sinkhorn iterations are named as further options.

## Paper info

- **Authors**: Akhmetova, Azhar, Eichhorn, Edward, Landa, Boris, Kobak, Dmitry, Damrich, Sebastian
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-24
- **Added**: 2026-11-25
- **Updated**: 2026-11-24
- **Version**: v1
- **arXiv**: 2611.32402
- **Category**: cs.LG
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.32402v1) · [PDF ↗](https://arxiv.org/pdf/2611.32402v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Visual exploration is an integral step in understanding the structure of datasets. However, systematic variation between datasets collected under different conditions, known as batch effects, can obscure shared structure and complicate their joint visualization. Existing methods often rely on cross-batch nearest-neighbor relations to integrate the batches. Yet, these local correspondences can be unreliable for challenging cross-batch geometries. We propose optimal-transport t-SNE (OT-tSNE), which replaces nearest-neighbor-based matching with globally coupled affinities derived from entropic optimal transport. Controlled synthetic experiments demonstrated that nearest-neighbor-based methods can deteriorate, while optimal-transport affinities and OT-tSNE embeddings remain robust. Across seven real single-cell datasets, we benchmarked OT-tSNE against a broad range of integration and visualization methods and found that it achieves a Pareto-efficient trade-off between batch mixing and biological conservation, and integrates batches particularly well.

## Quote from the paper

Akhmetova, Azhar, Eichhorn, Edward, Landa, Boris, Kobak, Dmitry, Damrich, Sebastian (2026). Optimal Transport Meets t-SNE: Integrated Visualization without Batch Effects in OT-tSNE. arXiv:2611.32402v1. https://arxiv.org/abs/2611.32402v1

**BibTeX**

```
@misc{azhar2026optimal,
  title = {{Optimal Transport Meets t-SNE: Integrated Visualization without Batch Effects in OT-tSNE}},
  author = {Akhmetova, Azhar and Eichhorn, Edward and Landa, Boris and Kobak, Dmitry and Damrich, Sebastian},
  year = {2026},
  eprint = {2611.32402},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32402v1}
}
```

## Other paper commentary

- [Predicting Rare-Mode Collapse in Recursive Generative Training from Single-Generation Calibration](https://refivu.com/en/papers/5c8147d8-eed2-4206-bf09-95dd28fcd1c5-predicting-rare-mode-collapse-in-recursive-generative.md)
- [The KL Divergence Is Never Negative, Except in PyTorch](https://refivu.com/en/papers/a58a89ab-5b60-441f-9175-c03ffbd24fec-the-kl-divergence-is-never-negative-except-in.md)
- [Per-Attack Blocking Hides Catalog Vulnerability: A Weakest-Link Analysis of Tool Manifests](https://refivu.com/en/papers/e81c6c5d-9783-464f-93c2-4b7a8263a787-per-attack-blocking-hides-catalog-vulnerability-a-weakest.md)
- [Beyond Single-Turn Privacy: Training-Data Leakage in Conversational RAG](https://refivu.com/en/papers/51c92831-e3a5-4575-943b-50961dd4fa10-beyond-single-turn-privacy-training-data-leakage-in.md)
- [Energy-preserving Bayesian model reduction: closed-form structured posteriors and probabilistic stability certificates for quadratic operator inference](https://refivu.com/en/papers/87bcab93-eba0-4ffc-89b9-8f653e413add-energy-preserving-bayesian-model-reduction-closed-form.md)
- [Directional Bias in Quantile SGD and Score-Inversion Inference under Dependence](https://refivu.com/en/papers/37e46fbd-2b06-425b-8b62-853f70137b7a-directional-bias-in-quantile-sgd-and-score-inversion.md)
- [Zeroth-Order Forward-Only SNN Training Inspiring Neuromorphic On-Chip Learning](https://refivu.com/en/papers/62311c6d-94fc-4546-98d2-cb89a4630c19-zeroth-order-forward-only-snn-training-inspiring.md)
- [Roboclock: A Unified Benchmark for Time-Aware Robotic Intelligence](https://refivu.com/en/papers/d28d7b22-274f-4e81-9d24-a3d9cc69084a-roboclock-a-unified-benchmark-for-time-aware-robotic.md)
- [Demographic Encoding is Not Exposure: Fairness and Privacy in Chest X-ray Foundation Models](https://refivu.com/en/papers/d91f434f-7371-40be-9129-9d3da0b4398c-demographic-encoding-is-not-exposure-fairness-and-privacy.md)
- [Token Pruning Needs a Protected Sink Token: Coherent Spatial Aggregation in Vision Transformers](https://refivu.com/en/papers/ccf2a0da-8ba4-468b-bb16-97b8206e5236-token-pruning-needs-a-protected-sink-token-coherent.md)
- [The cyborg fly: reflexes survive engineered actuators, coordination needs stand-ins](https://refivu.com/en/papers/7ee56916-27c9-439c-be7d-f45cd51b88f4-the-cyborg-fly-reflexes-survive-engineered-actuators.md)
- [Text Is Just Another Shot in Vision-Language Models: Simple Probes on Frozen Encoders Do It](https://refivu.com/en/papers/7a41ea95-b526-4d30-ba8b-9da3784c902c-text-is-just-another-shot-in-vision-language.md)

## Terms in this paper

- [MNIST](https://refivu.com/en/terms/28b9bb66d1c6-mnist)
- [t-SNE](https://refivu.com/en/terms/488ecf7dbbcf-t-sne)
- [Kullback-Leibler divergence](https://refivu.com/en/terms/3aa99486ee6b-kullback-leibler-divergence)
- [optimal transport](https://refivu.com/en/terms/ce65c388d297-optimal-transport)
- [Sinkhorn-Knopp algorithm](https://refivu.com/en/terms/66ea22c84a93-sinkhorn-knopp-algorithm)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/d3dac575-8b8b-4708-aa8c-3d0db81121bd-optimal-transport-meets-t-sne-integrated-visualization)
