Table of Contents
Fetching ...

Test-Time Adaptation for Anomaly Segmentation via Topology-Aware Optimal Transport Chaining

Ali Zia, Usman Ali, Umer Ramzan, Abdul Rehman, Abdelwahed Khamis, Wei Xiang

TL;DR

TopoOT addresses anomaly segmentation under distribution shift by replacing brittle, threshold-based masks with topology-guided pseudo-labels derived from multi-scale persistence diagrams, then supervising a lightweight test-time training head via OT-consistency and contrastive objectives. It introduces Optimal Transport Chaining to align persistence diagrams across sublevel and superlevel filtrations and across scales, yielding stable, interpretable anomaly cues that are back-projected to pixel space. The approach achieves state-of-the-art results across 2D and 3D anomaly localization benchmarks, demonstrating strong generalization and cross-model transfer with a modest per-sample runtime. By grounding adaptation in topological structure and efficient OT, TopoOT offers practical robustness for industrial anomaly segmentation under real-world distribution shifts.

Abstract

Deep topological data analysis (TDA) offers a principled framework for capturing structural invariants such as connectivity and cycles that persist across scales, making it a natural fit for anomaly segmentation (AS). Unlike thresholdbased binarisation, which produces brittle masks under distribution shift, TDA allows anomalies to be characterised as disruptions to global structure rather than local fluctuations. We introduce TopoOT, a topology-aware optimal transport (OT) framework that integrates multi-filtration persistence diagrams (PDs) with test-time adaptation (TTA). Our key innovation is Optimal Transport Chaining, which sequentially aligns PDs across thresholds and filtrations, yielding geodesic stability scores that identify features consistently preserved across scales. These stabilityaware pseudo-labels supervise a lightweight head trained online with OT-consistency and contrastive objectives, ensuring robust adaptation under domain shift. Across standard 2D and 3D anomaly detection benchmarks, TopoOT achieves state-of-the-art performance, outperforming the most competitive methods by up to +24.1% mean F1 on 2D datasets and +10.2% on 3D AS benchmarks.

Test-Time Adaptation for Anomaly Segmentation via Topology-Aware Optimal Transport Chaining

TL;DR

TopoOT addresses anomaly segmentation under distribution shift by replacing brittle, threshold-based masks with topology-guided pseudo-labels derived from multi-scale persistence diagrams, then supervising a lightweight test-time training head via OT-consistency and contrastive objectives. It introduces Optimal Transport Chaining to align persistence diagrams across sublevel and superlevel filtrations and across scales, yielding stable, interpretable anomaly cues that are back-projected to pixel space. The approach achieves state-of-the-art results across 2D and 3D anomaly localization benchmarks, demonstrating strong generalization and cross-model transfer with a modest per-sample runtime. By grounding adaptation in topological structure and efficient OT, TopoOT offers practical robustness for industrial anomaly segmentation under real-world distribution shifts.

Abstract

Deep topological data analysis (TDA) offers a principled framework for capturing structural invariants such as connectivity and cycles that persist across scales, making it a natural fit for anomaly segmentation (AS). Unlike thresholdbased binarisation, which produces brittle masks under distribution shift, TDA allows anomalies to be characterised as disruptions to global structure rather than local fluctuations. We introduce TopoOT, a topology-aware optimal transport (OT) framework that integrates multi-filtration persistence diagrams (PDs) with test-time adaptation (TTA). Our key innovation is Optimal Transport Chaining, which sequentially aligns PDs across thresholds and filtrations, yielding geodesic stability scores that identify features consistently preserved across scales. These stabilityaware pseudo-labels supervise a lightweight head trained online with OT-consistency and contrastive objectives, ensuring robust adaptation under domain shift. Across standard 2D and 3D anomaly detection benchmarks, TopoOT achieves state-of-the-art performance, outperforming the most competitive methods by up to +24.1% mean F1 on 2D datasets and +10.2% on 3D AS benchmarks.
Paper Structure (28 sections, 16 equations, 6 figures, 23 tables, 1 algorithm)

This paper contains 28 sections, 16 equations, 6 figures, 23 tables, 1 algorithm.

Figures (6)

  • Figure 1: TopoOT Test-time Training for Anomaly Segmentation. (Top Left) pipeline simplified view. (Bottom) detailed view. TopoOT replaces conventional thresholding by stabilising anomaly evidence via cross-PD OT matching within each filtration, then fusing sub- and super-level scores with cross-level OT. The resulting global scores yield Top-K pseudo-labels that supervise a lightweight head for final segmentation.
  • Figure 2: Qualitative comparison of AD&S methods for different objects using the MVTec 3D-AD dataset.
  • Figure 3: Qualitative comparison of various anomaly detection methods for different objects using bacbbone PatchCore on 2D MvTec AD dataset.
  • Figure 4: Qualitative comparison of AD&S methods for different objects using on 3D MvTec AD Dataset.
  • Figure 5: Elementary cubes of different dimensions and an example cubical complex.
  • ...and 1 more figures