2.1. Overall Framework
The proposed framework, referred to as target-domain cosine prototype anchoring (TD-CPA), combines multi-resolution acoustic fingerprints with target-normal prototype construction and cosine deviation scoring. It is designed for limited-sample industrial ASD, where only a small number of normal recordings from a target machine may be available, and representative anomalous recordings are difficult to obtain in advance. The framework separates normal-reference construction from test-time scoring and does not use anomaly labels during model construction.
As shown in
Figure 1, the proposed method consists of two stages: target-normal prototype construction and test anomaly scoring. In the first stage, the normal training recordings are converted into multi-resolution Log-Mel spectrograms. Global band-wise, temporal-delta, segment-wise, Mel-band energy-ratio, and energy-envelope statistics are then concatenated into a 10,011-dimensional acoustic fingerprint. A PCA mapping fitted only from the normal training partition produces a compact embedding, and the 10 target-normal embeddings are averaged to form the target prototype. In the second stage, every test recording is transformed with the stored training parameters and scored by its cosine deviation from this fixed prototype. No test recording is used during PCA fitting or prototype construction.
The high-dimensional acoustic fingerprints are then projected into a compact embedding space using PCA to reduce redundancy and improve the stability of distance-based anomaly measurement [
35,
36]. The embeddings of target-normal samples are averaged to construct the target acoustic prototype, which represents the normal acoustic state of the monitored equipment.
In the testing stage, each sample is processed using the same feature-extraction and embedding procedure. The cosine deviation between the test embedding and the target prototype is used as the anomaly score. A larger deviation indicates a higher probability of an abnormal acoustic event. Overall, the method provides a simple and interpretable score for limited-sample industrial ASD under domain-shifted conditions. It may be extended to power equipment monitoring only after validation using field acoustic data.
2.2. Multi-Resolution Acoustic Fingerprint Representation
Industrial machine sounds may contain both stable operating components and short-duration abnormal variations. Stable components can arise from continuous rotation, mechanical vibration, fan operation, or background noise, while abnormal acoustic events may affect only short intervals or specific frequency bands. Log-Mel representations are widely used in ASD because they provide a compact description of time-varying spectral energy [
1,
24]. However, a single time-frequency resolution may not fully capture both transient changes and stable spectral patterns. Multi-resolution acoustic analysis is therefore used to retain complementary temporal and spectral information [
2,
25]. This rationale is general to industrial acoustic monitoring and does not imply that the evaluated anomalies are partial-discharge events.
Abnormal acoustic events can affect different time scales. Short impacts, intermittent contacts, and rapid energy releases may be localized in time, while friction, looseness, and operating-state changes can modify longer spectral patterns [
25,
30]. In this study, multi-resolution means that the same 16 kHz waveform is processed in three parallel STFT branches with 512-, 1024-, and 2048-sample Hamming windows (32, 64, and 128 ms) and 50% overlap. The short window emphasizes timing, the long window emphasizes frequency structure, and the middle window provides an intermediate view. Each power spectrum is mapped to the same 128 Mel bands from 20 Hz to 8 kHz before statistical aggregation. Thus, the branches differ in analysis scale, not in the recordings used or the number of Mel bands. The complete acoustic-fingerprint extraction procedure is illustrated in
Figure 2.
For an input acoustic waveform
, this study constructs Log-Mel spectrograms under multiple time-frequency resolutions. The window length set is defined as:
Different window lengths correspond to different time-frequency analysis scales. A shorter window provides higher temporal resolution and is more sensitive to transient acoustic changes, while a longer window provides higher frequency resolution and is more suitable for describing stable spectral structures. The medium window provides a balance between temporal and spectral resolution.
For the
-th resolution, the short-time Fourier transform (STFT) of the input signal is calculated as:
where
is the window length of the
-th resolution,
is the hop length,
is the window function,
is the frame index, and
is the frequency-bin index. The STFT converts the one-dimensional waveform into a time-frequency representation, which describes the variation in spectral energy over time.
The power spectrum is then projected onto the Mel filter bank and converted into a logarithmic scale. The Log-Mel spectrogram at the
-th resolution is calculated as:
where
denotes the resolution branch;
is the time-frame index;
is the Mel-band index; and
is the frequency-bin index. Here,
and
denote the numbers of time frames and nonnegative frequency bins at resolution
, respectively.
is the complex STFT coefficient at time frame
and frequency bin
, and
is the corresponding power-spectrum value.
denotes the weight assigned to frequency bin
by the
-th Mel filter at resolution
. The constant
is introduced to ensure numerical stability and avoid taking the logarithm of zero.
The resulting Log-Mel spectrogram provides a compact time-frequency description of acoustic spectral energy and has been widely used in anomalous sound detection [
24]. Because a single time-frequency resolution may not preserve both short-duration variations and relatively stable spectral structures, three complementary resolutions are used in this study. This design is also consistent with recent studies showing that frequency-aware and complementary spectral information can improve anomalous sound characterization [
2,
25].
Explicit statistical features are then extracted from each resolution to construct the acoustic fingerprint. This approach summarizes the principal temporal and spectral characteristics of the recordings without requiring end-to-end deep-network training, making it suitable for limited normal-sample conditions.
The fingerprint extraction process contains five components. First, global per-band statistics are calculated from both the original and per-band normalized Log-Mel spectrograms. Second, the mean, standard deviation, maximum, and minimum of the first-order temporal difference are calculated for each Mel band. Third, every spectrogram is divided into three approximately equal temporal segments, and the mean and standard deviation of the original and normalized values are calculated within each segment. Fourth, the relative energy of each Mel band is retained. Finally, nine statistics are used to summarize the frame-wise energy envelope and its first-order difference. The five feature groups contain 1152, 512, 1536, 128, and 9 values, respectively. Specifically, the global band-wise statistics contain 9 descriptors for each of the 128 Mel bands, producing 9 × 128 = 1152 values. The temporal-delta statistics contain 4 descriptors for each Mel band, producing 4 × 128 = 512 values. The segment-wise statistics contain the mean and standard deviation of both the raw and normalized Log-Mel spectrograms within K = 3 temporal segments, producing 2 × 2 × 3 × 128 = 1536 values. The Mel-band energy ratios contribute 128 values, while the energy-envelope statistics contribute 9 values. Therefore, each resolution produces 1152 + 512 + 1536 + 128 + 9 = 3337 values. Concatenating the three resolution branches results in a 10,011-dimensional acoustic fingerprint before PCA. Mel-band energy ratios and energy-envelope statistics are retained as common auxiliary features in all feature-component ablation settings.
The temporal delta features are extracted from the first-order temporal difference in the Log-Mel spectrogram:
where
denotes the temporal change in the Log-Mel energy at frame
and Mel band
. Compared with the original Log-Mel spectrogram, the delta representation emphasizes frame-to-frame acoustic variation. This is useful for describing sudden changes caused by transient abnormal events, especially when the abnormal information appears only in a short time interval.
The segment-wise statistical features are used to preserve coarse local temporal information. In practical acoustic monitoring, abnormal changes may occur only in part of a signal. If only global statistics are used, these local changes may be averaged out. Therefore, each Log-Mel spectrogram is divided into
temporal segments, and statistical descriptors are calculated within each segment. In this study,
= 3 is used. The segment-wise features can retain local acoustic differences while avoiding the high dimensionality of frame-level spectrogram modeling. The extracted acoustic fingerprint features are summarized in
Table 1.
For each STFT resolution, the acoustic fingerprint is formed by concatenating five feature groups:
Here,
denotes the acoustic fingerprint extracted using an
-sample STFT window. The five terms in Equation (5) represent the global band-wise, temporal-delta, segment-wise, Mel-band energy-ratio, and energy-envelope feature groups, respectively. The complete multi-resolution fingerprint is obtained as:
Here, denotes the final multi-resolution feature vector. Each resolution contributes 3337 values, resulting in a 10,011-dimensional fingerprint for each recording. The three STFT windows provide complementary time-frequency views, while the five statistical groups describe the overall spectral distribution, frame-to-frame variation, coarse local temporal structure, relative band-energy allocation, and frame-wise energy transients. The same feature-extraction procedure is applied to both normal training and test recordings, whereas PCA is fitted using only the normal training fingerprints and then applied unchanged to the test data.
2.3. Compact Embedding and Target Prototype Anchoring
After multi-resolution acoustic fingerprint extraction, each acoustic sample is represented by a high-dimensional feature vector. Although the feature vector contains complementary information from different time-frequency resolutions, it may also include redundant and correlated components. Directly performing anomaly scoring in the original feature space may lead to unstable results, especially when only a limited number of target-normal samples are available. Therefore, this study first maps the multi-resolution acoustic fingerprint into a compact embedding space and then constructs a target acoustic prototype for normal-state modeling. The target prototype construction process is illustrated in
Figure 3.
For each recording, the multi-resolution procedure produces a 10,011-dimensional acoustic fingerprint. Per-band normalization is performed within each spectrogram branch when the normalized statistical features are calculated. No target-only normalization is applied to the final fingerprints.
For each machine section, the fingerprints of all 1000 normal training recordings, including 990 source-normal and 10 target-normal recordings, are arranged as the training matrix
. The training matrix is centered using its column-wise mean:
Here, is the 10,011-dimensional fingerprint of the -th normal training recording, is the column-wise mean of the training fingerprints, 1 is a 1000-dimensional vector of ones, and is the centered training matrix. Both and contain 1000 rows and 10,011 columns. No test recording is used to calculate or construct .
PCA is fitted separately for each evaluated machine section using the complete normal training partition rather than only the 10 target-normal recordings. Singular value decomposition is applied to , and the 128 right singular vectors associated with the largest singular values form the projection matrix . Because the centered training matrix has a maximum rank of 999, retaining 128 principal components is mathematically feasible. The rank-at-most-nine restriction would apply only if PCA were fitted using the 10 target-normal recordings alone, which is not the procedure adopted in this study.
Each fingerprint is projected and standardized as follows:
Here, is the PCA projection matrix, is the 128-dimensional PCA coordinate vector of the -th recording, and is its standardized compact embedding. The vectors and denote the coordinate-wise mean and standard deviation calculated from the PCA coordinates of the same 1000 normal training recordings. The division in Equation (8) is performed element by element. A small positive constant is included in during implementation to ensure numerical stability. The centering vector, projection matrix, and coordinate-standardization parameters are stored and applied unchanged to all subsequent recordings. Thus, every recording is represented in the same normal-training-derived embedding space, while target-domain information is introduced through the target prototype.
After obtaining the compact embeddings, the target-normal embedding set is defined as:
Here,
denotes the target-normal embedding set,
is the number of available target-normal recordings, and
is the compact embedding of the
-th target-normal recording. The superscript
indicates the target domain, while the superscript
denotes normal data. The target-normal prototype is calculated by averaging all target-normal embeddings:
Here, denotes the target-normal acoustic prototype. In the main experiment, , so the prototype is the arithmetic mean of the 10 target-normal embeddings in the fixed 128-dimensional space. It serves as an algebraic target-domain reference rather than a learned classifier. No test or anomalous recording is used for PCA fitting, coordinate standardization, or prototype construction, and the prototype remains fixed throughout the reported evaluation.
Prototype-based similarity scoring has previously been investigated in ASD [
15,
16]. Therefore, prototype averaging and cosine scoring are not presented as standalone innovations. The contribution of this study lies in integrating target-normal prototype anchoring with the proposed multi-resolution statistical fingerprint and compact PCA embedding.
This construction is suitable for limited-sample industrial ASD, where only a few normal recordings may be available from a newly deployed target machine and representative anomalous recordings are difficult to obtain. This setting is consistent with first-shot and few-shot ASD studies that focus on adaptation to new target machines using limited target-domain data [
16,
21,
37]. The target prototype provides a compact representation of the normal acoustic state and serves as the reference for subsequent anomaly scoring. Test recordings close to the prototype are considered more consistent with the target-normal state, while larger deviations indicate a higher likelihood of abnormal acoustic behavior. The main variables used in the proposed method are summarized in
Table 2.
2.4. Cosine Deviation-Based Anomaly Scoring
After constructing the target-normal acoustic prototype, anomaly detection measures the deviation between each test sample and the prototype in the compact embedding space. Because model construction uses normal recordings only, anomalous recordings are not required in advance. This setting reflects industrial monitoring situations in which representative fault data are rare or unavailable. The test-time cosine deviation scoring process is shown in
Figure 4.
For each test recording
, the 10,011-dimensional fingerprint
is extracted using the same multi-resolution procedure as that applied to the training recordings. The stored normal-training parameters are then used to obtain the compact test embedding
Here,
is the acoustic fingerprint of test recording
,
is its 128-dimensional PCA coordinate vector, and
is the corresponding standardized compact embedding. The projection matrix
, fingerprint-centering vector
, and coordinate-standardization parameters
and
are obtained from the 1000 normal training recordings, as described in
Section 2.3. The division in Equation (11) is performed element by element. These parameters remain fixed and are not recalculated using the test recordings.
The similarity between the test embedding
and the target-normal acoustic prototype
is calculated using cosine similarity:
Here, denotes the cosine similarity of test recording , is the target-normal prototype defined in Equation (10), and denotes the Euclidean norm. Cosine similarity measures the directional consistency between two embedding vectors and is less sensitive than Euclidean distance to differences in their overall magnitudes. This property is useful in acoustic monitoring because variations in sensor position, propagation path, operating condition, and background noise may affect the magnitude of the extracted acoustic representation. Therefore, cosine similarity provides a direction-based comparison between the test embedding and the target-normal prototype while reducing sensitivity to uniform changes in embedding magnitude.
The anomaly score is defined as the cosine deviation from the target prototype:
A smaller value of indicates that the test sample is close to the target-normal acoustic prototype, suggesting that the equipment sound is consistent with the normal operating state. Conversely, a larger value of indicates that the test sample deviates from the target-normal acoustic pattern and is more likely to correspond to an abnormal acoustic event. In this way, the proposed method converts the similarity relationship between the test embedding and the target prototype into an interpretable anomaly score.
For practical decision-making, the anomaly score can be compared with a decision threshold:
where
is the decision threshold,
denotes a normal sample, and
denotes an abnormal sample. In field applications, the threshold can be determined according to the score distribution of normal validation samples or according to the required false alarm level. In the experimental evaluation of this study, threshold-independent metrics such as AUC and pAUC are also used to evaluate the ranking ability of the anomaly score without relying on a fixed threshold.
The cosine deviation-based scoring strategy is consistent with recent ASD studies that evaluate abnormality through prototype similarity or compact embedding comparison [
37,
38]. Compared with reconstruction-error-based methods, the proposed strategy does not require a decoder. Compared with classification-based methods, it does not require abnormal labels or many target samples. The anomaly score is directly obtained from the deviation between the test embedding and the target-normal prototype, making the process simple and interpretable.
For each test sample, the same feature extraction pipeline is used to generate the multi-resolution acoustic fingerprint. After normalization and PCA projection, the cosine deviation between the test embedding and the target-normal prototype is calculated as the anomaly score. This provides a direct measure of how much the test acoustic pattern deviates from the Target-normal acoustic state.