Beyond Empirical Support: Structured Outlier Generation via Sinkhorn Optimal Transport

Haixiang Sun, Andrew LiuNeurIPS 2026

TL;DR

How do you prepare a machine learning model for black swan events it has never seen in training? Instead of blindly hunting for empty, sparse corners of latent space—which often produces meaningless garbage—this paper uses Optimal Transport to mathematically calculate the "cost" of moving away from normal data while keeping samples anchored to real-world semantics. The result is a principled, modality-agnostic way to synthesize realistic, stress-testing outliers across both time series and images.

What Problem Does This Paper Address?

Machine learning systems usually break on the weird stuff—rare edge cases that finite training datasets simply miss. Most research focuses on detecting anomalies, leaving an equally vital question underexplored: how do we generate synthetic outliers to stress-test and harden our models before deployment?

Existing outlier synthesis methods typically map data into a representation (latent) space and look for regions with low empirical density, like sparse nearest-neighbor neighborhoods. The catch? Low density alone is a trap. A latent point might sit in a sparse region because it’s a genuinely informative edge case, or because it drifted completely off the semantic manifold into undecodable nonsense, or crossed silently into a different class. Furthermore, current synthesis pipelines are heavily bespoke—built strictly for images or strictly for time series. We need a unified, stable way to push beyond training data boundaries without losing coherent meaning.

Methods

Enter Sinkhorn Boundary Outlier Generation (SBOG). Working within a learned latent space (mapped via standard encoders and decoded via off-the-shelf generators like Stable Diffusion), SBOG replaces heuristic density rules with entropic Optimal Transport (OT)—specifically, Sinkhorn OT, which measures the effort required to shift probability mass from one distribution to another.

Figure 1: Pipeline of Sinkhorn Boundary Outlier Generation (SBOG).

Here is what is novel in the SBOG pipeline:

  • Sinkhorn Outlier Energy (SOE): Instead of counting local neighbors, SOE calculates how expensive it is for the entire in-distribution dataset to "support" a candidate point under a smooth transport geometry. High energy means weak support.
  • Constrained Boundary Sampling: SBOG finds existing training points with the highest SOE to act as "boundary anchors." It perturbs these anchors with Gaussian noise and filters the proposals using two strict rules: the candidate must cross a minimum SOE threshold (pushing it out of distribution), and it must maintain a minimum cosine similarity to its class prototype (tethering it in semantic context). Among valid candidates, it picks the one with the maximum energy to decode.
  • Sinkhorn-DRO Alignment: Optionally, the authors use Sinkhorn Distributionally Robust Optimization (DRO)—a framework for optimizing against worst-case data shifts—to train the encoder itself, ensuring latent neighborhoods smoothly reflect semantic similarity before sampling even begins.

Datasets

The authors do not introduce new datasets, instead evaluating SBOG across established benchmarks in two distinct modalities:

  • Multivariate Time Series: SMD, MSL, SMAP, SWaT, and WADI.
  • Images: CIFAR-100 and ImageNet-100 serve as in-distribution training sets. Out-of-distribution (OOD) detection is evaluated against iNaturalist, SUN, Places/Places365, Textures, SVHN, LSUN-R, and iSUN.

Key Insights and Ideas

  • Outlier synthesis is an optimization dual in disguise: The authors prove mathematically that SOE isn't just an arbitrary score—it emerges naturally as the Gibbs-normalization term in the Sinkhorn-DRO dual objective. Picking the highest-energy feasible candidate directly mirrors finding the most "transport-expensive" stress scenario.
  • Generalizing Kernel Density Estimation (KDE): In the narrow case of uniform weights and squared Euclidean distance, SOE mathematically reduces to a standard Gaussian KDE score. Beyond that, however, framing support through transport geometry provides smoother, more stable boundary contours than brittle $k$-NN or KDE rejection rules.
  • Pushing vs. Tethering: Ablations show a clear division of labor. SOE excels at pushing candidates far enough out to be informative while preserving diversity, whereas semantic anchoring stops those candidates from contaminating other classes (boosting intended-class purity from 0.381 to 0.824 in image tests).
Figure 2: Component ablation of the time-series sampler.

Key Results

Because synthetic outliers have no "ground truth" target distribution, SBOG is judged by how much its generated outliers help downstream anomaly detectors separate normal data from unseen test anomalies:

  • Time Series: Plugged into the CARLA anomaly detection framework, SBOG achieves the best average performance across all five datasets among synthesis baselines, reaching an average AU-PR of 0.312 and F1 of 0.432 (outperforming $k$-NN negatives at 0.291 / 0.390 and KDE negatives at 0.280 / 0.393).
  • Images (ImageNet-100): Training a ResNet-34 classifier with SBOG-generated outliers (decoded via Stable Diffusion v1.5) slashes the False Positive Rate at 95% True Positive Rate (FPR95) to 14.75% (with 96.97% AUROC) when using the robust alignment module. This substantially beats prior synthesis baselines like Dream-OOD (38.76% FPR95) and NPOS (44.00% FPR95).
  • Images (CIFAR-100): SBOG achieves an average FPR95 of 12.44% and AUROC of 97.23%, again outpacing Dream-OOD (40.31% FPR95) and VOS (73.98% FPR95).

Limitations and Future Work

SBOG is only as good as the spaces it operates in: it relies heavily on well-aligned latent representations and expressive decoders. If the encoder groups classes poorly or the generator cannot decode boundary embeddings cleanly, outlier quality will suffer. Furthermore, the Sinkhorn temperature ($\varepsilon$) and energy threshold ($\tau_E$) require careful tuning—if $\varepsilon$ is too small, the energy landscape becomes sharp and unstable. For future work, the authors suggest developing adaptive calibration for these hyperparameters, jointly training the encoder, transport cost, and generator end-to-end, and incorporating downstream task losses directly into the Sinkhorn-DRO framework for task-specific stress testing.

Summary updated

BibTeX
@inproceedings{sun2026beyond,
  author = {Haixiang Sun and Andrew Liu},
  title = {{Beyond Empirical Support: Structured Outlier Generation via Sinkhorn Optimal Transport}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=YS9yqX3KCa},
}
Figure