[Paper Review] Arbitrary Discrete Sequence Anomaly Detection with Zero Boundary LSTM
This paper proposes a novel zero-boundary LSTM autoencoder combined with One-Class SVMs for stable, mathematically grounded discrete sequence anomaly detection. By modeling sequence probability distributions and using context vectors to define an outlier boundary, the method achieves superior stability and performance over standard LSTM and sliding-window approaches on synthetic IPv4 and JSON datasets.
We propose a simple mathematical definition and new neural architecture for finding anomalies within discrete sequence datasets. Our model comprises of a modified LSTM autoencoder and an array of One-Class SVMs. The LSTM takes in elements from a sequence and creates context vectors that are used to predict the probability distribution of the following element. These context vectors are then used to train an array of One-Class SVMs. These SVMs are used to determine an outlier boundary in context space.We show that our method is consistently more stable and also outperforms standard LSTM and sliding window anomaly detection systems on two generated datasets.
Motivation & Objective
- To define a formal, theoretical criterion for anomalies in discrete sequences based on conditional probability zero.
- To address the instability of standard LSTM-based anomaly detection due to high variance in predicted probabilities.
- To develop a neural architecture that produces stable decision boundaries for anomaly detection in discrete sequences.
- To improve robustness and performance over sliding window and standard LSTM methods on structured discrete data.
- To enable reliable anomaly detection in real-world applications like cybersecurity and system monitoring.
Proposed method
- The model uses a modified LSTM autoencoder to generate context vectors from input sequences, capturing sequential dependencies.
- Each context vector represents the hidden state after processing a sequence prefix, encoding contextual information.
- These context vectors are used to train an array of One-Class SVMs to learn a decision boundary in the latent space.
- Anomalies are detected when a sequence's final context vector falls outside the learned boundary, indicating a zero-probability next-element prediction.
- The system uses a variable cutoff for the OCSVM decision function, allowing flexible thresholding independent of zero-centered boundaries.
- The method is grounded in a theoretical definition: a sequence is anomalous if any element has zero conditional probability given its prefix.
Experimental results
Research questions
- RQ1Can a formal, probability-based definition of anomalies in discrete sequences be derived and implemented via deep learning?
- RQ2Does using context vectors from an LSTM autoencoder with OCSVMs yield a more stable decision boundary than standard LSTM-based anomaly detection?
- RQ3How does the proposed method compare to sliding-window and n-gram baselines in detecting long-range dependencies and structural anomalies?
- RQ4To what extent does the model maintain performance and stability across varying training epochs and hyperparameters?
- RQ5Can the method detect anomalies involving structural violations (e.g., incorrect syntax, malformed grouping) that standard models miss?
Key findings
- The Zero Boundary LSTM outperformed the standard LSTM in all anomaly categories on the IPv4 dataset, particularly in detecting malformed digit groupings and dot placement errors.
- On the JSON dataset, the Zero Boundary LSTM nearly matched the performance of the standard LSTM, despite using a simpler architecture and training setup.
- The Zero Boundary LSTM demonstrated significantly greater training stability across epochs, with consistent true positive and true negative rates, unlike the standard LSTM which fluctuated widely.
- The n-gram model outperformed both LSTMs on digit-length anomalies due to its ability to memorize valid number ranges, but failed on structural issues like incorrect nesting or missing braces.
- The method achieved stable decision boundaries even with limited training data and short sequences, reducing false positives and missed detections.
- The system remains sensitive to anomalies in the training data, and OCSVM scalability remains a bottleneck due to O(n³) training complexity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.