Table of Contents
Fetching ...

Local Density-Based Anomaly Score Normalization for Domain Generalization

Kevin Wilkinghoff, Haici Yang, Janek Ebbers, François G. Germain, Gordon Wichern, Jonathan Le Roux

TL;DR

This paper tackles domain generalization in anomalous sound detection by addressing the domain mismatch in anomaly-score distributions across source and target domains. It introduces a local-density-based anomaly-score normalization with two variants, $A^{K-NN}_{scaled}$ and $A^{GWRP}_{scaled}$, which reweight scores using local reference densities defined through $K$-nearest neighbors or a weighted density with parameter $r$. Across five DCASE ASD datasets and multiple embeddings, the normalization consistently improves target-domain performance and often outperforms existing normalization strategies without requiring domain labels or domain-specific training. The proposed method enables robust, single-threshold ASD under diverse domain shifts and demonstrates strong potential for real-world deployment, including ensemble gains that achieve competitive or state-of-the-art results on several benchmarks.

Abstract

State-of-the-art anomalous sound detection (ASD) systems in domain-shifted conditions rely on projecting audio signals into an embedding space and using distance-based outlier detection to compute anomaly scores. One of the major difficulties to overcome is the so-called domain mismatch between the anomaly score distributions of a source domain and a target domain that differ acoustically and in terms of the amount of training data provided. A decision threshold that is optimal for one domain may be highly sub-optimal for the other domain and vice versa. This significantly degrades the performance when only using a single decision threshold, as is required when generalizing to multiple data domains that are possibly unseen during training while still using the same trained ASD system as in the source domain. To reduce this mismatch between the domains, we propose a simple local-density-based anomaly score normalization scheme. In experiments conducted on several ASD datasets, we show that the proposed normalization scheme consistently improves performance for various types of embedding-based ASD systems and yields better results than existing anomaly score normalization approaches.

Local Density-Based Anomaly Score Normalization for Domain Generalization

TL;DR

This paper tackles domain generalization in anomalous sound detection by addressing the domain mismatch in anomaly-score distributions across source and target domains. It introduces a local-density-based anomaly-score normalization with two variants, and , which reweight scores using local reference densities defined through -nearest neighbors or a weighted density with parameter . Across five DCASE ASD datasets and multiple embeddings, the normalization consistently improves target-domain performance and often outperforms existing normalization strategies without requiring domain labels or domain-specific training. The proposed method enables robust, single-threshold ASD under diverse domain shifts and demonstrates strong potential for real-world deployment, including ensemble gains that achieve competitive or state-of-the-art results on several benchmarks.

Abstract

State-of-the-art anomalous sound detection (ASD) systems in domain-shifted conditions rely on projecting audio signals into an embedding space and using distance-based outlier detection to compute anomaly scores. One of the major difficulties to overcome is the so-called domain mismatch between the anomaly score distributions of a source domain and a target domain that differ acoustically and in terms of the amount of training data provided. A decision threshold that is optimal for one domain may be highly sub-optimal for the other domain and vice versa. This significantly degrades the performance when only using a single decision threshold, as is required when generalizing to multiple data domains that are possibly unseen during training while still using the same trained ASD system as in the source domain. To reduce this mismatch between the domains, we propose a simple local-density-based anomaly score normalization scheme. In experiments conducted on several ASD datasets, we show that the proposed normalization scheme consistently improves performance for various types of embedding-based ASD systems and yields better results than existing anomaly score normalization approaches.

Paper Structure

This paper contains 17 sections, 3 equations, 3 figures, 4 tables.

Figures (3)

  • Figure 1: Illustration of the domain mismatch between the anomaly scores of a source domain and a target domain. Normal and anomalous samples are usually less well separated in the target domain than in the source domain, which decreases domain-independent performance over the performance obtained for the source domain alone. Furthermore, the optimal decision thresholds for separating the scores belonging to the normal and anomalous data of different data domains differ substantially, which significantly decreases performance when using only a single threshold for both domains. Figure taken from wilkinghoff2025handling-eusipco.
  • Figure 2: Illustration of the impact of the ratio-based normalization approach on the selection of the reference points (in blue) that are to be considered the nearest for a given test point (in red). For three different considered points (in yellow) with similar distance to the test sample in the original embedding space, the scale at which they are compared to other points is shown. For one of them, the scaling factor is $1.4$ because the point is in a dense neighborhood; for another one, the scaling factor is $1$; and for the third sample in the sparse area, the scaling factor is $0.6$. When assessing the distance between the test point and any of the considered samples, the distances should be computed in the corresponding rescaled planes. In the end, the reference point with the smallest scaled distance is selected. Here, the point in the sparse area with $0.6$ scaling factor gets selected, despite the fact that all points initially had a similar distance to the test sample. For illustration purposes, planes are depicted here, although the normalization approach involves cosine distances on a sphere. For the difference-based normalization approach, reference samples are shifted based on their local densities instead of re-scaling the embedding space, which has a similar effect on the normalized distances but is more difficult to illustrate.
  • Figure 3: Performance change for the ratio-based score normalization using different values of the gwrp constant $r$ and number $K$ for knn. The models Direct-act, OpenL3-raw, BEATs-raw, and eat-raw are evaluated on the DCASE2020, DCASE2022, DCASE2023, DCASE2024, and DCASE2025 datasets. For Direct-act, mean results over ten independent trials are shown. Similar trends can be seen in the plots corresponding to the difference-based normalization.