Next Article in Journal
Bayesian Network Analysis of Policing Governance: Implications for Mining and Regional Sustainability
Previous Article in Journal
Dry Pass, Wet Fail: Ground Impedance Testing of Field-Aged PV Modules—Implications for Repowering/Revamping Within 5–10 Years and for Environmental Sustainability
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

TopoAD: Resource-Efficient OOD Detection via Multi-Scale Euler Characteristic Curves

1
College of Computer and Information Sciences, Fujian Agriculture and Forestry University, Fuzhou 350002, China
2
Engineering Research Center of Smart Sensing and Agricultural Chip Technology, Fujian Province University, Fuzhou 350002, China
*
Authors to whom correspondence should be addressed.
Sustainability 2026, 18(3), 1215; https://doi.org/10.3390/su18031215
Submission received: 27 December 2025 / Revised: 21 January 2026 / Accepted: 22 January 2026 / Published: 25 January 2026
(This article belongs to the Special Issue Sustainability of Intelligent Detection and New Sensor Technology)

Abstract

Out-of-distribution (OOD) detection is essential for ensuring the reliability of machine learning models deployed in safety-critical applications. Existing methods often rely solely on statistical properties of feature distributions while ignoring the geometric structure of learned representations. We propose TopoAD, a topology-aware OOD detection framework that leverages Euler Characteristic Curves (ECCs) extracted from intermediate convolutional activation maps and fuses them with standardized energy scores. Specifically, we employ a computationally efficient superlevel-set filtration with a local estimator to capture topological invariants, avoiding the high cost of persistent homology. Furthermore, we introduce task-adaptive aggregation strategies to effectively integrate multi-scale topological features based on the complexity of distribution shifts. We evaluate our method on CIFAR-10 against four diverse OOD benchmarks spanning far-OOD (Textures), near-OOD (SVHN), and semantic shift scenarios. Our results demonstrate that TopoAD-Gated achieves superior performance on far-OOD data with 89.98% AUROC on Textures, while the ultra-lightweight TopoAD-Linear provides an efficient alternative for near-OOD detection. Comprehensive ablation studies reveal that cross-layer gating effectively captures multi-scale topological shifts, while threshold-wise attention provides limited benefit and can degrade far-OOD performance. Our analysis demonstrates that topological features are particularly effective for detecting OOD samples with distinct structural characteristics, highlighting TopoAD’s potential as a sustainable solution for resource-constrained applications in texture analysis, medical imaging, and remote sensing.

1. Introduction

Deep neural networks have achieved remarkable success across various domains, serving as the core engine for modern intelligent detection systems. Yet, their sustainable deployment in safety-critical applications remains challenging due to poor calibration and overconfident predictions on out-of-distribution (OOD) samples [1,2]. Robust OOD detection is essential for ensuring the reliability of new sensor technologies applied in autonomous systems, medical diagnosis, and financial risk assessment, where encountering unforeseen data distributions is inevitable. Consequently, distinguishing between known and unknown sensor inputs is a prerequisite for the long-term operational safety and sustainability of intelligent systems.
Current OOD detection methods typically fall into density-based, distance-based, or gradient-based paradigms. Density-based methods estimate the likelihood of test samples under the in-distribution (ID) data manifold. Maximum Softmax Probability (MSP) [1] and ODIN [2] rely on output confidence scores but suffer from overconfidence on OOD samples. Energy-based models [3] and Mahalanobis distance [4] improve upon these by modeling feature distributions. Recent approaches have further refined this direction: ViM [5] combines residual scores with logits to mitigate overconfidence, RankFeat [6] removes dominant rank-1 components to expose anomalies, and LINe [7] leverages key neuron activation patterns. However, these methods primarily rely on local feature statistics or assume parametric forms that may not hold in high-dimensional spaces. Distance-based methods, such as KNN [8] and prototype learning [9], measure proximity in embedding spaces but are sensitive to feature magnitude and struggle when OOD samples are scattered. Gradient-based methods [10,11] utilize gradient signatures but require backpropagation at inference time. This incurs significant computational overhead, rendering them unsuitable for sustainable edge computing or battery-powered intelligent sensors.
A fundamental limitation shared by these approaches is their reliance on local feature characteristics—magnitude, density, or distance—while often ignoring the global topological structure of feature representations. Topological properties, such as connected components and holes, capture intrinsic geometric invariants robust to continuous deformations. The necessity for such invariant descriptors is underscored by recent standardized benchmarks like OpenOOD [12] and recent vision–language model-based OOD detection studies [13], which highlight the fragility of existing detectors against diverse distribution shifts.
To address these limitations, we propose TopoAD, a lightweight framework that integrates global topological summaries into OOD detection. Our work draws inspiration from the emerging field of Topological Deep Learning (TDL) [14,15], which advocates for learning from the intrinsic shape of data. While TDL architectures [16] offer strong theoretical guarantees, their reliance on standard persistent homology often incurs prohibitive computational costs. TopoAD overcomes this by utilizing Euler Characteristic Curves (ECCs) as topological descriptors. These are computed efficiently via a superlevel-set filtration and a local estimator on intermediate activation maps, avoiding the complexity of traditional persistence diagrams. Furthermore, recognizing that neural networks encode hierarchical representations, we design task-adaptive aggregation strategies—including a parameter-efficient linear variant for near-OOD shifts and a cross-layer gating mechanism for far-OOD scenarios—while simplifying attention designs to reduce model complexity. This approach effectively captures multi-scale topological shifts and aligns with the principles of sustainability by minimizing computational overhead while maximizing detection performance.
The main contributions of this work are summarized as follows:
  • Topology-aware OOD detection via activation-map ECCs: We introduce TopoAD, a novel framework that leverages Euler Characteristic Curves (ECCs) extracted from intermediate CNN activation maps as complementary topological signals for OOD detection. To the best of our knowledge, TopoAD is among the first attempts to leverage Euler Characteristic Curves computed from intermediate CNN activation maps for post-hoc OOD detection in computer vision, demonstrating that topological features can effectively complement existing statistical and distance-based methods.
  • Efficient ECC computation for neural activations: We propose a computationally efficient method to compute ECCs via superlevel-set filtration on activation maps using a local 2 × 2 lookup table estimator. This approach achieves O ( H W ) complexity per layer, avoiding the prohibitive O ( n 3 ) cost of traditional persistence diagram computation while preserving essential topological information.
  • Task-adaptive architecture design: We demonstrate that optimal aggregation strategies depend on the type of distribution shift. We propose two variants: TopoAD-Linear (193 parameters) for parameter-efficient near-OOD detection, and TopoAD-Gated (20,001 parameters) for superior far-OOD performance through adaptive cross-layer gating. This design reveals important insights about when and how topological features should be aggregated.
  • Comprehensive empirical evaluation and analysis: We conduct extensive experiments on four diverse OOD benchmarks (Textures, SVHN, Flowers102, EuroSAT) and provide detailed ablation studies isolating the effects of cross-layer gating and threshold-wise attention. Our analysis reveals that topological features are particularly effective for detecting OOD samples with distinct structural characteristics, and we provide practical guidance for deploying TopoAD in different application scenarios.

2. Related Work

Out-of-distribution (OOD) detection has evolved significantly, typically categorized into post-hoc inference methods and training-time strategies. Post-hoc methods aim to identify OOD samples using pre-trained classifiers without modifying the training process, making them highly deployable for legacy systems. Early approaches like the baseline [1] utilized Maximum Softmax Probability (MSP), assuming classifiers assign lower confidence to unknown classes. To mitigate overconfidence, ODIN [2] introduced temperature scaling and input perturbations. Research subsequently shifted towards analyzing feature space distributions. Energy-based models [3] and Mahalanobis distance [4] improved detection by modeling layer-wise activation, yet they often rely on parametric assumptions.
Recently, the focus has refined towards manipulating feature representations directly at inference time to expose anomalies. ViM [5] combines residual scores with logits to perform virtual-logit matching, while RankFeat [6] demonstrates that removing the primary direction of feature variance (rank-1 subtraction) significantly enhances OOD separability. Similarly, LINe [7] utilizes a Shapley value-based approach to leverage only the most effective neurons. In parallel, theoretical frameworks based on the Minimum Description Length (MDL) principle have been explored to characterize the complexity of OOD samples. Despite their efficiency, these methods primarily exploit local statistical moments and may overlook global structural shifts. Gradient-based methods [10] offer an alternative by using gradient signatures, but the requirement for backpropagation incurs high computational latency, contradicting the requirements of sustainable intelligent sensors.
Training-time methods explicitly incorporate OOD detection objectives. Outlier exposure (OE) [17] leverages massive auxiliary datasets to enforce low confidence on anomalies. While powerful, OE is sensitive to the choice of proxy datasets. To reduce dependency on external data, virtual synthesis methods have gained traction. VOS [18] adaptively synthesizes virtual outliers in the low-likelihood regions of the feature space during training to tighten decision boundaries. NPOS [19] further advances this by generating non-parametric outliers, while DOS [20] recently introduces diverse outlier sampling to improve boundary coverage. Although these strategies can achieve high performance, they require retraining the backbone and complex optimization procedures, which limits their flexibility for rapid deployment on resource-constrained edge devices. In contrast, advanced post-hoc methods like ReAct [21] and GEN [22] avoid retraining by rectifying activations or generalizing scores, yet they typically rely on local statistics and overlook global geometric information.
A fundamentally different perspective is offered by Topological Data Analysis (TDA), which characterizes the global shape of data. Recently, this field has evolved into Topological Deep Learning (TDL) [14,15], a new frontier aiming to integrate geometric invariants into neural networks. Recent peer-reviewed reviews [14,23] highlight the potential of topological mechanisms in capturing structural features that standard convolutions may miss. In representation analysis, methods like RTD [24] utilize topological barcodes to compare neural manifolds.
However, a major bottleneck for standard TDL is computational cost; persistent homology (PH) relies on algorithms with cubic complexity O ( n 3 ) , which is prohibitive for real-time systems. To address this, Euler Characteristic Curves (ECCs) have been established as a stable and computationally efficient shape invariant for big data problems [25]. Unlike PH, the Euler Characteristic is additive and can be computed in O ( H W ) time for images. Our work leverages ECCs to capture structural anomalies efficiently, ensuring alignment with sustainable AI principles by requiring minimal parameters and avoiding expensive backpropagation.

3. Method

We propose TopoAD, a novel framework designed to enhance OOD detection by integrating global topological features with statistical energy scores. TopoAD augments a frozen classifier with an additional structural descriptor computed from intermediate activations, and fuses it with an energy score to improve robustness under distribution shifts.
As illustrated in Figure 1, the TopoAD pipeline operates in four stages: extracting multi-scale activation maps from the frozen backbone, computing efficient Euler Characteristic Curves (ECCs) as topological descriptors, applying task-adaptive aggregation strategies (Linear or Gated) to capture structural shifts, and finally fusing these topological descriptors with standardized energy scores via a lightweight MLP head.
Let X in denote the in-distribution (ID) data with label space Y , and X out represent out-of-distribution (OOD) data disjoint from X in . Given a pre-trained classifier f : X Y (e.g., ResNet-18 trained on CIFAR-10), our goal is to learn an OOD detector g : X [ 0 , 1 ] that assigns high scores to ID samples and low scores to OOD samples. In our implementation, we train g as a binary classifier on top of frozen representations, and we interpret its output as an ID score (higher means more in-distribution); the final OOD score can be obtained by 1 g ( x ) when needed. Unless otherwise specified, we report detection results using s ( x ) = 1 g ( x ) so that larger values indicate more OOD-likeness.

3.1. Multi-Scale Topological Descriptors via Euler Characteristic Curves

For a given input x, let h ( l ) R C l × H l × W l denote the activation map at layer . TopoAD computes topological summaries by applying a superlevel-set filtration to activation maps. Intuitively, an activation map can be viewed as a 2D “terrain”. Sweeping the threshold τ allows us to track how topological features (connected components and holes) evolve—specifically, how connected regions in the superlevel set emerge, merge, split, or vanish as the threshold changes. We first normalize each channel h ( l , c ) robustly (e.g., using quantile-based clipping and rescaling) into h ˜ ( l , c ) [ 0 , 1 ] H l × W l . For a threshold τ [ 0 , 1 ] , the binary superlevel set is
B ( l , c ) ( τ ) [ u , v ] = I h ˜ ( l , c ) [ u , v ] τ .
We discretize the filtration into N = 32 bins using mid-point thresholds
τ j = j + 1 2 N , j = 0 , 1 , , N 1 .
For a 2D binary set B ( τ ) , the Euler characteristic χ ( τ ) is a topological invariant defined as:
χ ( τ ) = β 0 ( τ ) β 1 ( τ ) .
Here, β 0 represents the number of connected components (corresponding to “islands” in the terrain analogy), while β 1 represents the number of holes (or enclosed “lakes”). Thus, χ ( τ ) provides a compact integer summary of the structural complexity at threshold τ . Note: For 2D image complexes under 4-connectivity, this simplifies to the alternating sum shown.
Instead of using computationally expensive persistence diagrams, we compute χ ( τ ) efficiently using a local 2 × 2 lookup table (LUT) estimator:
χ ( τ ) = u = 1 H 1 v = 1 W 1 LUT idx B ( τ ) u : u + 1 , v : v + 1 ,
where idx ( · ) maps each 2 × 2 binary pattern to an integer index. The LUT formulation is crucial for efficiency: it decomposes the global Euler characteristic into local contributions, enabling a single pass over the grid with constant-time updates per 2 × 2 cell, which makes ECC extraction practical for low-latency settings. This is enabled by the additivity of Euler characteristic, allowing a pre-tabulated local update for each 2 × 2 pattern. Tracking χ ( τ j ) across thresholds yields the ECC:
e ( l , c ) = [ χ ( τ 0 ) , χ ( τ 1 ) , , χ ( τ N 1 ) ] R N .
To obtain a single curve per layer, we aggregate ECCs across channels using a robust statistic:
e ( l ) = median c = 1 , , C l e ( l , c ) R N .
We stack ECCs from multiple layers as E = [ e ( 1 ) , , e ( L ) ] R L × N (with L = 3 in our setting).

3.2. TopoAD Architecture Variants

The complete TopoAD pipeline consists of four stages:

3.2.1. Stage 1: Multi-Layer Feature Extraction

We extract activation maps from three ResNet-18 stages to capture structural cues at varying semantic depths. We intentionally exclude Layer 1 from our topological analysis for both discriminability and efficiency reasons. Layer 1 mainly captures low-level primitives (edges, corners) whose activation patterns are largely shared by both ID and OOD images, leading to limited separability in the ECC space. Furthermore, Layer 1 possesses the highest spatial resolution; computing ECCs on it would disproportionately increase inference latency without clear performance gains. Instead, we focus on Layers 2–4, where more discriminative structural patterns (e.g., object parts and global layouts) emerge.
  • Layer 2: mid-level features, sensitive to textural irregularities.
  • Layer 3: higher-level features, capturing object-part geometry.
  • Layer 4: semantic-level features, where far-OOD shifts are most evident.

3.2.2. Stage 2: Per-Layer ECC Computation

For each selected layer , we compute a per-layer ECC e ( l ) R N as described above.

3.2.3. Stage 3: Aggregation Strategy (Variants)

Let E R L × N denote the stacked ECCs for an input x, where L = 3 (layer 2, layer 3, layer 4) and N = 32 threshold bins. The l-th row e ( l ) R N is the per-layer ECC.
  • Variant 1: TopoAD-Linear (Fixed Summary).
TopoAD-Linear summarizes each layer ECC by mean pooling over thresholds:
m ( l ) = 1 N j = 0 N 1 e j ( l ) , m = [ m ( 1 ) , , m ( L ) ] R L .
This variant uses a lightweight fusion head and introduces only 193 extra head parameters in our configuration.
  • Variant 2: TopoAD-Gated (Cross-Layer Gating without Threshold Attention).
TopoAD-Gated keeps the full ECC shape and performs adaptive cross-layer fusion. We first apply a lightweight per-layer projection to align ECCs across layers:
e ¯ ( l ) = W proj ( l ) e ( l ) + b proj ( l ) , W proj ( l ) R N × N , e ¯ ( l ) R N ,
and stack them as E ¯ R L × N . We then feed E ¯ into a Transformer-style cross-layer attention module that treats each layer as one token. The following equation defines the Multi-Head Self-Attention (MHSA) operator. Following the standard formulation, MHSA ( · ) consists of h attention heads with learned projections for queries, keys, and values.
H = W in E ¯ + b in R L × d , H ˜ = MHSA ( H ) R L × d , Z = W out H ˜ + b out R L × d out .
Finally, we flatten the layer tokens to obtain the topological embedding z topo = vec ( Z ) R L d out . This variant corresponds to our no_thresh_attn setting and adds 20,001 extra head parameters.
  • Variant 3: TopoAD-Full (Threshold-wise Reweighting + Cross-Layer Gating).
TopoAD-Full further applies a threshold-wise attention to each layer ECC before cross-layer fusion. For each layer l, we compute attention weights
α ( l ) = softmax W th ( l ) e ( l ) + b th ( l ) R N ,
and reweight the ECC by element-wise multiplication:
e ^ ( l ) = e ( l ) α ( l ) R N .
In our implementation, W th ( l ) is constrained to a diagonal parameterization (diag_only = True) for efficiency. The reweighted curves E ^ are then fused by the same cross-layer attention module as in TopoAD-Gated to obtain z topo .

3.2.4. Stage 4: Binary Classification Head

We fuse topological features with an energy feature derived from the frozen classifier logits. The energy score is
E ( x ) = log k exp ( f k ( x ) ) ,
and we standardize it using ID validation statistics and flip its sign so that larger values indicate higher ID-likeness:
z E ( x ) = ( E ( x ) μ E ) / σ E .
Let z denote the concatenation of z topo and z E ( x ) . A two-layer MLP outputs the final ID score:
h 1 = ReLU ( W 1 z + b 1 ) , g ( x ) = σ ( w 2 h 1 + b 2 ) .

3.3. Training Objective

We freeze the backbone classifier and train only the TopoAD prediction head. For each sample, we use the binary label y { 0 , 1 } , where y = 1 denotes in-distribution (ID) and y = 0 denotes proxy out-of-distribution (OOD). Given the head output logit logit ( x ) , we optimize the binary cross-entropy loss:
L BCE = E y log σ ( logit ( x ) ) + ( 1 y ) log ( 1 σ ( logit ( x ) ) ) .
For TopoAD-Full, the threshold-attention module also yields attention distributions α ( l ) ; our implementation supports an optional entropy regularizer to avoid overly peaky threshold weights:
L = L BCE λ · 1 L l = 1 L H α ( l ) ,
where H ( · ) is the entropy and λ 0 is a coefficient (we set λ = 0 in our experiments).
We precompute ECC features and energy scores from the frozen ResNet-18 for each split, and train the head on the resulting tuples. Energy standardization statistics ( μ E , σ E ) are computed from the ID subset of the validation split and reused for all variants during training and testing. Unless stated otherwise, we follow the default optimization settings in our released code configuration.

4. Results

4.1. Experimental Setup

We evaluated the effectiveness of TopoAD using CIFAR-10 [26] as the in-distribution (ID) dataset. To comprehensively assess robustness across different shift types, we employed four diverse OOD benchmarks:
  • Textures [27] (Far-OOD): Consists of 5640 texture images. This dataset represents a structural shift where images lack distinct objects, serving as a primary benchmark to test topological sensitivity.
  • SVHN [28] (Near-OOD): Contains street view digits. It shares semantic features (centered objects) with CIFAR-10 but differs in style, representing a covariate shift.
  • Flowers102 [29] and EuroSAT [30]: These datasets represent distinct semantic shifts (fine-grained flowers and satellite imagery), testing the model’s ability to distinguish known classes from entirely new semantic categories.
For comparisons, we consider two groups of methods.
1.
In-house baselines. We re-implement and evaluate MSP [1], ReAct [21], Mahalanobis [4], and KNN [8] under a unified pipeline with the same CIFAR-10-trained ResNet-18 backbone and identical data preprocessing. All TopoAD variants are also evaluated in-house under the same setting.
2.
Recent SOTA methods. To provide a broader reference to recent progress, we additionally include the results of representative prior methods, namely GEN [22], NPOS [19], and DOS [20]. All experiments are conducted using the original parameter settings and configurations reported in their respective papers to ensure a fair comparison.
To ensure reproducibility and rigorous assessment, we adhere to the following experimental protocols:
(1) Proxy-OOD construction and data split: We use CIFAR-100 as the proxy-OOD dataset to train the TopoAD detection head. CIFAR-100 is semantically disjoint from CIFAR-10 at the class level and is widely adopted as a proxy-OOD source in post-hoc OOD detection. Specifically, CIFAR-10 is split into 45,000 training, 5000 validation, and 10,000 test samples, while CIFAR-100 uses 45,000 training and 5000 validation samples for proxy-OOD training. All reported OOD detection results are evaluated exclusively on the held-out test splits of Textures, SVHN, Flowers102, and EuroSAT, ensuring no overlap with proxy-OOD data. In-distribution samples from CIFAR-10 are labeled as y = 1 , while proxy-OOD samples from CIFAR-100 are labeled as y = 0 , forming a binary classification objective for training the detection head.
(2) Computational setup: All experiments were conducted on a workstation equipped with an Intel(R) 13th Gen Core(TM) i5-13600KF CPU, 64 GB of system memory, and an NVIDIA GeForce RTX 4070 Ti SUPER (16 GB) GPU, running Windows 11 (build 10.0.26200). All methods were implemented in Python 3.11 using PyTorch 2.5.1 with CUDA 12.1 and cuDNN 9.1. For deployment-oriented evaluation, end-to-end inference latency was measured on CPU with a batch size of 1, and the reported results correspond to the mean ± standard deviation over 200 runs after a warm-up phase.
(3) Data preprocessing: To match the input resolution of the CIFAR-10-trained backbone, all OOD benchmark images (including Textures, SVHN, Flowers102, and EuroSAT) are resized to 32 × 32 pixels using bilinear interpolation before being fed into the classifier.
(4) Evaluation metrics: We report the Area Under the Receiver Operating Characteristic curve (AUROC), where higher values indicate better detection performance, and the False Positive Rate at 95% True Positive Rate (FPR95), where lower values indicate fewer false alarms. For computational efficiency, we measure the end-to-end inference latency (ms/image) and peak memory usage (MB) on a CPU with a batch size of 1, simulating a resource-constrained edge deployment scenario.
(5) Normalization details: The energy score is standardized using the mean and standard deviation computed from the CIFAR-10 validation subset. These normalization statistics are fixed and reused across all TopoAD variants to ensure consistent normalization and fair comparison across ablation studies.

4.2. Main Results

Table 1 reports our in-house comparisons under a unified evaluation pipeline. Quantitative analysis reveals that TopoAD demonstrates a significant advantage over traditional density-based methods (MSP, ReAct, Mahalanobis), particularly on complex distribution shifts. On the Textures benchmark (Far-OOD), TopoAD-Gated achieves an AUROC of 89.98%, surpassing the classic MSP baseline (81.63%) by a margin of 8.35% and the Mahalanobis distance (82.52%) by 7.46%. This performance gap indicates that when OOD samples share similar low-order statistics (mean, variance) with ID data but differ in geometric structure, pure statistical methods struggle to distinguish them. In contrast, our topological descriptors successfully capture global structural anomalies, providing a more discriminative signal. Furthermore, for distinct semantic shifts such as Textures and Flowers102, TopoAD-Gated exhibits exceptional robustness, matching the best-performing KNN baseline (94.43% on EuroSAT). This supports that Euler Characteristic Curves generalize well to natural image domains where the topological “shape” of activation maps varies significantly.
Conversely, on the SVHN dataset (Near-OOD), distance-based methods like KNN achieve the highest performance (88.84%), as SVHN digits share semantic similarities (centered objects, edges) with CIFAR-10. However, it is worth noting that our lightweight variant, TopoAD-Linear, remains highly competitive (88.18%), trailing KNN by only 0.66% while requiring significantly lower memory overhead during inference compared to KNN’s feature bank storage. Interestingly, TopoAD-Linear outperforms TopoAD-Gated on SVHN (88.18% vs. 87.01%), suggesting that for subtle near-domain shifts, simple linear aggregation preserves the raw topological signal better than complex gating, which might introduce overfitting to structural patterns.
For a broader perspective, Table 2 compares our approach with recent State-of-the-Art (SOTA) methods. While extensive training-time strategies like NPOS [19] achieve higher scores on near-OOD tasks (SVHN: 95.30%), they require synthesizing virtual outliers and retraining the backbone, which incurs high computational costs and deployment complexity. Notably, on the challenging Textures benchmark, our post-hoc TopoAD-Gated (89.98%) outperforms both the training-time NPOS (89.10%) and the feature-space generation method GEN (85.40%). These results suggest: it demonstrates that for detecting structural anomalies, explicit topological modeling at inference time can be more effective than implicit outlier synthesis during training. TopoAD thus offers a favorable trade-off for resource-constrained applications where retraining is not feasible.
A key observation is that TopoAD-Gated achieves state-of-the-art performance on the Textures dataset (Far-OOD), recording an AUROC of 89.98%. Notably, this outperforms the recent training-time method NPOS (89.10%) and the post-hoc method GEN (85.40%). We attribute this to the fact that texture anomalies often manifest as global structural disruptions rather than local feature intensity changes. While statistical methods (GEN, Energy) struggle to capture these geometric irregularities, our Euler Characteristic Curves effectively encode the topological signatures of these textures, providing a more discriminative signal.
On the challenging SVHN benchmark (Near-OOD), the training-time method NPOS achieves the highest performance (95.30%), likely due to its synthesis of boundary outliers during training. However, our post-hoc TopoAD-Linear remains highly competitive (88.18%) against strong baselines like KNN (88.84%), without requiring any modification to the training process. Furthermore, on semantic shift datasets (EuroSAT, Flowers102), TopoAD maintains consistent robustness (e.g., 94.43% on EuroSAT), suggesting that topological features are versatile across various domains, from satellite imagery to natural objects.
These results highlight a fundamental trade-off in OOD detection. While training-time strategies (e.g., NPOS, DOS) leverage virtual outlier synthesis to maximize near-OOD sensitivity, they do so at the expense of prohibitive retraining costs and reduced flexibility. TopoAD, conversely, secures superior robustness against structural anomalies as illustrated in Figure 2 (e.g., Textures) strictly through the geometric invariants of fixed representations. By obviating the need for backbone modification, our approach is uniquely positioned for open-world scenarios where deployment feasibility is paramount, necessitating the rigorous efficiency analysis presented next.

4.3. Computational Efficiency and Scalability

To provide deployment-oriented evidence, we benchmarked end-to-end CPU inference efficiency on an Intel(R) 13th Gen Core(TM) i5-13600KF processor with a batch size of 1. Latency is reported as mean ± standard deviation over 200 runs after a warm-up phase.
As shown in Table 3, our efficiency analysis yields two key conclusions:
  • Edge Suitability and Robustness: For the standard ResNet-18 backbone, TopoAD maintains a latency of ∼120–160 ms (approx. 6–8 FPS). Notably, the latency remains stable across datasets (CIFAR-10 vs. CIFAR-100), demonstrating that the computational cost is determined by input resolution rather than semantic complexity.
  • Scalability and Minimal Overhead: When scaling to the deeper ResNet-50 backbone, the latency naturally increases to ∼612–614 ms due to the heavier feature extractor. However, the latency difference between the simplest TopoAD-Linear and the most complex TopoAD-Full is virtually non-existent (≈1.8 ms). This confirms that the efficiency bottleneck is determined solely by the backbone architecture, while our topological fusion module introduces near-zero marginal cost.
While initial GPU profiling indicated faster throughput (∼2 ms for the head), these CPU results provide the most rigorous evidence that TopoAD is a sustainable, lightweight solution for diverse edge deployment tasks.

4.4. Ablation Study

To validate the contribution of each component and the rationale behind our architectural choices, we conduct a comprehensive ablation study, as summarized in Table 4.
Comparing the “Energy-only” (80.74% on Textures) and “Topology-only” (89.62%) baselines reveals a distinct functional specialization. The “Energy-only” method struggles significantly on texture anomalies, likely because OOD textures often share similar local feature statistics (e.g., mean, variance) with ID data, thereby fooling the energy function. In contrast, “Topology-only” achieves a large improvement in performance, confirming that ECCs successfully capture the global structural disruptions inherent in texture shifts. By fusing these two modalities (“TopoAD-Gated”), we achieve a further performance boost (89.98%). This demonstrates that TopoAD leverages Energy for semantic confidence and Topology for structural verification, providing a robust dual-check mechanism that neither modality can achieve alone.
We observe that the TopoAD-Gated mechanism consistently outperforms simple concatenation (“Concat-only”), suggesting that the learnable projection and cross-layer attention module effectively align topological manifolds from different network depths into a coherent representation. However, it is crucial to highlight the efficiency of TopoAD-Linear. With only 193 additional parameters (vs. 20,001 for Gated), TopoAD-Linear retains 99.6% of the performance on Textures (89.65% AUROC) and even surpasses the Gated variant on the Near-OOD SVHN benchmark (88.18% vs. 87.01%). This suggests that for resource-constrained edge devices, the simple linear aggregation of topological summaries provides an strong trade-off between sustainability and detection capability.
Counter-intuitively, adding threshold-wise attention (TopoAD-Full) degrades performance compared to the Gated variant (e.g., Textures: 89.98% → 88.88%). We hypothesize that the Euler Characteristic Curve (ECC) functions as a holistic shape descriptor, where the relative ordering of values across thresholds encodes critical topological persistence information. Fine-grained reweighting of individual filtration thresholds likely disrupts this global shape signature, introducing noise rather than enhancing discriminability. Consequently, we recommend TopoAD-Gated for high-performance scenarios, as it captures multi-scale interactions without over-parameterizing the threshold domain, preserving the integrity of the topological curves.
To validate the model’s robustness, we conducted a sensitivity analysis on the filtration resolution N used in the superlevel-set filtration. Varying N within { 16 , 32 , 64 } resulted in negligible performance variations, with AUROC fluctuations remaining below 0.5 % on the Textures benchmark. Consequently, we select N = 32 as the default setting to maintain a favorable balance between feature resolution and computational efficiency.

5. Discussion

Overall, topology-based descriptors are most effective when distribution shifts manifest as global structural or texture-level changes, whereas gains are smaller for near-OOD settings with similar spatial organization. Our results suggest that topological OOD detection benefits from task-adaptive aggregation, rather than a single strategy applied across all shift types. For near-OOD cases such as SVHN, fixed linear pooling provides a strong accuracy–efficiency trade-off. For larger shifts such as Textures, cross-layer gating is more effective, likely because it can integrate signals across network depths. We also observe that threshold-wise attention is often unnecessary and may reduce far-OOD performance. This pattern indicates that the ECC sequence itself already captures useful multi-scale information, and that the main gains come from how features are combined across layers, not from reweighting individual filtration bins.
TopoAD performs best on datasets with global structures that differ markedly from CIFAR-10. On Textures (89.98% AUROC) and EuroSAT (94.43% AUROC), the images contain repetitive patterns or distinct spatial layouts, and the resulting activation maps exhibit ECC profiles that are easier to separate from in-distribution samples. In contrast, the improvement on SVHN is smaller. A plausible explanation is that SVHN and CIFAR-10 share similar image organization (centered objects and comparable edge patterns), which leads to closer topological signatures in intermediate activations and reduces the separability provided by ECCs alone. In practice, topological descriptors are particularly useful for detecting anomalies in domains with rich structural information, such as texture analysis and remote sensing (e.g., EuroSAT), where geometric invariants provide a robust complementary signal to local pixel statistics. Regarding scalability, our efficiency benchmarks on ResNet-50 confirm that TopoAD introduces minimal overhead even on deeper backbones. Since ECC computation scales linearly with spatial resolution ( O ( H W ) ), the framework is theoretically well-suited for high-resolution tasks in medical imaging or satellite analysis, which we leave as a promising direction for future work.
Regarding the Flowers102 benchmark, TopoAD achieved high performance (89.23% AUROC), matching strong baselines like KNN (90.41%). Flowers102 represents a semantic shift with fine-grained textural details. The superior performance of KNN suggests that the feature embeddings of flowers form distinct clusters that are well-separated from CIFAR-10 classes in the Euclidean space. TopoAD’s competitive performance indicates that topological features also successfully capture these distinct structural patterns. However, for datasets with such strong feature separability, distance-based methods essentially act as an upper bound. TopoAD’s value is most pronounced in structure-dominant scenarios like Textures (Far-OOD), where it significantly outperforms KNN (89.98% vs 87.73%) by leveraging geometric invariants that local density estimation misses.
The current framework relies on auxiliary proxy data to train the projection head, and we do not provide theoretical guarantees on ECC discriminability for higher-resolution inputs. Future work will explore self-supervised objectives to reduce dependence on outlier exposure and use automated architecture search to tune filtration-related design choices. We also plan to study whether similar topological summaries can characterize distribution shifts in non-spatial modalities such as time series and natural language.

6. Conclusions

This work presents TopoAD, a topology-aware OOD detection framework that combines Euler Characteristic Curves extracted from intermediate activation maps with standardized energy scores. We adopt a task-adaptive design with two variants tailored to different shift regimes. TopoAD-Linear introduced only 193 additional head parameters and performed well on near-OOD detection, achieving 88.18% AUROC on SVHN. TopoAD-Gated increased model capacity to 20,001 parameters and yields stronger performance on far-OOD data, reaching 89.98% AUROC on Textures. The ablation results showed that cross-layer gating accounts for most of the performance gains, whereas threshold-wise attention provided limited benefit and can degrade far-OOD accuracy. Future research could aim to extend topological principles to other modalities, such as natural language processing and time-series data.

Author Contributions

Conceptualization, L.L., S.C. and X.L.; methodology, L.L.; software, L.L. and X.Y.; validation, X.Y., Z.L. and Y.K.; formal analysis, L.L. and Z.L.; investigation, L.L., X.Y. and Z.L.; resources, S.C. and X.L.; data curation, L.L.; writing—original draft preparation, L.L.; writing—review and editing, S.C. and X.L.; visualization, L.L. and Z.L.; supervision, S.C. and X.L.; project administration, S.C. and X.L.; funding acquisition, S.C. and X.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the fund of MOE (Ministry of Education in China) Project of Humanities and Social Sciences (Grant No. 25YJA880044), Project of Industry-university-institute Cooperation in Colleges and Universities in Fujian Province (grant no. 2024h6007, 2024h6030), and the Project of Software Technology Innovation Research and Industrialization in Fujian Province (Grant No. 2024.488).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.

Acknowledgments

We thank the anonymous reviewers for their constructive feedback.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
OODOut-of-Distribution
TDATopological Data Analysis
ECCEuler Characteristic Curve
AUROCArea Under Receiver Operating Characteristic
FPRFalse Positive Rate
MSPMaximum Softmax Probability
IDIn-Distribution

References

  1. Hendrycks, D.; Gimpel, K. A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks. arXiv 2017, arXiv:1610.02136v3. [Google Scholar] [CrossRef]
  2. Liang, S.; Li, Y.; Srikant, R. Enhancing The Reliability of Out-of-Distribution Image Detection in Neural Networks. arXiv 2018, arXiv:1706.02690v5. [Google Scholar]
  3. Liu, W.; Wang, X.; Owens, J.; Li, Y. Energy-based Out-of-distribution Detection. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS); NeurIPS Proceedings: San Diego, CA, USA, 2020; Volume 33, pp. 21464–21475. [Google Scholar]
  4. Lee, K.; Lee, K.; Lee, H.; Shin, J. A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS); NeurIPS Proceedings: San Diego, CA, USA, 2018; Volume 31. [Google Scholar]
  5. Wang, H.; Li, Z.; Feng, L.; Zhang, W. ViM: Out-of-Distribution with Virtual-Logit Matching. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 4921–4930. [Google Scholar]
  6. Song, Y.; Sebe, N.; Wang, W. RankFeat: Rank-1 Feature Removal for Out-of-Distribution Detection. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS); NeurIPS Proceedings: San Diego, CA, USA, 2022. [Google Scholar]
  7. Ahn, Y.H.; Park, G.M.; Kim, S.T. LINe: Out-of-Distribution Detection by Leveraging Important Neurons. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 17–24 June 2023. [Google Scholar]
  8. Sun, Y.; Ming, Y.; Zhu, X.; Li, Y. Out-of-distribution Detection with Deep Nearest Neighbors. In Proceedings of the International Conference on Machine Learning (ICML); PMLR: Cambridge, MA, USA, 2022; pp. 20827–20840. [Google Scholar]
  9. Ming, Y.; Sun, Y.; Dia, O.; Li, Y. How to Exploit Hyperspherical Embeddings for Out-of-Distribution Detection? In Proceedings of the International Conference on Learning Representations (ICLR), Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
  10. Huang, R.; Geng, A.; Li, Y. On the Importance of Gradients for Detecting Distributional Shifts in the Wild. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS); NeurIPS Proceedings: San Diego, CA, USA, 2021; Volume 34, pp. 677–689. [Google Scholar]
  11. Djurisic, A.; Bozanic, N.; Ashok, A.; Liu, R. Extremely Simple Activation Shaping for Out-of-Distribution Detection. In Proceedings of the International Conference on Learning Representations (ICLR), Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
  12. Yang, J.; Wang, P.; Zou, D.; Zhou, Z.; Ding, K.; Peng, W.; Wang, H.; Chen, G.; Li, B.; Sun, Y.; et al. OpenOOD: Benchmarking Generalized Out-of-Distribution Detection. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), Datasets and Benchmarks Track; NeurIPS Proceedings: San Diego, CA, USA, 2022. [Google Scholar]
  13. Yu, G.; Zhu, J.; Yao, J.; Han, B. Self-Calibrated Tuning of Vision-Language Models for Out-of-Distribution Detection. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS); NeurIPS Proceedings: San Diego, CA, USA, 2024. [Google Scholar]
  14. Zia, A.; Khamis, A.; Nichols, J.; Tayab, U.B.; Hayder, Z.; Rolland, V.; Stone, E.; Petersson, L. Topological Deep Learning: A Review of an Emerging Paradigm. Artif. Intell. Rev. 2024, 57, 77. [Google Scholar] [CrossRef]
  15. Papamarkou, T.; Birdal, T.; Bronstein, M.; Carlsson, G.; Curry, J.; Gao, Y.; Hajij, M.; Kwitt, R.; Lio, P.; Di Lorenzo, P.; et al. Position: Topological Deep Learning Is the New Frontier for Relational Learning. Proc. Mach. Learn. Res. (PMLR) 2024, 235, 39529. [Google Scholar] [PubMed]
  16. Gurugubelli, S.; Chepuri, S.P. Simple Yet Powerful Simplicial-aware Neural Networks. In Proceedings of the International Conference on Learning Representations (ICLR), Vienna, Austria, 7–11 May 2024. [Google Scholar]
  17. Hendrycks, D.; Mazeika, M.; Dietterich, T. Deep Anomaly Detection with Outlier Exposure. In Proceedings of the International Conference on Learning Representations (ICLR), New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
  18. Du, X.; Wang, Z.; Cai, M.; Li, Y. VOS: Learning What You Don’t Know by Virtual Outlier Synthesis. In Proceedings of the International Conference on Learning Representations (ICLR), Virtual, 25–29 April 2022. [Google Scholar]
  19. Tao, L.; Du, X.; Zhu, X.; Li, Y. Non-Parametric Outlier Synthesis. In Proceedings of the International Conference on Learning Representations (ICLR), Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
  20. Jiang, W.; Cheng, H.; Chen, M.; Wang, C.; Wei, H. DOS: Diverse Outlier Sampling for Out-of-Distribution Detection. In Proceedings of the International Conference on Learning Representations (ICLR), Vienna, Austria, 7–11 May 2024. [Google Scholar]
  21. Sun, Y.; Guo, C.; Li, Y. ReAct: Out-of-distribution Detection with Rectified Activations. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS); NeurIPS Proceedings: San Diego, CA, USA, 2021; Volume 34, pp. 14453–14468. [Google Scholar]
  22. Liu, X.; Lochman, Y.; Zach, C. GEN: Pushing the Limits of Softmax-Based Out-of-Distribution Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 17–24 June 2023; pp. 23946–23955. [Google Scholar]
  23. Zhang, B.; He, Z.; Lin, H. A Comprehensive Review of Deep Neural Network Interpretation Using Topological Data Analysis. Neurocomputing 2024, 609, 128513. [Google Scholar] [CrossRef]
  24. Barannikov, S.; Trofimov, I.; Balabin, N.; Burnaev, E. A Method for Comparing Neural Network Representations. Proc. Int. Conf. Mach. Learn. (ICML) 2022, 162, 1607–1626. [Google Scholar]
  25. Dlotko, P.; Gurnari, D. Euler Characteristic Curves and Profiles: A Stable Shape Invariant for Big Data Problems. GigaScience 2023, 12, giad094. [Google Scholar] [CrossRef] [PubMed]
  26. Krizhevsky, A. Learning Multiple Layers of Features from Tiny Images; CIFAR Technical Report; University of Toronto: Toronto, ON, Canada, 2009. [Google Scholar]
  27. Cimpoi, M.; Maji, S.; Kokkinos, I.; Mohamed, S.; Vedaldi, A. Describing Textures in the Wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Columbus, OH, USA, 23–28 June 2014; pp. 3606–3613. [Google Scholar]
  28. Netzer, Y.; Wang, T.; Coates, A.; Bissacco, A.; Wu, B.; Ng, A.Y. Reading Digits in Natural Images with Unsupervised Feature Learning. In Proceedings of the NIPS Workshop on Deep Learning and Unsupervised Feature Learning; NeurIPS Proceedings: San Diego, CA, USA, 2011. [Google Scholar]
  29. Nilsback, M.E.; Zisserman, A. Automated Flower Classification over a Large Number of Classes. In Proceedings of the Indian Conference on Computer Vision, Graphics and Image Processing (ICVGIP), Bhubaneswar, India, 16–19 December 2008. [Google Scholar]
  30. Helber, P.; Bischke, B.; Dengel, A.; Borth, D. EuroSAT: A Novel Dataset and Deep Learning Benchmark for Land Use and Land Cover Classification. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2019, 12, 2217–2226. [Google Scholar] [CrossRef]
  31. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), San Francisco, CA, USA, 18–20 June 2016; pp. 770–778. [Google Scholar]
Figure 1. Overview of the TopoAD framework. Stage 1: A frozen ResNet-18 backbone extracts multi-scale feature maps from layers 2, 3, and 4. Stage 2: Topological descriptors are computed via Euler Characteristic Curves (ECCs) with N = 32 threshold bins. We propose three variants: TopoAD-Linear uses raw ECCs; TopoAD-Gated applies a learnable projection N N to enhance discriminability; TopoAD-Full employs threshold attention for adaptive multi-scale fusion. Stage 3: Task-adaptive aggregation strategies are tailored to different scenarios: mean pooling for efficiency (near-OOD, low-resource); projection-based gating for high performance (far-OOD); and threshold attention for strongest fusion. The aggregated topological feature Z T is concatenated with the standardized energy score z E . Stage 4: A two-layer MLP head processes the fused representation [ Z T ; z E ] to produce the final OOD score, where higher scores indicate out-of-distribution samples.
Figure 1. Overview of the TopoAD framework. Stage 1: A frozen ResNet-18 backbone extracts multi-scale feature maps from layers 2, 3, and 4. Stage 2: Topological descriptors are computed via Euler Characteristic Curves (ECCs) with N = 32 threshold bins. We propose three variants: TopoAD-Linear uses raw ECCs; TopoAD-Gated applies a learnable projection N N to enhance discriminability; TopoAD-Full employs threshold attention for adaptive multi-scale fusion. Stage 3: Task-adaptive aggregation strategies are tailored to different scenarios: mean pooling for efficiency (near-OOD, low-resource); projection-based gating for high performance (far-OOD); and threshold attention for strongest fusion. The aggregated topological feature Z T is concatenated with the standardized energy score z E . Stage 4: A two-layer MLP head processes the fused representation [ Z T ; z E ] to produce the final OOD score, where higher scores indicate out-of-distribution samples.
Sustainability 18 01215 g001
Figure 2. Visualization of Mean Euler Characteristic Curves (ECCs). Comparison of topological profiles between In-Distribution (CIFAR-10) and the Textures (Far-OOD) dataset across Layers 2, 3, and 4. The solid lines represent the mean ECC values, and the shaded regions indicate ± 1 standard deviation. Different colors are used to distinguish In-Distribution and OOD samples and are for visualization purposes only. The distinct separation between the two profiles (particularly in Layers 2 and 3) highlights how TopoAD effectively captures structural anomalies in texture data, explaining the superior detection performance (89.98% AUROC) reported in Table 1. Note that in Layer 4, the curves overlap completely due to the low spatial resolution of the activation maps, which limits the formation of topological structures.
Figure 2. Visualization of Mean Euler Characteristic Curves (ECCs). Comparison of topological profiles between In-Distribution (CIFAR-10) and the Textures (Far-OOD) dataset across Layers 2, 3, and 4. The solid lines represent the mean ECC values, and the shaded regions indicate ± 1 standard deviation. Different colors are used to distinguish In-Distribution and OOD samples and are for visualization purposes only. The distinct separation between the two profiles (particularly in Layers 2 and 3) highlights how TopoAD effectively captures structural anomalies in texture data, explaining the superior detection performance (89.98% AUROC) reported in Table 1. Note that in Layer 4, the curves overlap completely due to the low spatial resolution of the activation maps, which limits the formation of topological structures.
Sustainability 18 01215 g002
Table 1. Main results on OOD detection (AUROC ↑ / FPR95 ↓). All methods in this table are evaluated in-house under our unified pipeline with the same CIFAR-10-trained ResNet-18 [31] backbone, and the results are averaged over 3 runs. Bold indicates the best performance in each column.
Table 1. Main results on OOD detection (AUROC ↑ / FPR95 ↓). All methods in this table are evaluated in-house under our unified pipeline with the same CIFAR-10-trained ResNet-18 [31] backbone, and the results are averaged over 3 runs. Bold indicates the best performance in each column.
MethodTexturesSVHNFlowers102EuroSAT
AUROC ↑FPR95 ↓AUROC ↑FPR95 ↓AUROC ↑FPR95 ↓AUROC ↑FPR95 ↓
MSP81.6374.3181.0780.5984.3273.0285.0273.96
ReAct81.8273.0981.3679.2184.9869.8088.0666.60
Mahalanobis82.5272.0788.2453.1085.3266.1191.5741.61
KNN87.7358.0388.8455.6690.4151.8894.4331.45
TopoAD-Full88.8852.0285.0174.5489.0355.0592.8645.14
TopoAD-Linear89.6548.8388.1863.3788.5755.8193.5342.28
TopoAD-Gated89.9845.6987.0164.6089.2353.8194.4336.20
Table 2. Performance comparison with State-of-the-Art (SOTA) methods on the CIFAR-10 benchmark. AUROC ↑ indicates higher is better, while FPR95 ↓ indicates lower is better. Bold indicates the best performance in each column.
Table 2. Performance comparison with State-of-the-Art (SOTA) methods on the CIFAR-10 benchmark. AUROC ↑ indicates higher is better, while FPR95 ↓ indicates lower is better. Bold indicates the best performance in each column.
MethodTexturesSVHNFlowers102EuroSAT
AUROC ↑FPR95 ↓AUROC  ↑FPR95 ↓AUROC ↑FPR95 ↓AUROC ↑FPR95 ↓
Training-time Methods (High Training Cost)
NPOS [19]89.1049.5095.3018.2057.7094.4086.9159.09
DOS [20]89.6546.2096.8014.5059.2291.3188.5456.53
Post-hoc Methods (Low Inference Cost)
GEN [22]85.4063.2091.5032.4086.9148.5094.4525.56
TopoAD-Gated (Ours)89.9845.6987.0164.6089.2353.8194.4336.20
The dagger symbol () denotes results reported from the original papers.
Table 3. Deployment Efficiency Benchmark (CPU, Batch = 1). We report the end-to-end latency (Backbone + TopoAD) and memory footprint. The computational overhead of the topological head (Linear vs. Full) is negligible (<2 ms) compared to the backbone, confirming that our method is lightweight and backbone-agnostic.
Table 3. Deployment Efficiency Benchmark (CPU, Batch = 1). We report the end-to-end latency (Backbone + TopoAD) and memory footprint. The computational overhead of the topological head (Linear vs. Full) is negligible (<2 ms) compared to the backbone, confirming that our method is lightweight and backbone-agnostic.
BackboneDatasetVariantLatency (ms)Memory (MB)
ResNet-18CIFAR-10TopoAD-Linear159.4 ± 5.1567.7
TopoAD-Gated159.5 ± 7.0568.4
TopoAD-Full158.7 ± 5.0568.6
ResNet-18CIFAR-100TopoAD-Linear122.1 ± 4.5687.6
TopoAD-Gated122.2 ± 5.0688.1
TopoAD-Full122.1 ± 4.7687.7
ResNet-50CIFAR-10TopoAD-Linear612.7 ± 11.2791.5
TopoAD-Gated612.6 ± 10.8792.8
TopoAD-Full614.5 ± 11.7792.6
Table 4. Ablation study on aggregation strategies (AUROC, %). Bold indicates the best performance in each column.
Table 4. Ablation study on aggregation strategies (AUROC, %). Bold indicates the best performance in each column.
VariantTexturesSVHNFlowers102EuroSATExtra Params
Energy-only80.7468.6984.8385.822
Topology-only89.6286.1989.0393.7222,977
Concat-only88.2483.9388.8492.449604
TopoAD-Linear89.6588.1888.5793.53193
TopoAD-Full88.8885.0189.0392.8620,001
TopoAD-Gated89.9887.0189.2394.4320,001
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lin, L.; Ye, X.; Lin, Z.; Kang, Y.; Chen, S.; Liu, X. TopoAD: Resource-Efficient OOD Detection via Multi-Scale Euler Characteristic Curves. Sustainability 2026, 18, 1215. https://doi.org/10.3390/su18031215

AMA Style

Lin L, Ye X, Lin Z, Kang Y, Chen S, Liu X. TopoAD: Resource-Efficient OOD Detection via Multi-Scale Euler Characteristic Curves. Sustainability. 2026; 18(3):1215. https://doi.org/10.3390/su18031215

Chicago/Turabian Style

Lin, Liqiang, Xueyu Ye, Zhiyu Lin, Yunyu Kang, Shuwu Chen, and Xiaolong Liu. 2026. "TopoAD: Resource-Efficient OOD Detection via Multi-Scale Euler Characteristic Curves" Sustainability 18, no. 3: 1215. https://doi.org/10.3390/su18031215

APA Style

Lin, L., Ye, X., Lin, Z., Kang, Y., Chen, S., & Liu, X. (2026). TopoAD: Resource-Efficient OOD Detection via Multi-Scale Euler Characteristic Curves. Sustainability, 18(3), 1215. https://doi.org/10.3390/su18031215

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop