ConceptioArchivearXiv CS
arXiv CSopen access

Lightweight Multi-Scale Anomaly Detection for Resource-Constrained Edge Devices

Unknown · 2026 · arxiv_cs
arXiv CS · Papers · License: Open Access · 2026
Open Source ↗Direct PDF ↓
machine learning, deep learning, neural networks

L IGHTWEIGHT M ULTI -S CALE A NOMALY D ETECTION FOR R ESOURCE -C ONSTRAINED E DGE D EVICES

Raheen Junaid Wani School of Information Technology Indian Institute of Technology, Delhi New Delhi, India 110016

Smruti R. Sarangi Department of Computer Science Indian Institute of Technology, Delhi New Delhi, India 110016

arXiv:2607.12599v1 [cs.LG] 14 Jul 2026

A BSTRACT Time-series anomaly detection is increasingly important in IoT systems, sensor networks, and edge monitoring applications, where models must operate under strict constraints on memory, latency, and power consumption. While recent deep-learning approaches have improved detection accuracy, many remain computationally expensive and often fail to capture subtle anomalies due to limited multi-scale sensitivity. Autoencoders are widely used for anomaly detection because they reconstruct normal patterns well, leading to elevated reconstruction errors for anomalous inputs. Their simplicity and efficiency also make them suitable lightweight backbones for handling multi-scale inputs. To address these challenges, we propose a Lightweight MultiScale AutoEncoder (LMSAE) network for univariate time-series anomaly detection, designed to be compact and computationally efficient. LMSAE leverages the Discrete Wavelet Transform (DWT) to extract multi-scale features and employs a multi-scale loss function to improve sensitivity to subtle or hidden anomalies. Experiments on benchmark datasets demonstrate competitive or superior detection performance despite using significantly fewer parameters and a model size of less than 500 KB. LMSAE also achieves lowlatency, low-power inference on the NVIDIA Jetson Nano, with 9× reduction in inference latency and 2× reduction in power consumption, making it ideal for edge deployment. Keywords Edge Computing · Anomaly Detection · Deep Learning · Time Series · Low-Latency Inference

1

Introduction

The widespread deployment of IoT devices, sensor networks, and edge-AI systems has led to an increase in real-time data across domains such as healthcare, manufacturing, energy and smart infrastructure. In most of these applications, the data generated by sensors can be naturally represented as time series: sequences of observations indexed over time. Detecting anomalies in such data is crucial for ensuring system safety, maintaining reliability and avoiding costly failures. Sadly, Time Series Anomaly Detection (TSAD) is fundamentally challenging due to the complex nature of time series signals, which often exhibit strong temporal dependencies, non-stationary behavior, missing values and unpredictable changes. Traditional anomaly detection systems often rely on centralized cloud infrastructure, where sensor data is transmitted for processing and inference. This introduces latency, bandwidth overhead, and dependency on reliable connectivity. In contrast, edge computing enables data to be processed closer to the source, reducing latency and reliance on cloud connectivity. Edge devices typically use machine learning (ML) at the network edge to gather sensor data from large connected devices, analyze the data they receive, and identify trends and various operational situations for real-time decision making ([1]). Traditional TSAD techniques ([2]) based on statistical methods ([3]), distance/density methods ([4]) or clustering methods find it difficult to identify the temporal patterns associated with time series. Deep learning techniques, on the other hand, provide the capacity to naturally learn expressive, feature-rich representations. Specifically, unsupervised approaches work well in real-world TSAD scenarios since labeled anomaly data is scarce and costly to obtain. Reconstruction-based models ( [5], [6], [7], [8]), have gained prominence for their ability to learn to reconstruct normal patterns and detect anomalies via reconstruction error. More recent works like FCVAE ([9]) show that frequency representations can significantly improve anomaly detection for VAEs. However, these methods struggle to capture subtle anomalies.

Figure 1: Time series anomaly detection comparison across different models. (a) The input time series with a subtle anomaly highlighted with the x-axis representing the time index. (b–f) Anomaly scores from various models. Only LMSAE (f) clearly detects the subtle anomaly whereas other models either miss it or exhibit noisy patterns. (g) gives a visual idea of the multi-scale view.

Consider Figure 1(a) which shows a magnified portion of a time series dataset from an anomaly detection benchmark (NAB-NYC Taxi ([10])). It represents taxi passenger data over time. Most of the signal exhibits a repeating daily pattern: regular rises and falls reflecting typical passenger volumes. A subtle anomaly can be seen as a short, localized deviation that does not break this broad pattern drastically but still departs from the expected structure in a non-obvious way. For instance, the anomaly highlighted in red box does not show a very major spike or dip, yet it subtly disrupts the rhythm. Visually, it blends in with the rest of the series unless closely examined, and can be easily missed by models focused only on large scale changes. Figures 1(b) to (f) show how some of the reconstruction-based TSAD models, including ours (referred to as LMSAE), respond to this segment of the time series. It can be observed that the anomaly score produced by these models (Figure 1(b-e)) for a window containing this anomaly remains similar to the anomaly scores for the normal points. They treat the anomaly just like any other normal variation because it does not stand out in terms of size or shape. From their perspective, nothing unusual is happening. However, Figure 1(f) shows the output from our approach, which clearly marks this region with a noticeable peak in the anomaly score. Even though the anomaly is not visually dramatic, our method detects that the rhythm of the signal has changed in a meaningful way. This kind of sensitivity is crucial, especially in real-world settings where early or weak anomalies can be the first sign of a developing issue. For example, a small yet unusual dip in passenger volume could reflect a minor system disruption, a localized event, or early signs of a broader pattern shift. If such anomalies are missed, they might accumulate or go unnoticed until they become more serious. Therefore, being able to reliably detect subtle deviations without relying on large-scale changes is essential not just for accuracy but also for timely and informed decision-making, especially in environments where quick responses matter. Reconstruction-based methods (based on either AEs (Fig 1(b)), VAEs (Fig 1(c,e)) or GANs (Fig 1(d)), whether operating in the time or frequency domain, typically process the entire signal as a single stream. During training, they learn to reconstruct the overall shape of the time series by minimizing the average reconstruction error across all timesteps, due to which they tend to learn the large-scale patterns and effectively generalize the series. Since these models learn to generalize the signal’s dominant behavior, small or localized deviations often get smoothed out or absorbed into the reconstruction. This limitation stems from a lack of multi-scale sensitivity (refer to Fig 1(g) for an intuitive visual idea). Anomalies that are small in amplitude or confined to a narrow temporal or frequency band remain undetected unless they cause a significant disruption in the overall signal. Even when frequency cues are used, unless the anomaly leaves a strong enough footprint, it tends to be overlooked. Without an explicit way to decompose and isolate patterns at different resolutions, these models miss out on the nuances. 2

Recent advances in TSAD have steadily improved detection accuracy through increasingly complex model designs. However, this evolution has also led to a sharp rise in model size and parameter count, shifting the field toward architectures that are difficult to deploy on edge devices. For instance, the STM32WB55 MCU offers only 1 MB of flash memory and 256 KB of SRAM, which places tight restrictions on model size. In this scenario, TSAD models like TADGAN ([8]) and VAE-LSTM ([6]), with model sizes 1.1 MB and 2.8 MB respectively, are simply too large to be deployed on such devices. Even when using more capable edge-AI platforms like the NVIDIA Jetson Nano (which offers 2 GB or 4 GB RAM), there are high inference latency and energy consumption costs associated due to limited GPU compute capacity and power constraints (5W-10W). Models with new architectures, such as attention modules, are even larger, with FCVAE ([9]), having a model size of 13 MB. Since existing models are built for powerful systems, they require significant architectural changes for edge deployment. In contrast, our model is designed from the ground up for both server-class performance and edge efficiency, enabling seamless deployment across platforms without the need for separate versions or post-hoc optimizations. Therefore, there are two main challenges that have persisted until now: ❶ The need to detect subtle anomalies that may be critical in real-time applications but are often missed by existing methods. ❷ Need to create an architecture that is not too bulky in terms of parameter count and model size, and that can perform well on powerful systems while also being deployable on resource-constrained edge devices. To address these, we propose a novel and resource-efficient model architecture called LMSAE (Lightweight MultiScale AutoEncoder). For the first challenge, the model is designed to enhance sensitivity to subtle anomalies by including a multi-resolution view where Discrete Wavelet Transforms are a part of the picture. For the second challenge, we use a lightweight autoencoder backbone to process different scales appropriately resulting in a robust anomaly detection model. In summary, our main contributions are as follows: • We introduce LMSAE, a compact TSAD architecture that augments a basic autoencoder with multi-scale wavelet decomposition, enhancing anomaly detection sensitivity, especially for subtle deviations that disrupt the rhythm. • We formulate a multi-scale loss function that enhances sensitivity to subtle anomalies. Specifically, an anomaly that affects a single frequency level will result in a large error at that level, even if its impact on the overall signal is minor. This decomposition allows the system to act as if it has multiple "alarms", one for each scale, where a significant deviation in any level signals a potential anomaly. • We significantly reduce the model size and the parameter count as compared to existing baselines: LMSAE uses only 97K parameters and a model size of 425KB, in contrast to TADGAN (250K/1.1M B), VAE-LSTM (700K/2.8M B), and FCVAE (1400K/13M B). • We extensively evaluate our model on standard anomaly detection benchmarks (NAB and Yahoo) and show competitive or superior performance despite a significantly smaller model size. • We demonstrate the feasibility of deployment on edge devices, such as the NVIDIA Jetson Nano. The paper is organized as follows. Section 2 provides the background of Wavelet Transform and Autoencoders. Sections 3 and 4 discusses the problem and the design method. Section 5 provides the details of the experimental setup. Sections 6 and 7 presents the experimental results and model analysis, respectively. We present the related work in Section 8 and finally conclude in Section 9.

2

Background

2.1

Wavelet Transforms

The wavelet transform uses wavelets as basis functions, where a wavelet is defined as an oscillatory function with a compact support (defined only for a small window Rof time). Consider a mother wavelet satisfying the two conditions: R∞ ∞ ψ(t)dt = 0 (area under the curve is zero) and −∞ |ψ(t)|2 dt < ∞ (finite energy). This can be scaled and shifted −∞ to generate different child wavelets: √1s ψ( t−k s ) where s is the scaling parameter and k is the time-shifting parameter. s corresponds to the frequency information ( f1 ), which dilates or compresses the signal, while k shifts the wavelet along the signal ([11], [12]). The wavelet is shifted across time, filling the rows of the time-scale plane, by changing the translation k while maintaining a constant scale s. Conversely, filling the columns of the time-scale plane with a fixed k while varying the scale s modifies the frequency resolution. Wavelet coefficients are then obtained by processing the signal to be studied using the child wavelets. Wavelet transforms can be either continuous (CWT) or discrete (DWT). While DWTs employ a certain subset of scale and translation values, CWTs function across all potential scales and translations. 3

The Continuous Wavelet Transform (CWT) of an input signal x(t) is defined as: 1 Wψ (s, k) = √ s

Z ∞

x(t)ψ ∗

−∞



t−k s

 dt

(1)

where, ψ ∗ is the complex conjugate. The components in Wψ (s, k) are referred to as wavelet coefficients, and each one is linked to a frequency scale and a time domain point ([13]). The Discrete Wavelet Transform (DWT) discretizes these parameters using (s = 2j , k = 2j n): ∞ X  1 Wψ [j, n] = √ x[tm ]ψ 2−j tm − n dt j 2 m=−∞

(2)

Here, the integers j, n control the dilation and translation respectively. However, in practical implementations, the true Discrete Wavelet Transform (DWT) does not rely on integration but rather uses filter banks for signal decomposition. The filters can be interpreted as the wavelet functions at different scales as explained in the next section. In this way, a wavelet transform breaks a signal into different frequency components while preserving temporal information. Unlike the Fourier transform, which gives us information in the frequency domain, the wavelet transform also tells us when in time a signal with a given frequency occurs through the time-shifting property. The Fourier transform offers a global perspective by converting the entire signal into its frequency spectrum, meaning that localized frequency variations become part of a broad, overall representation. To account for this limitation, a window based Fourier Transform or the more generalized Short-Time Fourier Transform (STFT) was introduced. The STFT applies a window function of fixed length to the signal, computing the Fourier transform within each window. By shifting this window across the signal, the STFT also provides a time-frequency representation. However, this approach introduces two drawbacks: Firstly, the fixed window size may not be optimal for capturing both short-duration and long-duration signal features. If a signal contains feature variations that are either much smaller or much larger than the window, important details can be lost or misrepresented. Secondly, the time resolution is same for high and low frequencies. Wavelet Transform overcomes these limitations by using the window that is scaled in both time and frequency as we can stretch or compress the wavelet to analyze different frequency features with varying resolution. This adaptability makes wavelets particularly useful for detecting changes, anomalies, and patterns across different time scales. 2.2

Discrete Wavelet Transform

The Discrete Wavelet Transform (DWT) ([14]) decomposes a discrete time series into approximate and detailed coefficients using a series of high-pass and low-pass filters, followed by downsampling. This process is recursively applied to the approximate coefficients, generating a multiscale representation, where each level corresponds to a different resolution of the original signal. High-pass and low-pass filters correspond to a wavelet function ψ(t) = √1 ψ( t−k ) and a scaling function ϕ(t) = √1 ϕ( t−k ), respectively, which collectively form an orthogonal basis ([15]). s s s s The low-pass and high-pass filter coefficients depend on the choice of the basis function. The Haar Wavelet ([16]) and the Daubechies Wavelet ([17]) are the commonly used wavelets. The Haar Wavelet is the simplest and is defined using:   1, 0 ≤ t < 21 ,  1, 0 ≤ t < 1, ϕ(t) = where ϕ(t) is the scaling function for low-pass filter and ψ(t) = −1, 12 ≤ t < 1, where  0, otherwise 0, otherwise ψ(t) is the wavelet function for the high-pass filter. For a single-level decomposition, the input signal x[n] is passed through a high-pass and a low-pass filter, represented by g[n] and h[n] respectively, followed by a downsampling operation. Filtering is performed using convolution as: yl [n] = (x ∗ h) ↓ 2 =

=

∞ X

! x[k]h[n − k]

k=−∞ ∞ X

x[k]h[2n − k]

k=−∞

4

↓2

(3)

yh [n] = (x ∗ g) ↓ 2 =

=

∞ X

! x[k]g[n − k]

↓2

k=−∞ ∞ X

x[k]g[2n − k]

(4)

k=−∞

where (∗) represents a convolution operation and (↓ 2) represents downsampling by a factor of 2: y[n] = x[2n]. In other words, every sample index which is a multiple of 2 is retained and others are discarded. Similarly, for the j th level, the signal is split into a new set of approximation and detail coefficients using approximation coefficient from the previous level. ylj+1 [n] = (ylj ∗ h) ↓ 2

(5)

yhj+1 [n] = (ylj ∗ g) ↓ 2

(6) The frequency resolution increases as the number of levels increases, while the time resolution decreases due to downsampling. Inverse DWT: The original signal can also be reconstructed from the approximate and detailed coefficients at every level. The approximation and detail coefficients (yl , yh ) are first upsampled by a factor of 2, then passed through the synthesis high-pass and low-pass filters denoted as g’[n] and h’[n] respectively. The synthesis filters are often derived from the filters used in forward DWT, but their exact form depends on the wavelet family being used. In some wavelet transforms, they may be identical to the orginal filters (e.g., Haar wavelet), while in others, they may be modified versions, often involving time-reversal or scaling. A single-level reconstruction, given we have (yl , yh ) from a single-level forward DWT using Equations (3) and (4) can be written as: x[n] = (yl [n] ↑ 2) ∗ h′ + (yh [n] ↑ 2) ∗ g ′ where (↑ 2) represents an upsampling operation (insertion of zeros between samples), and is defined as:  x[n/2], n even y[n] = 0, n odd

(7)

(8)

Expanding the convolutions, the reconstruction equation becomes:

x[n] =

∞ X

yl [k]h′ [n − 2k] +

k=−∞

∞ X

yh [k]g ′ [n − 2k]

(9)

k=−∞

Similarly, for multi-level reconstruction, at the jth level, the process iterates as: ylj [n] = (ylj+1 ↑ 2) ∗ h′ + (yhj+1 ↑ 2) ∗ g ′

(10)

until we reach the first level where we get x[n]. 2.3

Autoencoders for Anomaly Detection

Finding data points or patterns that substantially differ from the majority of samples is known as time series anomaly detection. These irregularities may be signs of fraud, cybersecurity risks, system malfunctions, or other odd events. These anomalies could be point anomalies, in which one observation deviates significantly from the expected value; contextual anomalies, in which a value may be normal in one context but abnormal in another; or collective anomalies, in which a collection of values exhibits an unexpected pattern. A neural network that can be used for such unsupervised learning tasks is an Autoencoder. An autoencoder consists of two main components: an encoder (E) that maps the input data in to a lower-dimensional latent representation and a decoder (D), which reconstructs the original input from the latent representation. Given an input sequence x(i) ∈ RN , 5

where N is the sequence length, the encoder compresses it into a latent representation z (i) of lower dimensionality d, where d ≪ N : z (i) = Eθ (x(i) ), z (i) ∈ Rd , d ≪ N

(11)

The decoder reconstructs the input from this latent space representation: x̂(i) = Dθ (z (i) )

(12)

Eθ and Dθ represents the Encoder and Decoder networks respectively, parameterized by θ and x̂(i) is the reconstructed version of the input. The reconstruction error measures the difference between the original input (x) and its reconstruction (x̂). A common metric used for this is the Mean Squared Error (MSE), computed as: N

L(x(i) , x̂(i) ) =

1 X (xi+j−1 − x̂i+j−1 )2 N j=1

(13)

where L(x(i) , x̂(i) ) represents the reconstruction loss for the input x(i) . Because autoencoders encode and decode the input data, they can learn an internal representation of normal patterns in a dataset. When encountering new data that significantly deviates from these learned patterns, the reconstruction process may fail, leading to a noticeable increase in the reconstruction error. This property makes autoencoders particularly useful for anomaly detection in time series datasets. The objective of training an Autoencoder is to minimize the reconstruction loss, ensuring that the reconstructed output x̂(i) is as close as possible to the original input x(i) . After the training phase, the autoencoder can be used to detect anomalies in new time series data by analyzing its reconstruction error. If an input sample follows the learned normal patterns, the autoencoder can accurately reconstruct it, leading to a low reconstruction error. If an input sample significantly deviates from normal patterns such as an unexpected spike, missing values, or an unusual trend the autoencoder struggles to reconstruct it accurately, resulting in a high reconstruction error. A threshold can be set on the reconstruction error to classify time series data points as normal or anomalous.

3

Problem Formulation

We formulate the task of UTSAD via reconstruction method as follows: consider a univariate time series sequence x = {x1 , x2 ...xN } where xi represents the observed value at time t. Since time series data exhibit temporal dependencies, we segment the time series into overlapping sliding windows of length W such that each window is defined as x(i) = {xi , xi+1 , ..., xi+W −1 }, i = 1, 2, ...N − W + 1. Each window x(i) is passed through an autoencoder model fθ where θ represents the learnable parameters of the model according to Equations (11) and (12). Anomalies are detected by comparing the reconstruction error given by Equation (13) to a predefined threshold τ : x(i) is an anomaly if L(x(i) , x̂(i) ) > τ ([18]).

4

Design Methodology

Figure 2 provides a high-level illustration of the proposed method. The framework consists of several key components: ❶ A Wavelet Block which decomposes the time series into multiple frequency components. ❷ An Autoencoder Network which learns the underlying features of signal and its decomposed components. ❸ A Reconstructor Block which is responsible for reconstructing the signal from the learned representations. This process is repeated across multiple levels or scales to capture both fine and coarse details. ❹ An Anomaly Detection Block which evaluates the reconstructed signal using the mean-squared error (MSE) and determines whether the input sequence is anomalous or normal. The following sections describe each component in detail. 4.1

Wavelet Decomposition Block

The input time series x[n] represented by x is decomposed into low and high-frequency components using the Wavelet Block of Figure 2. h represents h[n] and g represents g[n] for the low-pass and high-pass filter respectively (refer to section 2.2). The input signal x is passed through low-pass filter and high-pass filter separately, each followed by a downsampling operation (↓ 2). The outputs for the first level are yh1 and yl1 which are the detailed and approximation 6

Figure 2: Overall architecture of LMSAE. It consists of 4 components: Wavelet Block, Autoencoder Network, Reconstructor Block and an Anomaly Detection Block

coefficients for level-1. The approximation output yl1 is next used as input to decompose into level-2 coefficients and so on until the last level is reached. Here, L=3 and the direction of decomposition is shown in the figure. At each level, the length of the output coefficients is halved due to the downsampling operation. At the last level, the length of the coefficients will be 2WL . The final output coefficients of interest are (yl3 ,yh3 , yh2 , yh1 ). These are used as inputs to a multi-level autoencoder network so that hierarchical patterns from fine to coarse scales are captured, as it was motivated in Figure 1(g). 4.2

Multi-Scale Autoencoder Network

At each level k, the high-frequency component yhk is passed through a level-specific or scale-specific autoencoder Encoder

Decoder

AEk consisting of an encoder-decoder pair: yhk −−−−−→ z k −−−−−→ ŷhk where z k is the latent space encoding of yhk and ŷhk is the output of the decoder or the reconstructed high-frequency part. The low-frequency part ylk is used for decomposition at the next level, except the last level, where it is also passed through an autoencoder AEL . This is done so that we can get the last level decoded (l, h) pairs, which can be used by the reconstruction module for the application of inverse DWT. The reason for not passing intermediate approximation coefficients through the autoencoder is because the final approximation coefficient yl3 already contains all low-frequency information from previous levels, making intermediate approximations (yl1 , yl2 ) redundant. Additionally, introducing more autoencoder instances would expand the parameter space, which we aim to keep constrained. In this way anomalies that exist at different temporal resolutions can be captured at appropriate scales while keeping the model lightweight. 7

The encoder (Eθ ) consists of three 1D Convolutional Layers each followed by batch normalization, LeakyReLU activation, and dropout, progressively reducing the sequence length while increasing feature dimensions (refer to Fig 2). We employ 1D-CNNs within the encoder-decoder architecture due to their strong ability to capture local temporal patterns in time-series data. Unlike 2D-CNNs used for image analysis, 1D-CNNs apply convolutional filters across the temporal axis of the input signal, making them well-suited for sequential data. Additionally, compared to RNNs or (m) LSTMs, 1D-CNNs are computationally efficient and parallelizable. Formally, given an input feature map xin at layer m each convolutional layer transforms it as: (m+1)

xout

  (m) = Dropout LeakyReLU BNorm(W (m) ∗ xin + b(m) )

where W (m) and b(m) are the convolutional kernel weights and biases at layer m. After M convolutional layers, the final output xM out is flattened and passed through a fully connected layer: (M )

z = Wp · Flatten(xout + bp ) where Wp and bp are the weights and bias of the projection layer. The decoder (Dθ ) mirrors the encoder to reconstruct the time series from the latent representation. It has a fully connected layer that expands the latent vector back to a structured representation and uses three 1D Transposed Convolutional Layers which progressively upsample the feature maps, restoring the original sequence length. To accommodate the varying temporal resolutions, four distinct encoder-decoder pairs of the same architecture are created, each tailored to one of the four outputs from the wavelet block (yl3 ,yh3 , yh2 , yh1 ). The input sequence length for each encoder-decoder pair is carefully adjusted to match the scale of the wavelet components they process. The first encoder-decoder pair, responsible for yh1 operates on an input sequence of length W 2 . Similarly, at the coarsest level, the encoder-decoder pair for (yh3 , yl3 ) operates on an input sequence of length W . Finally, the 4 inputs and outputs of the 3 2 autoencoders are retained to be fed into an anomaly detection module before going through the reconstruction module. As shown in Figure 1(a), using a standard autoencoder directly on the raw time series, without multi-scale decomposition, failed to detect subtle anomalies. The simple AE in that figure received only the original time-series input and reconstructed it at a single scale. Since it lacked frequency separation or hierarchical feature learning, the subtle deviation was not captured, resulting in a low reconstruction error. This limitation motivated our design of a scale-aware architecture which takes information from distinct frequency bands into account. 4.3

Reconstruction Block

The reconstruction module applies the inverse DWT (refer to section 2.2) starting from the last level to reconstruct the input as follows: The last level’s (ŷlL , ŷhL ) decoded components are used by the reconstruction module to get the low-frequency part generated by the previous level: ŷlL−1 = IDW T (ŷlL , ŷhL ) where IDWT is defined using Equation (9). Since we already have ŷhk for all k levels, this process is repeated iteratively until reaching level 1, where we obtain the final reconstructed signal: x̂ = IDW T (ŷl1 , ŷh1 ). 4.4

Anomaly Detection Module

In a standard autoencoder, anomaly detection ([18]) is typically performed by computing the L2-Norm between the original and reconstructed signal (x, x̂) as per Equation (13). However, since our approach operates at multiple scales, we compute reconstruction errors at each level to capture anomalies across different frequency bands. Specifically, the high-frequency reconstruction error at each level k: Lkh = ||yhk − ŷhk ||2

(14)

The low-frequency reconstruction error at the final level L is given by, L L LL l = ||yl − ŷl ||2

(15)

The total anomaly score is then determined as a weighted sum of these errors, incorporating both multi-scale highfrequency errors and the final low-frequency error, along with the weighted reconstruction error of the original signal: 8

Ltotal = β||x − x̂||2 +

L X

λk Lkh + γLL l

(16)

k=1

where β,λ and γ are the weights for different scales. Utilizing this multi-scale reconstruction error ensures that anomalies across all scales are accounted for in the detection process through a weighted sum. While some anomalies like abrupt spikes, may only show up at high frequencies, others, such as long-term drifts, may show up at low frequencies. By aggregating the reconstruction errors across multiple scales, even subtle anomalies that significantly affect only a single scale will yield a large error in that term. When summed, this leads to a more prominent total anomaly score, enhancing the model’s ability to detect subtle or localized anomalies. Furthermore, potential false positives arising from noise in specific frequency bands can be mitigated by appropriately adjusting the weights λk and γ. Finally, the anomaly score from Equation (16) is computed for each window of the time series. This score across the window is compared against a threshold τ and if it exceeds τ the window is flagged as anomalous. Notably,Ltotal is not only used as an anomaly scoring function but is also employed as the loss function during training. This design choice ensures that the autoencoder is explicitly optimized to reduce reconstruction discrepancies across multiple wavelet subbands, thereby aligning the training objective with the detection criterion.

5

Experimental Settings

5.1

Datasets

5.1.1

Numenta Anomaly Benchmark Dataset

NAB is a benchmark for detecting anomalies in streaming real-time applications ([10]). It consists of 58 timeseries data with identified abnormal periods of behavior from both artificial and real-world sources including traffic data, AWS server metrics, Twitter volume, and metrics related to advertisement clicking. The datasets used for our experiments belong to the category for which the causes of the anomalies are known without any hand labeling ([6]). These include: • NYC Taxi: Represents a time series for the number of NYC taxi passengers. There are five anomalies that occur during the NYC marathon, Thanksgiving, Christmas, New Years day, and a snow storm. • Ambient Temperature: The ambient temperature in an office. • CPU Utilization: Captures CPU utilization data from Amazon Web Services (AWS). • EC2 Request Latency: Contains CPU usage data from a server in AWS’s East Coast data center. • Machine Temperature: Monitors the internal temperature of an industrial machine component. 5.1.2

Yahoo Webscope S5 Dataset

The Yahoo ([19]) dataset comprises four sub-benchmarks for anomaly detection. These are named as A1, A2, A3 and A4. These contain either real or synthetic web traffic metrics with labels. A1 Benchmark consists of real traffic data with point and collective anomalies while the other three benchmarks are synthetic in nature. We have used A1 and A2 Benchmarks for our experiments, as they are univariate datasets, whereas A3 and A4 are multivariate ([7]). 5.2

Training

The model is trained using only normal samples ([18]), such that deviations from the learned patterns (i.e., anomalies) result in higher reconstruction errors during inference. Training and testing data are divided so that, for all datasets, normal samples are used for training, while anomalous samples are reserved for testing ([6]). In case there are anomalies in the training set, we fill the anomalies with zero as done by ([9]). Training is carried out setting a learning rate of 10−3 , Adam as optimizer, and a weight decay of 10−6 . These are selected on the basis of preliminary experiments for stable convergence and improved generalization. Haar wavelet function (with L = 3) is used throughout the experiments for the wavelet block due to its simplicity and favorable trade off between higher-order representations and model complexity. The loss function is the same as defined in equation (16). A key aspect of training is tuning the loss function parameters in the final objective function, Ltotal . These parameters regulate the weighting of data from various frequency levels in the loss computation. Proper tuning is essential to guarantee that the model captures both local changes and long-term dependencies since wavelet decomposition yields both low-frequency (trend-related) and high-frequency (detail-related) components. Depending on the distinct time series properties of each dataset, different weight combinations may be needed, so we train different models for each dataset’s curve within a benchmark. We have 9

conducted an extensive grid search to determine the optimal weight combinations for each dataset. All the experiments are implemented in PyTorch and conducted on a single NVIDIA RTX A6000 GPU. 5.3

Evaluation

During testing phase, data containing anomalies is used for evaluation. We use Precision, Recall and F1-Score as evaluation metrics: TP TP 2×P ×R P = ,R = ,F1 = TP + FP TP + FN P +R where P is the precision, R is the recall, F1 is the F1-Score, TP is true positive (correctly detected anomalies), FP is false positive (normal points mistakenly classified as anomalies) and FN is false negative (anomalies that were not detected). However, in real-world anomaly detection, the goal is not just to pinpoint the exact moment an anomaly occurs but rather to identify a broader window of anomalous activity where an alert can be triggered. This aligns with practical scenarios where timely detection is more critical than pinpoint accuracy. To address this we have used the adjustments from ([6]) following ([20]) which essentially says that the entire anomaly segment will be regarded as anomalous even if one point in the segment is flagged as an anomaly. Since our method utilizes overlapping sliding windows for anomaly detection, a single anomaly point may appear in multiple windows as they shift over time and without proper adjustment, this could lead to an inflated false positive rate. The threshold τ for anomaly detection is manually chosen by evaluating the F1 score over a predefined range of thresholds and selecting the one that produces the highest F1 score. We further report the latency and power consumption of the proposed method on an edge-AI platform NVIDIA Jetson Nano ([21]) to reflect the ease of deployment of the model on edge devices.

6

Results and Analysis

6.1

Quantitative Results

Table 1: Performance comparison on Yahoo and NAB datasets. NT - NYC Taxi, ER - EC2 Request, CU - CPU Utilisation, AT - Ambient Temperature, MT - Machine Temperature Metrics

F1-Score

Recall

Precision

Yahoo

Method

NAB (realKnownCause)

A1

A2

NT

ER

CU

AT

MT

LMSAE

0.942

0.986

0.953

0.998

0.975

1.0

0.600

LSTM-VAE

0.919

0.644

0.570

0.994

0.691

1.0

0.748

TADGAN

0.618

0.803

0.750

1.0

0.500

0.667

-

FCVAE

0.791

0.895

0.860

1.0

0.827

0.667

0.2

LMSAE

0.934

1.0

1.0

1.0

1.0

1.0

1.0

LSTM-VAE

0.980

1.0

0.4

1.0

1.0

1.0

1.0

TADGAN

0.606

0.925

0.600

1.0

1.0

1.0

-

FCVAE

0.975

0.9872

0.800

1.0

1.0

0.500

1.0

LMSAE

0.970

0.979

0.911

0.996

0.951

1.0

0.426

LSTM-VAE

0.915

0.492

1.0

0.989

0.528

1.0

0.598

TADGAN

0.716

0.760

1.0

1.0

0.330

0.5

-

FCVAE

0.784

0.867

0.932

1.0

0.705

1.0

0.12

Table 1 presents the performance comparison of our method with the baseline models. LMSAE achieves the highest F1 Score on the Yahoo Benchmark and outperforms the latest competitor by 19% and 10% for the A1 and A2 Benchmark, respectively. For the NAB Benchmark, LMSAE outperforms NT by 10.8%, CU by 17.89%, AT by 50%. For ER, the F1 Score remains competitive, closely matching the best-performing models. This demonstrates that our lightweight model can effectively detect anomalies while competing with more parameter-intensive approaches. 10

Table 2: Window Length settings for different methods Method Window Length (W) Dataset LMSAE

64

All datasets

VAE-LSTM

168

Yahoo

168

NT

192

ER

144

CU

168

AT

288

MT

FCVAE

48

All datasets

TADGAN

100

All datasets

Although VAE-LSTM ([6]) has good recall across most datasets, it relies on a significantly larger window length than our model. Table 2 lists the window length values for all datasets and methods, highlighting that VAE-LSTM consistently uses larger windows. This is due to its hybrid architecture, where the VAE model is trained on overlapping sliding windows of length p, and the LSTM model processes a non-overlapping sequence of length k from the VAE embeddings. During the evaluation, the model analyzes a test sequence spanning p×k readings, leading to an effectively larger window size than ours. TADGAN ([8]) also uses a considerably larger window size to detect anomalies. FCVAE ([9]) takes a single-model approach, where one model is trained for all dataset curves within a benchmark. While this strategy offers generalizability, it may struggle to capture dataset-specific variations effectively. In contrast, we train separate models for each dataset curve, allowing us to fine-tune the weights (β, λ, γ) based on the unique characteristics and patterns of each dataset. 6.2

Qualitative Results

The anomaly scores produced by different detection techniques on NYC Taxi Dataset (NAB Benchmark) are displayed in Figure 3. It is clear that most of the baseline approaches produce very smooth or ambiguous anomaly scores for the anomaly section outlined within the green box, making it challenging to discern abnormal behavior from normal fluctuations. FCVAE, utilizing FFT and attention mechanisms to integrate both global and local frequency features, may miss subtle, transient anomalies, particularly those that only affect the most recent time point, due to its dependence on globally averaged frequency representations. In contrast, our method produces a sharp and well-localized spike in the anomaly score, indicating its ability to detect even subtle anomalies. This improved sensitivity can be attributed to the effective weighting of time and frequency domain features, allowing the model to better discriminate between minor deviations and normal variability. In A2 Benchmark, there is random seasonality, trend, and noise present in the time series curves, which makes it difficult to flag an anomaly against a threshold as the anomaly scores are affected by it. One of the example from A2Benchmark is shown in Figure 4. Our model is able to perform the best on A2 Benchmark because we can choose to use the weight values of the detail coefficients only, since the trend part of the signal primarily resides in the original and approximation part. By setting β and γ to zero, we pay attention to the high frequency details only, which suppresses low-frequency trends and enhances sensitivity to abrupt changes given by the detail coefficients. The anomaly score for the anomalous windows for our model is different from the anomaly score of normal samples which is not that easy to distinguish from other methods and hence leads to missing the true anomalies. 6.3

Latency and Power Consumption on NVIDIA Jetson Nano

To evaluate the suitability of our proposed model for resource-constrained environments, we conducted experiments on the NVIDIA Jetson Nano, a low-power, edge AI platform designed for running machine learning models ondevice. It combines low-power GPUs with ARM-based CPUs in a compact form factor, offering a highly efficient performance-to-energy ratio ideal for edge AI applications. The configuration details of the platform are given in Table 3. We used NVIDIA TensorRT, a C++ library that enables efficient and accelerated inference on NVIDIA GPUs. It takes a trained model, defined by its architecture and learned weights, and converts it into a runtime optimized engine. 11

Time Series

Anomaly Score

Anomaly

(a)

(b)

Figure 3: (a) represents the time series input (test data) and (b) represents Anomaly Scores of different methods for NYC Taxi (NT) of NAB Benchmark. The green box shows the anomaly under consideration. Table 3: Jetson Nano Platform Configuration Parameter Type/Value CPU

ARM Cortex-A57

#CPU Cores

4

CPU Frequency (Max)

1.43GHz

GPU

NVIDIA Maxwell Architecture

#CUDA Cores

128

GPU Frequency (Max)

921MHz

RAM

4GB 64-bit LPDDR4

Power

5W-10W

To maximize performance, TensorRT applies techniques like layer fusion, graph optimizations, and selects the most efficient kernel implementations from its library of optimized operations ([22]). 6.3.1

Runtime Latency Results

Figure 5 presents the latency measurements of different methods. The reported latency includes the time taken for host-to-device (H2D) input data transfers, device-to-host (D2H) output data transfers, and the GPU computation time. It is averaged for 10 inferences. From the figure, it is evident that our proposed model exhibits the lowest maximum 12

Anomaly Detected Windows

Time Series Anomaly Score

(a)

(b)

Figure 4: Anomaly Scores of different methods for a curve of A2 Benchmark. (a) shows the time series test data and (b) shows the Anomaly Scores with detected windows highlighted.

Maximum

Average

48 56.

60 Latency (ms)

Minimum

64 7 45. 44.7

50 40 30 20 10 0

06

6

.57

29 12.

13. 8 1 1.2 1.2

4 9 2.6 2.2

7 5 1.1 0.8

TM GAN -LS TAD VAE Benchmarks

Figure 5: Inference latency

13

AE FCV

TADGAN

VAE-LSTM

FCVAE

GPU Power (mW)

Max: 3739 Max: 2991

00

30

Max: 2243

00

20

Max: 1734

00

10

0

0

10

20 30 40 Time (seconds)

50

60

Figure 6: Power consumption latency among the other methods. In contrast, FCVAE has the highest latency (max, min and average), primarily due to its larger parameter space and associated computational complexity. Although TADGAN and VAE-LSTM achieve somewhat competitive minimum latencies, their maximum latencies remain significantly higher than ours, indicating they are less stable under different loads. 6.3.2

Runtime Power Consumption Results

For power consumption, there are three sensors which are located at the power input of the board, CPU and GPU. These sensors can be read to monitor power consumption. Figure 6 shows the GPU power consumption. The peak power consumed during inference is the least for our model. FCVAE, while already showing high latency, also shows the highest power peaks, suggesting that it is computationally and energy inefficient compared to lighter models like ours.

7

Model Interpretation

To gain deeper insights into the behavior of our multi-scale autoencoder, we examine ❶ how our autoencoder reconstructs the input signals in the presence of anomalies and ❷ how the detection performance varies with the parameters of our multi-scale loss function given by Equation (16). 7.1

Reconstruction of the Original Signal and Frequency Components

Figures 7(b) and 7(c) provide a visual comparison of reconstruction errors for an anomalous window of the NYC Taxi dataset 7(a). The anomalous window is fed as input to our multi-scale autoencoder, which processes it through a discrete wavelet transform (DWT) block to obtain multi-resolution components: yh1 , yh2 , yh3 , and yl3 . These components are encoded and decoded to produce corresponding reconstructions: ŷh1 , ŷh2 , ŷh3 , and ŷl3 . We compare each of these reconstructed components to their ground truth DWT counterparts to assess subband-wise reconstruction accuracy and observe in which frequency band this anomaly might manifest. The final reconstructed signal x̂ is then obtained by applying the inverse wavelet transform to the decoded coefficients. To contrast the performance of our multi-scale autoencoder, we feed the same anomalous window to a simple autoencoder without multi-scale view. Unlike a simple autoencoder that estimates x̂ in a flat fashion, the structure of LMSAE allows reconstruction errors from different subbands and resolutions to be faithfully represented in the final loss. In Figure 7(b), the standard autoencoder, which lacks a multi-scale perspective, generates a reconstructed signal that closely mirrors the original signal (MSE of 0.06), despite the presence of an anomaly. The reconstruction error which is the difference between the original signal and its reconstruction, is notably small. This poses a significant challenge for anomaly detection: ❶ Subtle Errors: A small reconstruction error implies that the autoencoder struggles to differentiate anomalous features from normal patterns.❷ Detection Difficulty: With such minimal deviation, distinguishing the anomalous window from typical data becomes nearly impossible, as the error is too subtle to trigger detection thresholds. ❸ Practical Impact: In real-world scenarios, this can result in missed anomalies, undermining the reliability of systems dependent on accurate flagging, such as fault detection or security monitoring. 14

(a)

Anomalous Window

(b)

Anomalous Window

(c)

Figure 7: (a) represents the input time series with the purple box highlighting the anomalous window. (b) shows the reconstruction comparison between an autoencoder lacking multi-scale view and (c) shows the same for our proposed multi-scale autoencoder LMSAE. Blue solid lines represent original series whereas red dashed lines represent reconstructed part.

Conversely, Figure 7(c) showcases the multi-scale autoencoder’s superior performance. This approach reveals a larger reconstruction error, particularly evident in the coarse-level component (yl3 ), which represents the signal’s low-frequency, overall structure. Following key insights can be derived: ❶ Enhanced Sensitivity: The pronounced error in yl3 (MSE of 5.975) indicates our multi-scale autoencoder’s ability to detect significant deviations caused by the anomaly, especially those affecting the signal’s broader trends for this example. ❷ Anomaly Amplification: Unlike the standard autoencoder, the multi-scale method amplifies the anomaly’s presence, with a difference of 0.75 between the original signal (x) and reconstructed signal (x′ ) which is much greater than 0.06 for the simple autoencoder ❸ Threshold Simplicity: This larger error facilitates setting a clear detection threshold. Simply observing the pair (x, x′ ) can suffice to flag anomalies in this case, streamlining the detection process. We further analyze how anomalies manifest across different high frequency sub-bands using controlled synthetic anomalies from the A2 Benchmark. Figures 8(a) and 8(b) show subband-wise reconstruction results for two distinct synthetic signals for three consecutive anomalous regions. In Figure 8(a), the reconstruction errors are concentrated in the third level high-frequency component (yh3 ), where the model exhibits a notable mismatch between the true and reconstructed coefficients (MSE = 1.46), while the errors in the first and second levels are relatively small. This suggests that the anomaly primarily distorts the coarse-scale high frequency features, predominantly in the lower-resolution band. In contrast, Figure 8(b) displays significant reconstruction errors across all three high-frequency bands (yh1 , yh2 , and yh3 ), with MSEs exceeding 6.0 in each. This indicates that the anomaly affects both fine-grained details and global structure, producing high-frequency spikes and broader disruptions. Notably, the reconstructed coefficients (red dashed line) fail to match the sharp transitions present in the original components (blue solid line), confirming that the anomaly 15

(b)

(a)

Figure 8: Sub-band reconstruction comparisons for two different synthetic anomalous signals from the A2 benchmark using our multi-scale autoencoder LMSAE. The plots at the top represent the input time series with an anomaly segment highlighted in the purple box. Blue solid lines represent original series whereas red dashed lines represent reconstructed part.

is detectable at all resolutions. Both of these examples are also consistent with the weighting strategy described in Section 6.2 for Figure 4, where only the λi terms were emphasized while the coefficients β and γ were set to zero. The hierarchical design of LMSAE, thus, excels at capturing both fine details and structural changes, making it particularly adept at highlighting anomalies that manifest in the different frequency components of the signal. 7.2

Sensitivity Analysis

In this section, we study the sensitivity of our model to the weight parameters β, λi , γ given in Equation (16) during training and testing. We vary each parameter from 0.1 to 3 with a step size of 0.1 while keeping others fixed and plot the F1-Score for each parameter value. We do this for datasets from NAB Benchmark (NT,CU,AT,MT). Figure 9 shows the variation of F1-Score with these parameters for the NYC Taxi dataset. The model appears to be most sensitive to the weights associated with Level 1 (λ1 ) and Level 2 (λ2 ) detail coefficients, indicating that these parameters should be tuned more carefully than others. Additionally, while β shows notable fluctuations up to approximately β = 1.4, its influence stabilizes afterward, with a slight drop toward the higher end of the range. The sensitivity of the model differs across datasets. Figure 10 and 12 shows the plots for CPU Utilization dataset and Ambient Temperature dataset respectively. For CU, we can observe that the model is mostly sensitive to γ and λi ’s. This means that choosing parameters for these can greatly affect our detection performance. This finding supports the idea that subtle anomalies can manifest in multiple frequency bands and cannot be effectively detected if the focus is placed solely on reconstructing the original 16

1.0

1.0

0.5

0.8

1.0

1

1.0

F1 Score

F1 Score

2

1.0

0.8

1.0

2

0.5

1.0

3

1.0

3

0.5

0.8

1.0

1.0

0.8 0.0

1

0.5

0.8

0.5 0.5

1.0

1.5 2.0 Parameter

2.5

3.0

0.0

Figure 9: Sensitivity of F1-Score for given parameters for NYC Taxi (NT) dataset.

0.5

1.0

1.5 2.0 Parameter

2.5

3.0

Figure 10: Sensitivity of F1-Score for given parameters for CPU Utilization (CU) dataset.

signal (via β). For Ambient Temperature dataset, the model is more sensitive to the weights of the detail coefficients, while β and γ exhibit regions where the model performance remains relatively stable. An interesting observation can be made for MT dataset, as shown in Figure 11. There is a very prominent anomaly around the index 4000 which can be easily detected by a human observer. Although there is no anomaly between index 2000 − 3000, LMSAE still highlights it as an anomaly (refer to Anomaly Score in Fig 11) as it might be a good idea for an observer to pay attention to this dip in machine temperature which can potentially signal a fault. This is also the reason for the F1 score to be lower for this dataset compared to other datasets, as there are some peaks that can potentially be alarming and contribute to false positives. This is also reflected in the sensitivity analysis plot in Figure 13. The plot shows minimal variation of F1-Score across all weight parameters. This indicates that the model performance is relatively robust to changes in weights, suggesting that the anomalies in this data set are more prominent and easily distinguishable. Sensitivity analysis for these datasets thus shows the effectiveness of using a multilevel loss function which integrates reconstruction errors across multiple wavelet levels to capture both coarse and fine grained anomalies. The variation in sensitivity across different datasets highlights that anomalies manifest differently depending on the underlying signal characteristics. This underlines the necessity of tuning the wavelet-level weights in a dataset-specific manner rather than relying on a fixed configuration for the entire benchmark.

8

Related Work

Recent advances in deep learning have led to a variety of methods for univariate time series anomaly detection (UTSAD), particularly in unsupervised settings. These methods can generally be categorized into two groups: ❶ forecasting-based approaches that detect anomalies by comparing predicted and actual values and ❷ reconstruction-based approaches that learn normal patterns and detect deviations during reconstruction. Table 1 provides a summary of representative deep learning models across these categories. Details about these methods are presented in the following sections. 17

Time Series Anomaly

Anomaly Score Detected Windows

Value

0 10

Anomaly Score

20

10 5 0 0

1000

2000

3000

4000

Index

5000

6000

7000

Figure 11: Machine temperature dataset with anomaly score produced by LMSAE. 1.0

1.0

0.5 0.5 1.0

1.0

1

0.5

1

1.0

F1 Score

F1 Score

0.5

2 0.5

1.0

2

0.5

1.0

1.0

3

0.5

3 0.5

1.0

1.0

0.5 0.5 0.0

0.5

1.0

1.5 2.0 Parameter

2.5

3.0

0.0

Figure 12: Sensitivity of F1-Score for given parameters for Ambient Temperature (AT) dataset. 8.1

0.5

1.0

1.5 2.0 Parameter

2.5

3.0

Figure 13: Sensitivity of F1-Score for given parameters for Machine Temperature (MT) dataset.

Forecasting-based Methods

The initial wave of deep learning approaches for UTSAD primarily focused on forecasting-based methods. These models learned to predict future values from historical observations, with anomalies identified as points where prediction errors exceeded a threshold. These were based on RNNs, LSTMs, CNNs/TCNs and Transformers. LSTM-AD ([23]) 18

Table 4: Summary of unsupervised deep learning methods for UTSAD. (AE: Autoencoders, VAE: Variational Autoencoders, GAN: Generative Adversarial Network) Methods

Year Method Type

Architectural Architectural Frequency Edge Backbone Features Features Inference

LSTM-AD ([23])

2015 Forecasting

RNN, LSTM %

%

%

LSTM-RNN ([24]) 2016 Forecasting

RNN, LSTM %

%

%

DeepANT ([25])

2018 Forecasting

CNN

%

%

%

SR-CNN ([26])

2019 Forecasting

CNN

%

"(DFT)

%

VAE ([27])

2015 Reconstruction VAE

%

%

%

EncDec-AD ([5])

2016 Reconstruction AE

LSTM

%

%

Donut ([28])

2018 Reconstruction VAE

%

%

%

CVAE ([7])

2020 Reconstruction VAE

CNN

%

%

VAE-LSTM ([6]) 2020 Reconstruction VAE

LSTM

%

%

TAnoGAN ([29])

2020 Reconstruction GAN

LSTM

%

%

TADGAN ([8])

2020 Reconstruction GAN

LSTM, RNN

%

%

FCVAE ([9])

2024 Reconstruction VAE

%

"(DFT)

%

LMSAE (Ours)

2025 Reconstruction AE

CNN

"(DWT)

"

utilized hierarchical recurrent layers with LSTM units to model temporal dependencies without requiring labeled data. This approach proved effective for unsupervised anomaly detection, especially in capturing long-range patterns. Building on this foundation, subsequent work such as ([24]) introduced a simplified LSTM-RNN model that reduced architectural complexity while maintaining reliable performance, particularly for a sequence of anomalies. As the field evolved, convolutional architectures gained traction due to their computational efficiency and suitability for parallelization. DeepANT ([25]) proposed a fully CNN-based architecture that eliminated recurrent layers, instead emphasizing on local temporal features. SR-CNN ([26]) incorporated frequency domain information via DFT before applying convolutional layers, aiming to enhance pattern recognition across time and frequency. However, real-world time series data, such as IoT sensor readings, stock prices, or weather data, often exhibit sudden shifts or unknown influences that can disrupt predictable patterns. As a result, these models tend to generate increasing prediction errors over time, reducing their reliability for long-term anomaly detection ([18]). These limitations motivated a shift toward reconstruction-based approaches, which rely on modeling normal behavior and identifying deviations in the reconstructed signal, independent of future prediction. Hence, our focus will be on the more modern reconstruction-based approaches. 8.2

Reconstruction-based Methods

These methods learn to reconstruct normal time series patterns and detect anomalies based on deviations from expected behavior. Models based on Autoencoders (AE), Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs) have been used for reconstruction-based anomaly detection. EncDec-AD ([5]) demonstrated that training on normal time series alone could enable reliable anomaly detection via reconstruction error. This approach paved the way for more sophisticated architectures that combined probabilistic modeling with deep learning. VAE-based methods ([27, 7, 6]) model latent uncertainty and variability using stochastic sampling, but this introduces additional computational overhead due to the need for sampling and KL divergence regularization during both training and inference. Hybrid models such as VAE-LSTM ([6]) integrated VAEs with LSTM layers, extracting local representations through the VAE and modeling long-term dependencies with LSTMs. Simultaneously, Generative Adversarial Networks (GANs) gained traction for generating realistic reconstructions. TanoGAN ([29]) extended the GAN framework to time series by incorporating LSTM-based generators and demonstrated improved anomaly detection via adversarial training. Similarly, TadGAN ([8]) employed LSTM-based architectures for both generator and critic networks, effectively capturing temporal dynamics in an unsupervised setting. GAN-based models are often difficult to train stably and demand higher compute due to repeated forward-backward passes through both networks, making them poorly suited to energy-limited edge settings ([30]). Moreover, as already highlighted in Section 1, subtle anomalies 19

still remain undetected by these reconstruction-based approaches. For instance, LSTMs being used along with VAE and GAN architectures, are effective at learning sequential patterns, but they often generalize over fine-grained variations due to their reliance on gating mechanisms (e.g., sigmoid and tanh functions), which compress input values into narrow activation ranges. As a result, minor deviations in the input may not sufficiently influence the hidden states, causing subtle anomalies to be overlooked. More recently, Transformers ([31]) have been explored for time series anomaly detection, offering improved modeling of long-range dependencies but at the cost of increased computational complexity. FCVAE ([9]) enhances VAEs for unsupervised anomaly detection by integrating global and local frequency features to capture periodic patterns and fine-grained trends in univariate time series. Its target attention mechanism selects key frequency components, improving short-periodic trend reconstruction. In our work, we select baseline methods which represent different styles of reconstruction based methods. We include VAE-LSTM (parameter count of 700K), FCVAE (parameter count of 1400K) and TadGAN (parameter count of 250K) - methods with different modeling styles, first two are based on probabilistic latent spaces and the third on adversarial learning. By including these diverse methods, we aim to provide a comprehensive evaluation of our proposed approach against different reconstruction strategies. In contrast, LMSAE (parameter count of 97K) focuses on autoencoder-based reconstruction due to its balance between effectiveness and efficiency. Unlike VAEs, GANs, or Transformers which introduce additional complexity through stochastic sampling, adversarial optimization, or attention mechanisms, standard autoencoders offer a lightweight alternative with a compact latent space and fewer parameters.

9

Conclusion and Future Work

We introduced LMSAE (Lightweight Wavelet AutoEncoder), a resource-efficient framework for univariate time-series anomaly detection. LMSAE effectively captures anomalies across different temporal scales without relying on deep or complex architectures by integrating multi-resolution representations from Discrete Wavelet Transform into a compact autoencoder. Our approach not only achieves competitive accuracy on benchmark datasets, but also meets the practical demands of real-world deployment, offering low latency and minimal power consumption on Jetson Nano, highlighting its suitability for real-time, energy-efficient anomaly detection in resource-constrained environments. For future work, we aim to study the use of different wavelet families and observe how the model complexity can grow due to change in the input sequence padding and edge effects introduced by other wavelets. We also aim to explore adaptive weighting strategies for weight parameters (β, λ, γ) of our loss function.

References [1] Baotong Chen, Jiafu Wan, Lei Shu, Peng Li, Mithun Mukherjee, and Boxing Yin. Smart factory of industry 4.0: Key technologies, application case, and challenges. Ieee Access, 6:6505–6519, 2017. [2] Varun Chandola, Arindam Banerjee, and Vipin Kumar. Anomaly detection: A survey. ACM computing surveys (CSUR), 41(3):1–58, 2009. [3] Alban Siffer, Pierre-Alain Fouque, Alexandre Termier, and Christine Largouet. Anomaly detection in streams with extreme value theory. In Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining, pages 1067–1075, 2017. [4] Wanpracha Art Chaovalitwongse, Ya-Ju Fan, and Rajesh C Sachdeo. On the time series k-nearest neighbor classification of abnormal brain activity. IEEE Transactions on Systems, Man, and Cybernetics-Part A: Systems and Humans, 37(6):1005–1016, 2007. [5] Pankaj Malhotra, Anusha Ramakrishnan, Gaurangi Anand, Lovekesh Vig, Puneet Agarwal, and Gautam Shroff. Lstm-based encoder-decoder for multi-sensor anomaly detection. arXiv preprint arXiv:1607.00148, 2016. [6] Shuyu Lin, Ronald Clark, Robert Birke, Sandro Schönborn, Niki Trigoni, and Stephen Roberts. Anomaly detection for time series using vae-lstm hybrid model. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 4322–4326. Ieee, 2020. [7] Milad Memarzadeh, Bryan Matthews, Ilya Avrekh, and Daniel Weckler. Unsupervised anomaly detection in high-dimensional flight data using convolutional variational auto-encoder. In 26th SIGKDD Conference on Knowledge Discovery and Data Mining, number ARC-E-DAA-TN77606, 2020. 20

[8] Alexander Geiger, Dongyu Liu, Sarah Alnegheimish, Alfredo Cuesta-Infante, and Kalyan Veeramachaneni. Tadgan: Time series anomaly detection using generative adversarial networks. In 2020 ieee international conference on big data (big data), pages 33–43. IEEE, 2020. [9] Zexin Wang, Changhua Pei, Minghua Ma, Xin Wang, Zhihan Li, Dan Pei, Saravan Rajmohan, Dongmei Zhang, Qingwei Lin, Haiming Zhang, et al. Revisiting vae for unsupervised time series anomaly detection: A frequency perspective. In Proceedings of the ACM Web Conference 2024, pages 3096–3105, 2024. [10] Alexander Lavin and Subutai Ahmad. Evaluating real-time anomaly detection algorithms–the numenta anomaly benchmark. In 2015 IEEE 14th international conference on machine learning and applications (ICMLA), pages 38–44. IEEE, 2015. [11] Pimwadee Chaovalit, Aryya Gangopadhyay, George Karabatis, and Zhiyuan Chen. Discrete wavelet transformbased time series analysis and mining. ACM Computing Surveys (CSUR), 43(2):1–37, 2011. [12] D Ravichandran, Ramesh Nimmatoori, and M Gulam Ahamad. Mathematical representations of 1d, 2d and 3d wavelet transform for image coding. Int. J. Adv. Comput. Theory Eng, 5(3):20–27, 2016. [13] RJE Merry. Wavelet theory and applications: a literature study. 2005. [14] Stephane G Mallat. A theory for multiresolution signal decomposition: the wavelet representation. IEEE transactions on pattern analysis and machine intelligence, 11(7):674–693, 2002. [15] Aobo Liang, Yan Sun, and Nadra Guizani. Waverora: Wavelet rotary route attention for multivariate time series forecasting. arXiv preprint arXiv:2410.22649, 2024. [16] Zbigniew R Struzik and Arno Siebes. The haar wavelet transform in the time series similarity paradigm. In European Conference on Principles of Data Mining and Knowledge Discovery, pages 12–22. Springer, 1999. [17] Alistair CH Rowe and Paul C Abbott. Daubechies wavelets and mathematica. Computers in Physics, 9(6):635–648, 1995. [18] Zahra Zamanzadeh Darban, Geoffrey I Webb, Shirui Pan, Charu Aggarwal, and Mahsa Salehi. Deep learning for time series anomaly detection: A survey. ACM Computing Surveys, 57(1):1–42, 2024. [19] Yahoo. Yahoo anomaly detection dataset. https://webscope.sandbox.yahoo.com/catalog.php? datatype=s, n.d. Accessed: 2025-07-05. [20] Hansheng Ren, Bixiong Xu, Yujing Wang, Chao Yi, Congrui Huang, Xiaoyu Kou, Tony Xing, Mao Yang, Jie Tong, and Qi Zhang. Time-series anomaly detection service at microsoft. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pages 3009–3017, 2019. Jetson nano developer kit. https://developer.nvidia.com/embedded/ [21] NVIDIA. jetson-nano-developer-kit, 2021. Accessed: 2025-07-05. [22] Stephan Patrick Baller, Anshul Jindal, Mohak Chadha, and Michael Gerndt. Deepedgebench: Benchmarking deep neural networks on edge devices. In 2021 IEEE International Conference on Cloud Engineering (IC2E), pages 20–30. IEEE, 2021. [23] Pankaj Malhotra, Lovekesh Vig, Gautam Shroff, Puneet Agarwal, et al. Long short term memory networks for anomaly detection in time series. In Proceedings, volume 89, page 94, 2015. [24] Loïc Bontemps, Van Loi Cao, James McDermott, and Nhien-An Le-Khac. Collective anomaly detection based on long short-term memory recurrent neural networks. In Future Data and Security Engineering: Third International Conference, FDSE 2016, Can Tho City, Vietnam, November 23-25, 2016, Proceedings 3, pages 141–152. Springer, 2016. [25] Mohsin Munir, Shoaib Ahmed Siddiqui, Andreas Dengel, and Sheraz Ahmed. Deepant: A deep learning approach for unsupervised anomaly detection in time series. Ieee Access, 7:1991–2005, 2018. [26] Hansheng Ren, Bixiong Xu, Yujing Wang, Chao Yi, Congrui Huang, Xiaoyu Kou, Tony Xing, Mao Yang, Jie Tong, and Qi Zhang. Time-series anomaly detection service at microsoft. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pages 3009–3017, 2019. [27] Jinwon An and Sungzoon Cho. Variational autoencoder based anomaly detection using reconstruction probability. Special lecture on IE, 2(1):1–18, 2015. [28] Haowen Xu, Wenxiao Chen, Nengwen Zhao, Zeyan Li, Jiahao Bu, Zhihan Li, Ying Liu, Youjian Zhao, Dan Pei, Yang Feng, et al. Unsupervised anomaly detection via variational auto-encoder for seasonal kpis in web applications. In Proceedings of the 2018 world wide web conference, pages 187–196, 2018. [29] Md Abul Bashar and Richi Nayak. Tanogan: Time series anomaly detection with generative adversarial networks. In 2020 IEEE Symposium Series on Computational Intelligence (SSCI), pages 1778–1785. IEEE, 2020. 21

[30] Pegah Salehi, Abdolah Chalechale, and Maryam Taghizadeh. Generative adversarial networks (gans): An overview of theoretical model, evaluation metrics, and recent developments. arXiv preprint arXiv:2005.13178, 2020. [31] Jiehui Xu, Haixu Wu, Jianmin Wang, and Mingsheng Long. Anomaly transformer: Time series anomaly detection with association discrepancy. arXiv preprint arXiv:2110.02642, 2021.

22

Record · ID 366271 · SHA-256 2ab8cf241f934a68
Retrieved via Conceptio — every document is proof-bundled with source, license, and retrieval metadata.