---
title: "LSTM-based Encoder-Decoder for Multi-sensor Anomaly Detection"
description: "How LSTM encoder-decoder reconstruction detects unusual sensor sequences, why it helps when forecasting fails, and what the experiments…"
canonical: "https://research.elamur.ai/free/en/papers/malhotra-2016-lstm-based-encoder-decoder-multi/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/malhotra-2016-lstm-based-encoder-decoder-multi/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2016](https://md.research.elamur.ai/free/en/papers/2016/) / LSTM-based Encoder-Decoder for Multi-sensor Anomaly Detection

# LSTM-based Encoder-Decoder for Multi-sensor Anomaly Detection

Paper · 2016 · Pankaj Malhotra, Anusha Ramakrishnan, Gaurangi Anand et al.

**Authors:** Pankaj Malhotra, Anusha Ramakrishnan, Gaurangi Anand, [Lovekesh Vig](https://md.research.elamur.ai/free/en/authors/lovekesh-vig/), Puneet Agarwal and Gautam M. Shroff · **Year:** 2016 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**335** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2474046725) · arXiv (Cornell University) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [arXiv 1607.00148](https://arxiv.org/abs/1607.00148)
- [OpenAlex](https://openalex.org/W2474046725)

## Deep dive: LSTM-based Encoder-Decoder for Multi-sensor Anomaly Detection

How LSTM encoder-decoder reconstruction detects unusual sensor sequences, why it helps when forecasting fails, and what the experiments establish. · about 34 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

An unusual sensor reading does not always indicate a faulty machine. A driver may have changed a control, a load may have shifted, or an operating condition may have changed without being recorded. These events can make the next reading difficult to forecast even when the equipment is healthy. The paper studies anomaly detection under this uncertainty. Its central question is whether a system can recognize abnormal behavior without first becoming good at predicting what happens next.

The authors propose EncDec-AD, a reconstruction approach built around Long Short-Term Memory networks, or LSTMs. An encoder reads a sequence of sensor measurements and compresses it into a fixed-size internal representation. A decoder then attempts to reproduce the sequence from that representation. Training uses normal sequences: the system learns what healthy behavior looks like by practicing its reconstruction. At evaluation time, a sequence that fits this learned behavior should generally be easier to reproduce than one containing an unfamiliar disturbance. Differences between the observed and reconstructed readings become the evidence used to score anomalies.

The experiments cover electricity demand, a space shuttle valve, an electrocardiogram, and engine measurements from different operating conditions. These examples include periodic signals, signals with varying cycle lengths, and engine behavior affected by frequently changing controls. The strongest comparison concerns the unpredictable engine application, Engine-NP. There, EncDec-AD obtains precision of 0.96, recall of 0.18, and a positive likelihood ratio of 7.6. The forecasting baseline, LSTM-AD, obtains precision of 0.03, recall of 0.07, and a positive likelihood ratio of 1.9. The authors also report that LSTM-AD performs better on the more predictable datasets. The result therefore supports choosing reconstruction when forecasting errors are a poor guide to abnormality, instead of treating reconstruction as a universal replacement for prediction.

Several qualifications shape the contribution. Although the reconstruction network learns from normal examples, most experiments use anomalous validation sequences to choose its capacity and detection threshold. The engine recordings begin as multivariate measurements but are reduced to a single principal component before detection. The reported engine recall is limited, and the evaluation sometimes assigns an anomalous label to an entire sequence even though only part of it may contain a fault. Within these conditions, the paper establishes that temporal reconstruction is a viable way to detect anomalies in sequences that are difficult to forecast, including sequences with lengths as small as 30 and as large as 500.

### Ideas worth borrowing

Learn normal behavior directly. When failures are rare, training a classifier to recognize every relevant failure type may be impractical. EncDec-AD instead spends its main learning effort on normal sequences, which can be more readily available. The reusable idea is to make ordinary behavior the object of learning and treat a failure to reproduce it as evidence requiring attention. This can be useful wherever the available examples describe healthy operation more thoroughly than they describe faults. The important condition is that the normal training collection must represent the range of legitimate behavior the system will encounter.

Choose a task that matches the uncertainty. A forecasting error mixes together several causes: an unusual event, an ordinary but unobserved control change, and limitations of the predictor. Reconstruction changes the question by examining a sequence after its observations are available. That makes it possible to learn relationships within a completed event without claiming that every transition could have been anticipated. The principle applies beyond machinery: before choosing an anomaly score, ask which parts of the data are inherently uncertain and which regularities remain observable in spite of that uncertainty.

Keep representation learning and scoring separate. The encoder-decoder learns to reproduce measurements, while a separate statistical calculation turns reconstruction errors into anomaly scores. This division makes the system easier to reason about. Poor reconstructions can be investigated independently of a badly chosen threshold, and the normal error distribution can be inspected independently of the recurrent network. In other applications, the same separation can help distinguish an inadequate representation from an inadequate decision rule. It also makes clear that a large raw error is only meaningful relative to the errors expected during healthy operation.

Calibrate errors against normal variation. EncDec-AD does not simply add together reconstruction differences. It estimates how the components of the error vector vary and co-vary on normal validation data, then scores departures from that distribution. This is useful when some measurement channels are naturally harder to reconstruct than others, or when particular combinations of errors are ordinary. The broader lesson is that reconstruction difficulty should have a reference distribution. A detector should respond to an unusual error pattern, rather than assuming that every channel contributes interchangeable evidence.

Match the metric to the labels. The paper treats entire windows as anomalous in settings where the exact faulty interval is uncertain. It consequently favors precision when choosing a threshold, because many points inside a labeled window may still be ordinary. The reusable idea is to make the evaluation objective reflect the resolution and reliability of the annotations. In a different setting, this might lead to a different balance between missed events and false alarms. What transfers is the need to connect that balance to the actual meaning of the labels.

Compare methods across operating regimes. The forecasting baseline wins on predictable signals, while reconstruction is more effective in the unpredictable engine setting. This comparison is more informative than declaring a single method best across all conditions. Researchers and engineers can borrow the practice of organizing evaluation around the property that motivates a method. Here that property is predictability. Elsewhere it might be missing observations, changing operating conditions, or uncertain event boundaries. Such comparisons help establish when an architectural choice is useful and when an existing approach remains preferable.

### How Mova uses it

For [Mova](https://md.research.elamur.ai/free/en/projects/mova/), the relevant contribution is an architectural idea for monitoring sequences, instead of an established component of its Rust implementation. There is no documented Mova implementation of EncDec-AD to describe. The paper also does not study language processing within Mova. Any connection should therefore be understood as a possible design direction: learn recurring healthy patterns in a sequence, reconstruct those patterns, and use departures as diagnostic evidence.

A concrete candidate would be monitoring numeric traces produced while Mova operates. If Mova exposes sequences of internal measurements, a reconstruction system could learn their ordinary relationships over a bounded window. Its output could identify a segment whose observed behavior differs from the patterns represented in normal training examples. The paper supplies the structure for such an experiment: define a window, train reconstruction on normal runs, characterize normal reconstruction errors, and apply a separately chosen threshold.

The distinction between observation and interpretation would matter for a transparent system. A high reconstruction score would mean that the trace was difficult to reproduce under the learned normal pattern. It would not establish that Mova had misunderstood a sentence, produced a false statement, or violated a linguistic rule. Those conclusions would need evidence connected to the language task itself. The useful transfer is a monitoring mechanism with a limited, inspectable meaning.

The paper also suggests how such a component could expose its reasoning. Mova could retain the original measurements, their reconstructions, the error vector, and the resulting score. An engineer could then examine which observations contributed to an alert. This would provide a concrete diagnostic trail, although it would not make the encoder’s internal representation fully interpretable. The distinction is important: displaying the basis of a score improves inspectability without proving a causal explanation for the underlying event.

A smaller borrowing would be the separation of learning from calibration. Mova could use a representation suited to its own design while keeping the paper’s discipline of evaluating errors against normal validation behavior. Adopting that principle would not require reproducing the entire LSTM architecture. It would require demonstrating that the chosen reconstruction task actually distinguishes relevant deviations from legitimate variation in Mova’s own traces.

None of these possibilities establishes a benefit for language quality, execution cost, or robustness in Mova. Those would be new empirical questions. The paper offers a reason to test reconstruction when a monitored sequence is difficult to forecast, along with a reminder that capacity, window construction, and threshold selection all affect the resulting detector.

### The problem and its context

#### Why an unexpected reading may be normal

The motivating setting is a machine monitored through sensors. Some readings describe its physical condition, while others may reflect how it is being operated. The difficulty is that the available measurements do not necessarily capture every cause of a change. A machine carrying a load can behave differently from the same machine without that load. If the load is unknown, a detector sees the resulting variation without seeing the explanation.

Manual controls create a related problem. An operator can change a setting abruptly, and the relevant action may not be included among the recorded variables. The authors use this kind of behavior to explain why even a short forecasting horizon can be difficult. The next measurement may depend on information that is absent from the current observation history.

This matters because prediction-based anomaly detection relies on a meaningful relationship between forecasting error and abnormality. A predictor learns normal temporal behavior, produces an estimate of a future value, and treats a sufficiently unusual error as suspicious. That approach is sensible when normal behavior is reasonably predictable. When ordinary controls create large surprises, the same score can become ambiguous.

The paper’s argument is not that normal machines have no structure. A sequence may contain recognizable relationships even when its next value cannot be anticipated reliably. Once a control transition has occurred, its surrounding measurements may fit a familiar operating pattern. Reconstruction attempts to exploit that distinction: uncertainty about the future does not necessarily imply an inability to recognize a completed pattern.

#### What earlier approaches assumed

The authors place their work against methods based on mathematical descriptions of the signal and methods based on forecasting. They mention stationarity assumptions as a difficulty for the former. For the latter, they discuss exponentially weighted moving averages, support vector regression, and LSTM predictors. Across these examples, the concern is that changing conditions can undermine the regularities needed to decide whether a prediction error is abnormal.

Their related-work discussion describes forecasting systems that learn from normal sequences and use errors on future observations as an anomaly indicator. LSTM-AD is the most direct comparison. It employs recurrent prediction and evaluates the unusualness of its prediction errors. EncDec-AD retains the general idea of learning normal temporal behavior but changes the task used to learn it.

The authors also connect their proposal to reconstruction-based detection. They cite denoising autoencoders and deep belief networks as earlier ways to identify unusual inputs through learned representations. Their contribution extends the reconstruction idea to ordered measurements through a recurrent encoder and decoder. Temporal structure is therefore part of the learning mechanism instead of being handled only through a static input representation.

These connections help locate the paper’s novelty. It does not introduce anomaly detection from normal data, recurrent networks, or reconstruction as separate ideas. It combines them into a sequence reconstruction scheme and evaluates whether that combination remains useful under the unpredictable operating conditions that motivate the work.

#### Why an encoder and decoder are a natural fit

The paper draws its architectural inspiration from sequence-to-sequence learning. In that arrangement, an encoder converts an input sequence into an internal vector, and a decoder uses that vector to generate a target sequence. The authors discuss applications including [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/), language reconstruction, [parsing](https://md.research.elamur.ai/free/en/concepts/parsing/), and image captioning as precedents for this general pattern.

For anomaly detection, the target is derived from the input itself. The task is no longer to convert a sentence into another language or map an input into a different kind of output. It is to reproduce the sensor sequence after compressing information about it into the encoder’s final state.

This compression creates the intended learning pressure. The encoder must retain information useful for reconstructing normal temporal patterns, and the decoder must learn how those patterns unfold. If the training collection contains only ordinary behavior, the authors expect unfamiliar behavior to be reproduced less accurately. That expectation motivates the detector, but it is an empirical premise instead of an automatic consequence of the architecture.

The normal-data emphasis also addresses the practical scarcity of faults. Machines may be serviced before a developing problem appears clearly in their readings. In that situation, there can be many healthy runs and few useful examples of failure. Learning to reconstruct normal sequences offers a training objective even when a conventional normal-versus-fault classifier would lack adequate positive examples.

### The method, step by step

The method has a learning stage and a decision stage. During learning, the encoder-decoder practices reconstructing normal sequences. During scoring, reconstruction differences are compared with the error behavior observed on normal validation data. A threshold then converts that continuous score into a decision when a binary label is required.

From healthy sequences to anomaly decisions The steps in order.

#### Represent a sequence of measurements

Each input is a window containing successive observations. An observation can be a single reading or a vector containing several sensor values.

```
X = {x⁽¹⁾, x⁽²⁾, …, x⁽ᴸ⁾},  x⁽ⁱ⁾ ∈ ℝᵐ
```

Here, X denotes the complete input sequence. L is its length, and x⁽ⁱ⁾ is the observation at position i. The symbol ℝᵐ says that an observation contains m real-valued components, corresponding to the measured variables. The associated observation time is tᵢ.

The paper allows these windows to come from separate recorded sequences or from a longer stream divided into subsequences. This is a substantive part of the setup. Window length determines how much context the encoder receives and what temporal patterns can fit within a single example. A complete operating event and a short fragment of that event can pose different reconstruction problems.

The different datasets use different windowing procedures. Electricity demand is organized around a week. The shuttle data deliberately use windows extending beyond a cycle. Engine windows are much shorter. These choices show how the same reconstruction architecture can be applied to different temporal scales, but the architecture does not choose the appropriate scale automatically.

#### Encode the observed window

The encoder is an LSTM network. It reads the observations in their original order and updates an internal hidden state as it proceeds. The hidden state at a given position depends on the current input and the accumulated state from earlier positions.

The paper denotes the encoder state at position i by h_E⁽ⁱ⁾. The state lies in ℝᶜ, with c denoting how many LSTM units the encoder’s hidden layer contains. The parameter c therefore controls the size of the state passed through the sequence and the dimension of the representation delivered to the decoder.

The final encoder state summarizes the input for reconstruction. It is fixed in dimension even when the input contains many successive measurements. That is the sense in which the encoder produces a fixed-size representation: its dimensionality is determined by c rather than by the number of observations in the window.

The experiments use an encoder with a single hidden layer and a decoder with a single hidden layer. Both use c LSTM units. The paper does not supply the internal LSTM gate equations, so understanding this detector does not require expanding the recurrent cell into a separate set of formulas. The relevant architectural facts are the recurrent processing, the final-state transfer, and the reconstruction task.

#### Initialize the decoder from the encoded state

The decoder begins from the final state produced by the encoder.

```
h_D⁽ᴸ⁾ = h_E⁽ᴸ⁾
```

The symbol h_D⁽ᴸ⁾ is the decoder’s initial hidden state, indexed to correspond to the final position of the input. The symbol h_E⁽ᴸ⁾ is the encoder state after reading the entire window. The equality specifies the direct transfer of that representation.

The decoder reconstructs the sequence in reverse chronological order. Its first target is the last observation from the input window, after which it works backward through earlier observations. The authors relate this reversal to earlier sequence-to-sequence work. They do not test an otherwise identical forward-order decoder, so reversal should be treated as a design choice in the method instead of a separately demonstrated source of improvement.

Reverse reconstruction also explains the indexing. As the decoder runs, its output positions move from the end of the original sequence towards the beginning. For scoring, each reconstructed value is paired with the observation at the same original position. Otherwise, an ordinary temporal shift would be mistaken for a reconstruction error.

#### Convert decoder states into predicted measurements

A linear output layer maps the decoder’s state back into the sensor space. For the initial reconstruction, the paper writes this relationship as follows.

```
x′⁽ᴸ⁾ = wᵀh_D⁽ᴸ⁾ + b
```

The vector x′⁽ᴸ⁾ is the reconstructed measurement corresponding to the final input observation. The matrix w has dimensions c × m, so its transpose wᵀ maps the c-dimensional decoder state into m output values. The vector b is an m-dimensional bias. The superscript T indicates matrix transposition.

The same output mechanism is used as the decoder proceeds through the window. This layer produces numeric sensor estimates rather than category probabilities. Its role is to translate the recurrent representation into values that can be compared directly with the recorded measurements.

The paper’s architecture figure illustrates this process with a sequence whose length is 3. The encoder accumulates information across that input, the final state initializes the decoder, and the output layer produces a reconstructed value before the next decoder update. The example makes the information path explicit; it is not an additional experimental setting.

#### Distinguish training inputs from inference inputs

During training, the decoder receives the actual preceding target value in the reverse reconstruction order. That observed value helps it update its hidden state before producing the next target estimate. This gives the learning procedure access to the correct sequence values while it learns how reconstruction should proceed.

During inference, the decoder instead feeds back its own reconstructed value. It must continue from what it has already generated. The distinction matters because mistakes made during inference can influence later decoder states and therefore subsequent reconstruction errors.

An anomaly score at a particular position consequently reflects more than an isolated comparison between that reading and an independently generated estimate. The estimate depends on the encoded window and the decoder’s reconstruction trajectory. This temporal dependence is part of the mechanism, and it should temper interpretations that treat every high-scoring point as an independent diagnosis.

The paper specifies this training-versus-inference difference but does not report a controlled comparison of alternative feedback schemes. It therefore establishes how EncDec-AD is run, without establishing whether this particular choice is optimal.

#### Learn by minimizing reconstruction error

The encoder and decoder are trained together on the normal training sequences. Their objective is to reduce squared differences between recorded and reconstructed values.

```
J = Σ_{X ∈ s_N} Σ_{i=1}^{L} ‖x⁽ⁱ⁾ − x′⁽ⁱ⁾‖²
```

J is the training objective. The set s_N contains the normal sequences used for learning. For each sequence X, the inner sum covers positions i from the beginning to the end of its window of length L. The vectors x⁽ⁱ⁾ and x′⁽ⁱ⁾ are the observed and reconstructed measurements at that position. The squared norm aggregates squared component differences.

This objective contains no direct reward for recognizing a known fault type. It trains reproduction of the normal examples. The later anomaly detector relies on the resulting reconstruction errors being informative about whether a new observation belongs to the learned normal behavior.

The authors train with mini-batches using Adam. They use normal validation sequences for early stopping, which means that training progress is checked on normal examples outside the sequence collection used to update the network. The paper does not state the optimizer settings or a complete search schedule, so those implementation details cannot be inferred from the method description.

#### Keep the data roles distinct

The paper divides normal sequences into s_N, v_N1, v_N2, and t_N. These are the normal training collection, an initial normal validation collection, a further normal validation collection, and the normal test collection. Anomalous sequences are divided into v_A and t_A for validation and testing.

The first normal validation collection, v_N1, serves related but distinct purposes. It guides early stopping for the reconstruction network, and its reconstruction errors provide the reference distribution for scoring. The second normal validation collection, v_N2, is used together with anomalous validation data to select the threshold and the hidden-state size c.

This separation clarifies the method’s supervision. The network’s reconstruction objective is learned from normal training sequences. Nonetheless, choosing the final detector can involve anomalous examples. Calling the entire procedure independent of anomaly labels would therefore be too broad for the main experimental setup.

The final test collections are intended to assess the resulting detector after these choices have been made. The paper names these roles but does not give their numerical allocations in the prose. Without those allocations, it is difficult to assess how much evidence supports each stage of fitting and selection.

#### Form an error vector at each position

After reconstructing a window, the method calculates an absolute difference for every measurement component.

```
e⁽ⁱ⁾ = |x⁽ⁱ⁾ − x′⁽ⁱ⁾|
```

The vector e⁽ⁱ⁾ contains the reconstruction errors at position i. The absolute-value operation is componentwise, so each entry records the magnitude of a difference and discards its sign. The vectors x⁽ⁱ⁾ and x′⁽ⁱ⁾ remain the observed and reconstructed measurements.

This is a different operation from the squared error used during network training. Training minimizes an aggregate objective across sequences and positions. Scoring starts from the individual absolute-error vector associated with a point.

Discarding sign is also a modeling choice. An overestimate and an underestimate of equal magnitude produce the same component in this vector. The detector is therefore calibrated to patterns in error magnitude, rather than to the direction of each reconstruction discrepancy.

#### Estimate the normal error distribution

The authors collect error vectors from v_N1 and fit a multivariate Normal distribution using maximum likelihood estimation. Its parameters are a mean vector μ and a covariance matrix Σ.

The mean describes the typical error vector on normal validation data. The covariance describes how error components vary and how they move together. In a genuinely multivariate input, this allows a combination of deviations to be evaluated relative to the relationships among normal reconstruction errors.

This statistical stage is important because accurate reconstruction does not mean identical error behavior everywhere. A variable can be consistently harder to reproduce than another. A detector based only on raw magnitude might repeatedly penalize that ordinary difficulty. Centering and covariance weighting attempt to distinguish expected reconstruction imperfection from unusual departures.

The use of a Normal distribution is an assumption about how to summarize normal errors. The paper does not establish that every dataset’s error vectors follow this distribution closely. It uses the fitted parameters as a practical reference for its anomaly score.

#### Turn an error vector into a score

The anomaly score is a covariance-weighted squared distance from the normal error mean.

```
a⁽ⁱ⁾ = (e⁽ⁱ⁾ − μ)ᵀΣ⁻¹(e⁽ⁱ⁾ − μ)
```

The scalar a⁽ⁱ⁾ is the score at position i. The vector e⁽ⁱ⁾ is that position’s absolute reconstruction error, and μ is the estimated mean normal error vector. The matrix Σ⁻¹ is the inverse of the estimated covariance matrix. Transposition turns the first centered vector into a row vector so that the expression yields a scalar.

A larger value means the error pattern lies farther from the normal reference under this covariance weighting. This is the quantity the detector compares with its threshold.

Although the paper discusses anomaly likelihood, this expression is not itself a probability that a machine is faulty. It is a distance-based score derived from the fitted error distribution. That distinction matters when interpreting a result: a high score supports unusual reconstruction behavior, while the practical meaning of that unusualness depends on the data and validation procedure.

#### Choose a threshold with a precision-oriented objective

In the supervised selection setting, the authors choose a threshold τ and hidden size c using the normal and anomalous validation sequences. A point is called anomalous when its score exceeds τ. The objective used to select these parameters is F_β.

```
F_β = (1 + β²)PR / (β²P + R)
```

F_β combines precision P and recall R. Precision measures how many positive predictions are labeled anomalous; recall measures how many labeled anomalous points are identified. The parameter β controls their relative influence. The authors choose β below 1, which favors precision.

Their reason is tied to the labels. A sequence containing an anomalous pattern can have its entire window marked anomalous. Some of its points may still describe normal behavior. A detector that responds mainly around the actual disturbance can therefore have low recall against the broad sequence label.

The engine application illustrates the uncertainty. The available information identifies a repair date rather than the exact interval during which each sensor became abnormal. Runs shortly before repair are treated as anomalous, while runs shortly afterward are treated as normal. This supports evaluation around maintenance events, but it does not supply exact pointwise fault annotations.

#### Handle the ECG exception

The ECG experiment follows a different selection procedure because its chosen recording contains only one anomaly. The authors do not create v_N2 and v_A for that experiment. They choose c using the lowest reconstruction error on v_N1.

They then set the threshold from the mean and standard deviation of normal validation scores.

```
τ = μ_a + σ_a
```

Here, τ is the decision threshold, μ_a is the mean anomaly score for points in v_N1, and σ_a is the standard deviation of those scores.

This exception shows a way to complete detector selection without a separate anomalous validation collection. It also creates a difference in experimental protocol. The ECG result cannot be interpreted as though its threshold had been optimized in the same way as the thresholds for datasets with anomalous validation examples.

### Experiments and results

The evaluation is organized around variation in temporal behavior. Some signals follow recognizable cycles, another has cycles whose duration changes, and the engine applications differ in how their controls vary. The question is whether reconstruction continues to produce useful anomaly evidence across those settings.

The public datasets are power demand, the space shuttle valve, and ECG. The engine data come from a proprietary industrial project and are split into Engine-P and Engine-NP applications. The paper reports selected numerical comparisons in its discussion of observations and describes additional performance through its results table and example plots. The explicit comparisons are sufficient to show the central tradeoff, but they do not supply every detector score for every dataset.

#### Electricity demand: regular structure over a week

The power recording contains 35,040 measurements collected across a year. Its ordinary pattern combines changes within a day with changes across the week. Demand is higher during working hours and lower outside them, while weekends typically have lower demand than weekdays.

An anomalous week is defined through an interruption of that pattern: low demand occurs during any of the first 5 days, resembling weekend behavior. The anomaly is therefore contextual. A low value is not automatically suspicious; its place in the weekly pattern determines its significance.

The authors downsample by 8 and construct non-overlapping windows with L=84. Each window represents a week. This arrangement gives the encoder a temporally meaningful unit containing both the usual high-demand and low-demand portions of the cycle.

For this predictable setting, the paper states that LSTM-AD performs better than EncDec-AD and reports an LSTM-AD F_0.1 score of 0.90. The prose does not give the corresponding EncDec-AD F-score, so the size of that advantage cannot be stated from the reported comparison. What can be concluded is the direction of the authors’ finding: reconstruction does not displace forecasting when the recurring structure already makes prediction effective.

#### Shuttle valve: windows crossing cycle boundaries

The shuttle recording contains cycles with 1,000 points each and includes 15 cycles. The authors choose a window length of 1500 in the original sequence, covering 1.5 cycles, and advance the sliding window by 500. They then downsample by 3.

The choice deliberately makes a subsequence longer than a single cycle. This matters because the detector is not being tested only on neatly isolated repetitions. Its input can span a cycle boundary and include part of an additional repetition.

The normal and anomalous examples shown in the paper come from TEK17 and TEK14, respectively. The visual analysis presents the original measurements, reconstructions, and anomaly scores. These examples are intended to show how a departure in the signal corresponds to reconstruction difficulty and a higher score.

LSTM-AD again performs better according to the authors’ comparison, with a reported F_0.1 score of 0.84. As with electricity demand, the corresponding EncDec-AD value is not stated in the prose. The experiment supports the applicability of reconstruction to windows extending across cycles, while the baseline result shows that applicability alone does not imply superiority.

#### Engine measurements: predictability as the central contrast

The engine recordings initially contain 12 sensor channels. The authors mention coolant temperature, torque, and an accelerator control among the measurements. They examine applications with different external-control behavior.

Engine-P has a discrete control with high and low states. Its behavior is described as predictable apart from the moments when the control changes. Engine-NP has a control that can vary within a range and changes frequently. This creates the unpredictable sequence behavior at the center of the paper’s motivation.

Both engine applications use L=30. Before detection, the authors apply principal component analysis and retain only the first principal component. That component accounts for 72% of the variance in Engine-P and 61% in Engine-NP.

This preprocessing makes the evaluated engine input univariate. The experiment therefore tests whether reconstruction can identify anomalies in a projection of the sensor system, rather than whether a multivariate error covariance over all original sensor channels is effective. The distinction does not invalidate the engine result, but it narrows what that result demonstrates.

For Engine-P, the authors state that LSTM-AD performs better and give its F_0.1 score as 0.89. Engine-NP reverses the comparison. There, a forecasting system has difficulty learning a useful prediction task, and reconstruction produces substantially more selective anomaly indications.

#### Engine-NP precision and recall

The best reported LSTM-AD configuration for Engine-NP uses a pair of hidden layers, each containing 30 LSTM units, and a prediction length of 1. Its precision is 0.03 and its recall is 0.07. EncDec-AD has precision of 0.96 and recall of 0.18.

Engine-NP precision for forecasting and reconstruction Reconstruction gives more selective positive predictions in the unpredictable engine setting.

**The numbers**

| System or setting | precision |
| --- | --- |
| LSTM-AD | 0.03 |
| EncDec-AD (this paper) | 0.96 |

Precision is the clearest expression of the practical contrast. Under the experiment’s labels, the reconstruction detector’s positive predictions are much more likely to fall within sequences treated as anomalous. The forecasting detector’s positive predictions are poorly aligned with those labels.

This result fits the motivating explanation: ordinary unpredictability can produce forecasting errors even without an anomalous event. However, the experiment measures detector performance rather than directly decomposing every forecasting error into its cause. The explanation is supported by the setup and comparison, without being a separate causal analysis of each alert.

Engine-NP recall for forecasting and reconstruction Reconstruction identifies more labeled anomalous points while retaining limited coverage.

**The numbers**

| System or setting | recall |
| --- | --- |
| LSTM-AD | 0.07 |
| EncDec-AD (this paper) | 0.18 |

Recall remains important despite the emphasis on precision. EncDec-AD detects only a limited portion of points labeled anomalous. Some of this may reflect broad sequence labels that include ordinary points, which is the authors’ reason for using a precision-oriented objective. It nonetheless means that the reported result should not be described as comprehensive fault coverage.

The selected thresholds deliberately embody a preference. A detector tuned to reward precision can produce a useful set of alerts while leaving many labeled points unflagged. Whether that tradeoff is suitable depends on the intended monitoring task, something the paper does not resolve for every possible application.

#### Positive likelihood ratios

The paper also reports the positive likelihood ratio, expressed as TPR/FPR. TPR is the true-positive rate, while FPR is the false-positive rate. The ratio measures how much more often the detector fires on positive labels than on negative labels.

Engine-NP positive likelihood ratio Reconstruction separates labeled anomalous and normal points more strongly than forecasting.

**The numbers**

| System or setting | TPR/FPR |
| --- | --- |
| LSTM-AD | 1.9 |
| EncDec-AD (this paper) | 7.6 |

The authors state that this ratio exceeds 1.0 across the datasets. They interpret this as evidence that the detector’s scores distinguish anomalous from normal behavior. More precisely, the reported ratio describes the discrimination of the thresholded detector at its chosen operating point. It does not establish that every anomalous point receives a higher score than every normal point.

For Engine-NP, the likelihood-ratio comparison reinforces the precision and recall results. Reconstruction’s advantage is not expressed only through the proportion of its alerts that are labeled positive; it also produces stronger separation between positive and negative firing rates.

The paper reports an LSTM-AD F_0.05 score of 0.03 for Engine-NP, while EncDec-AD obtains an F_0.1 score of 0.93. These are differently weighted F-scores. They should be retained with their subscripts and should not be presented as a controlled comparison under an identical metric. Precision, recall, and TPR/FPR provide the directly matching measures.

#### ECG: irregular cycle duration and scarce anomalies

The ECG example is quasi-periodic: recognizable cycles recur, but their duration varies. The experiment uses the first channel of qtdb/sel102. The recording contains a single anomaly associated with a pre-ventricular contraction.

The authors form non-overlapping subsequences with L=208. A subsequence spans approximately 800ms. Unlike the engine and other public-data settings, this experiment cannot reserve anomalous examples for threshold selection without using its only anomaly.

The resulting procedure relies on normal validation reconstruction error to choose capacity and normal score statistics to set the threshold. This is an important test of feasibility under sparse anomaly labels, but its evidential scale is small. Detecting the available event does not establish performance across varied ECG abnormalities or across a broader collection of recordings.

The paper includes ECG among the settings where EncDec-AD detects anomalies. It does not state an ECG-specific numerical precision, recall, or F-score in its narrative results. The supported account is therefore qualitative: reconstruction remains applicable when cycle timing varies and anomalous validation examples are unavailable.

#### What the visual examples contribute

For normal and anomalous examples, the paper places recorded measurements alongside reconstructions and anomaly scores. The corresponding plots use consistent vertical scales within a row, and score plots use a logarithmic scale. Where the precise anomalous interval is known, that interval is marked in the original signal.

This presentation helps connect the architecture to its observable behavior. A reader can inspect whether an ordinary sequence is reproduced plausibly, whether an anomalous pattern is reconstructed poorly, and whether the scoring stage emphasizes that mismatch.

Such plots are useful diagnostic evidence, but selected examples cannot establish the distribution of outcomes across all test sequences. Their strongest role is explanatory. They show the intended relationship between the input, reconstruction, and score, while aggregate metrics carry the broader performance claim.

Taken together, the experiments establish a conditional advantage. Reconstruction works across several forms of temporal structure, and its most persuasive numerical benefit appears where forecasting is undermined by frequently changing controls. The predictable datasets supply a complementary result: forecasting remains competitive enough to outperform it under those conditions.

### What the ablations show

The paper does not report a systematic component-by-component ablation study; instead, it offers comparisons between detection objectives, operating regimes, window constructions, and validation procedures.

#### Reconstruction versus forecasting

The most informative comparison changes the learning task. LSTM-AD predicts future observations, while EncDec-AD reconstructs an observed sequence. Their contrast asks whether forecasting is an appropriate route to anomaly evidence when ordinary behavior is difficult to anticipate.

The predictable datasets favor LSTM-AD. Engine-NP favors EncDec-AD on the matching metrics reported in the prose. This pattern supports the paper’s central hypothesis more directly than a single aggregate win would. The benefit appears in the setting where the proposed weakness of prediction should matter.

Nevertheless, the comparison is not a perfectly isolated architectural intervention. The reported Engine-NP forecasting baseline has a pair of hidden layers, while the encoder and decoder each use a single hidden layer. The systems also solve different tasks and can have different effective access to temporal information. These differences limit any claim that reconstruction alone has been isolated as the cause.

The appropriate conclusion concerns the complete detection approaches under the evaluated conditions. The results support EncDec-AD as a useful alternative for unpredictable sequences. They do not quantify the independent contribution of every design choice inside that alternative.

#### Predictable and unpredictable engine applications

Engine-P and Engine-NP create an especially relevant contrast because their control behavior differs. The former has a discrete control, while the latter changes frequently within a range. This gives the paper a concrete operational interpretation of predictability.

The resulting comparison shows that “engine data” is too broad a category to determine the best detector. The conditions generating a sequence matter. An algorithm that works well for one engine application can be less suitable for another when ordinary control behavior changes.

At the same time, these are different applications, instead of a controlled experiment that alters only a single property of an otherwise identical recording. The paper does not show that all other aspects of the datasets are held constant. The contrast is therefore strong motivating evidence, but not a complete causal isolation of unpredictability.

#### Window length and cycle structure

The public datasets exercise different relationships between windows and recurring patterns. Electricity demand places a weekly pattern within a window. Shuttle windows extend past a cycle. ECG cycles vary in duration.

These examples show that the reconstruction approach does not require every input to contain an identically aligned repetition with a fixed duration. That is useful evidence about the flexibility of the sequence representation.

They do not establish an optimal window length. The paper does not report a controlled sweep that varies L while holding a dataset and the rest of the procedure constant. Its statement that reconstruction works over short and long sequences is a demonstration across settings, instead of a measured account of how performance changes as a window grows.

That distinction matters for reuse. A practitioner can borrow the architecture, but cannot infer from these experiments that an arbitrary window will preserve the relevant anomaly or that increasing context will always help.

#### Capacity selection without a capacity analysis

The number of hidden units c is selected through validation in the main procedure. In ECG, it is selected using normal reconstruction error. Capacity is therefore recognized as a parameter that affects the detector.

The paper does not present a detailed analysis relating hidden size to reconstruction quality, anomaly discrimination, or overfitting. It also does not demonstrate that the capacity minimizing normal reconstruction error necessarily produces the best anomaly detector.

This is a particularly important unanswered question for reconstruction. A system can become better at reproducing its inputs without becoming better at separating healthy and faulty behavior. The paper’s selection procedures offer practical ways to choose c, but they do not resolve that broader relationship.

#### Design choices left unisolated

Reverse-order decoding, the linear output layer, the Normal error distribution, and covariance-weighted scoring all belong to the proposed method. None is separately removed or replaced in a reported ablation.

As a consequence, the results should not be used to claim that reverse order is essential, that the fitted Normal distribution is the best calibration method, or that covariance weighting explains the engine advantage. The experiments validate a combined approach.

The visual reconstructions add an analysis of behavior rather than an ablation of mechanism. They help show that high scores can coincide with visible reconstruction failures. They do not determine which internal feature of the architecture produced that failure, or whether another scoring method would have highlighted it more effectively.

### Limitations

#### Limits the authors explicitly recognize

The authors explicitly recognize that a window-level anomaly label can be coarse. A sequence may be marked anomalous because it contains an abnormal pattern, even though many of its observations are ordinary. They use this mismatch to explain why lower pointwise recall can occur and why their selection objective favors precision.

This qualification is essential for interpreting the engine results. The available repair information does not identify exact fault onset at each sensor. Treating runs before maintenance as anomalous is a practical labeling assumption, instead of a direct measurement of the condition of every point.

The authors also acknowledge the ECG dataset’s scarcity of anomalous examples through their altered validation procedure. The absence of an anomalous validation collection is not hidden inside an otherwise uniform protocol; it changes how capacity and threshold are chosen.

Their comparisons further recognize a limit on the method’s advantage. Forecasting performs better on the predictable datasets. The paper’s broader argument is that reconstruction may be more robust when prediction becomes unreliable, instead of that it dominates forecasting in every setting.

#### Additional limits visible in the experimental design

A careful reader should distinguish normal-only representation learning from normal-only detector development. The network is trained to reconstruct healthy sequences, but the main selection procedure uses anomalous validation examples to choose τ and c.

This means that the experiments do not uniformly establish how well EncDec-AD can be deployed when no anomalous examples are available at any stage. ECG provides a relevant exception, but that exception contains only a single abnormal event and follows a different threshold rule.

The dependence on representative normal data is another limitation of the underlying reasoning. The detector learns the patterns present in its training sequences. If a legitimate operating regime is missing, poor reconstruction could reflect an unfamiliar healthy condition instead of a fault. This follows from the learning setup; the paper does not measure coverage of every possible normal regime.

Similarly, anomalous inputs are not guaranteed to reconstruct poorly. The method is trained to reproduce normal examples, but no theorem in the paper establishes that the learned network will fail on all abnormalities. The experimental results support useful separation in the evaluated settings, not an absolute boundary around normal behavior.

#### The multivariate claim has a narrower experimental test

The method is expressed for m-dimensional observations, and its covariance-based score can account for dependencies among error components. That makes the formulation applicable to multiple sensors.

However, the engine experiment compresses its 12 channels into a single principal component. The retained component captures 72% of variance for Engine-P and 61% for Engine-NP. Those are variance-retention figures, not measures of how much fault information survives.

A low-variance direction can matter to detection even if it contributes relatively little to overall variation. The paper does not compare the principal-component input against the original multivariate sequence. It therefore leaves open how much performance depends on projection and whether additional channels would help or hinder reconstruction.

The scalar engine input also means that this experiment cannot isolate the benefit of modeling cross-channel reconstruction-error covariance. That benefit belongs to the general scoring formulation, while the strongest reported numerical comparison uses reduced data.

#### Reconstruction uses a completed window

EncDec-AD encodes the whole input window before reconstructing it. A score associated with an earlier position can therefore depend on later observations inside that window.

This is a substantive difference from forecasting. It can be useful when evaluating a completed run or reviewing a recent segment, but it affects how the detector should be understood in an online setting. The paper does not report detection delay or demonstrate that each score is available at the original measurement time.

Window length therefore affects more than representation quality. It also affects the amount of observation context required before reconstruction can proceed. The experiments establish detection on windows, without fully characterizing the timing requirements of a deployment that must respond immediately.

#### Statistical calibration remains an assumption

The error score depends on a mean vector and an invertible covariance matrix estimated from normal validation errors. The paper does not report distributional checks showing how well the Normal approximation matches the observed errors.

It also does not analyze sensitivity to covariance estimation, changes in error variability over time, or the handling of poorly conditioned covariance estimates. These omissions matter most when moving from a low-dimensional input to many correlated sensor channels.

The score should also not be treated as a calibrated probability of failure. Its magnitude describes distance from an estimated normal error pattern. Translating that distance into operational risk would require evidence beyond the formula itself.

#### Evaluation breadth and reproducibility are limited

The public examples illustrate distinct kinds of temporal structure, but each is used in a specific way. The power anomaly depends on a particular weekly pattern, shuttle examples come from named recordings, and ECG uses a single channel containing a single abnormal event.

The engine data add practical relevance but are proprietary. That limits independent examination of the control behavior, repair-based labels, and preprocessing that underlie the strongest comparison.

The methodological account also leaves several implementation details unspecified, including numerical split sizes, detailed optimization settings, and the full capacity-search procedure. These gaps do not negate the reported results, but they limit how precisely another investigation could reproduce the same fitted detectors.

The paper reports point estimates rather than an uncertainty analysis across repeated training runs. It therefore does not establish how sensitive the reported scores are to random initialization or data selection. Claims about robustness should remain tied to the diversity of signal types tested, instead of being extended to every source of experimental variation.

#### Detection does not establish diagnosis

A large reconstruction error indicates a mismatch with learned normal behavior. It does not identify which mechanical component failed, explain why a control changed, or establish that an observed deviation caused a later repair.

The plots can make a suspicious interval visible, and the error vector can indicate which measurements were poorly reproduced. These are useful diagnostic clues. They are not equivalent to a causal account of the fault.

This boundary is particularly relevant when applying the method outside its original domain. Reconstruction supplies a general mechanism for detecting unusual sequence behavior. The meaning, urgency, and consequences of an alert remain application-specific questions that require their own validation.

### What came after

The later citing work identified for this paper is [AutoAnoEval: Semantic-Aware Model Selection via Tree-Guided LLM Reasoning for Tabular Anomaly Detection](https://md.research.elamur.ai/free/en/papers/yoon-2026-autoanoeval-semantic-aware-model-selection/), dated 2026. Its stated subject is the selection of anomaly-detection systems for tabular data using semantic information and tree-guided reasoning.

That subject connects naturally to a central lesson of EncDec-AD: a detector’s suitability depends on the properties of its data and task. In the earlier paper, predictability changes which approach performs better. The forecasting system is stronger on the predictable examples, while reconstruction is stronger in Engine-NP. The evaluation therefore makes selection among detection approaches a meaningful problem.

The available description of AutoAnoEval does not establish a more specific technical inheritance. It does not say that AutoAnoEval reuses the recurrent encoder-decoder, adopts the same reconstruction score, or evaluates on the engine recordings. Its citation connects it to this earlier work, while its title identifies a later concern with choosing an appropriate anomaly detector.

The shared research question can be stated without assuming architectural continuity. An anomaly detector encodes expectations about what useful structure exists in the data. Forecasting expects enough temporal predictability to make future errors informative. Reconstruction expects ordinary examples to be reproducible through a learned representation. A selection method must determine which expectations are appropriate for the setting it faces.

EncDec-AD’s contribution to that discussion is concrete. It shows why the quality of a forecasting task and the quality of an anomaly detector can diverge when external controls are incompletely observed. It also shows the value of reporting the settings where a proposed alternative loses. Those results make the method useful both as a detector to consider and as an example of why anomaly detection requires attention to the data-generating conditions.

The subsequent citation does not turn the original findings into a broader guarantee. The enduring idea remains conditional and testable: when ordinary sequences are hard to predict, learning to reconstruct their observed structure can provide a more useful basis for anomaly evidence. The paper demonstrates that possibility in its evaluated settings and leaves later work to determine how best to recognize those settings, choose among detectors, and validate the resulting decisions.

## Cite

Cite as Pankaj Malhotra, Anusha Ramakrishnan, Gaurangi Anand, Lovekesh Vig, Puneet Agarwal and Gautam M. Shroff. 2016. LSTM-based Encoder-Decoder for Multi-sensor Anomaly Detection. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1607.00148](https://doi.org/10.48550/arxiv.1607.00148) · [arXiv 1607.00148](https://arxiv.org/abs/1607.00148)

```bibtex
@misc{malhotra2016lstm,
  title = {{LSTM-based Encoder-Decoder for Multi-sensor Anomaly Detection}},
  author = {Pankaj Malhotra, Anusha Ramakrishnan, Gaurangi Anand, Lovekesh Vig, Puneet Agarwal and Gautam M. Shroff},
  year = {2016},
  doi = {10.48550/arxiv.1607.00148},
  eprint = {1607.00148},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1607.00148}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
