Learning Topology-Aware Representations via Test-Time Adaptation for Anomaly Segmentation
Open Access
- 1 January 2026
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Pattern Analysis and Machine Intelligence
- Vol. 48 (10) , 1-18
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 improve ment 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.Keywords
Funding Information
- La Trobe University
- La Trobe Institute for Sustainable Agriculture and Food
- Australian Research Council Industrial Transformation Research (IH240100024)
This publication has 76 references indexed in Scilit:
- Hierarchical Gaussian Mixture Normalizing Flow Modeling for Unified Anomaly Detection2024
- A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localization2024
- GLAD: Towards Better Reconstruction with Global and Local Adaptive Diffusion Models for Unsupervised Anomaly Detection2024
- R3D-AD: Reconstruction via Diffusion for 3D Anomaly Detection2024
- TransFusion – A Transparency-Based Diffusion Model for Anomaly Detection2024
- SPot-the-Difference Self-supervised Pre-training for Anomaly Detection and Segmentation2022
- Inpainting Transformer for Anomaly Detection2022
- The Persistent Homology of Dual Digital Image Constructions2022
- PaDiM: A Patch Distribution Modeling Framework for Anomaly Detection and Localization2021
- Stability of Persistence DiagramsDiscrete & Computational Geometry, 2006