# Learning Topology-Aware Representations via Test-Time Adaptation for Anomaly Segmentation

Source: [Learning Topology-Aware Representations via Test-Time Adaptation for Anomaly Segmentation](<https://www.sota2.com/research/paper/6a41fc39206542251d7ccced>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-06-30T05:00:08.405Z

Authors: Ali Zia, Usman Ali, Abdul Rehman, Umer Ramzan, Kang Han, Muhammad Faheem, Shahnawaz Qureshi, Wei Xiang

Published: 2026-06-26T17:04:42.000Z

## Abstract

Test-time adaptation (TTA) has emerged as a promising paradigm for mitigating distribution shifts in deep models. However, existing TTA approaches for anomaly segmentation remain limited by their reliance on pixel-level heuristics, such as confidence thresholding or entropy minimisation, which fail to preserve structural consistency under noise and texture variation. Moreover, they typically treat anomaly maps as flat intensity fields, ignoring the higher-order spatial relationships that characterise complex defect geometries. We introduce TopoTTA (Topological Test-Time Adaptation), a novel framework that integrates persistent homology, a tool from topological data analysis, into the TTA pipeline to enforce geometric and structural coherence during adaptation. By applying multi-level cubical complex filtration to anomaly score maps, TopoTTA derives robust topological pseudo-labels that guide a lightweight test-time classifier, enhancing segmentation quality without retraining the backbone model. The approach avoids reliance on method-specific raw-score thresholding for mask binarisation, preserves connectivity, and generalises across both 2D and 3D modalities. Extensive experiments across six standard benchmarks (MVTec AD, VisA, Real-IAD, MVTec 3D-AD, AnomalyShapeNet, and MVTec LOCO) demonstrate an average 15% F1 improvement over state-of-the-art unsupervised anomaly detection and segmentation methods, with the largest gains on anomalies exhibiting complex geometric or structural variations. These findings suggest that integrating topological reasoning into test-time adaptation provides a principled route to structure-aware generalisation, bridging the gap between geometric learning and robust adaptation.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Anomaly Segmentation on VisA (I-AUROC, P-AUROC, P-AUPRO, F1, IoU)](<https://www.sota2.com/research/sota/anomaly-segmentation-on-visa-i-auroc-p-auroc-p-aupro-f1-iou.md>): Anomaly Segmentation; VisA; I-AUROC: 0.987.

- [Anomaly Segmentation on AnomalyShapeNet](<https://www.sota2.com/research/sota/anomaly-segmentation-on-anomalyshapenet.md>): Anomaly Segmentation; AnomalyShapeNet; Instance AUROC: 0.839.

- [Anomaly Segmentation on MVTec AD](<https://www.sota2.com/research/sota/anomaly-segmentation-on-mvtec-ad.md>): Anomaly Segmentation; MVTec AD; AUROC (Pixelwise): 0.984.

- [Anomaly Segmentation on MVTec 3D-AD](<https://www.sota2.com/research/sota/anomaly-segmentation-on-mvtec-3d-ad.md>): Anomaly Segmentation; MVTec 3D-AD; Mean Score: not recorded.

- [Anomaly Segmentation on MVTec LOCO](<https://www.sota2.com/research/sota/anomaly-segmentation-on-mvtec-loco.md>): Anomaly Segmentation; MVTec LOCO; AUROC: not recorded.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2606.28268>)

[PDF](<https://arxiv.org/pdf/2606.28268.pdf>)
