Automating Network Error Detection using Long-Short Term Memory Networks

Moin Nadeem, Vibhor Nigam, Dimosthenis Anagnostopoulos, Patrick CarretasarXiv 2018

Introduction

Internet Service Providers (ISPs) manage vast infrastructures comprising thousands of routers that generate millions of system log (syslog) messages daily. While these logs contain critical diagnostic information, their sheer volume and unstructured nature make manual analysis nearly impossible. Traditionally, network engineers have relied on Regular Expressions (RegEx) to identify known error patterns. However, this approach is inherently reactive and brittle; it requires constant manual updates to account for new hardware or software versions and fails to detect "unknown unknowns"—novel error patterns that have not yet been defined.

This paper explores a transition from rigid, manual monitoring toward automated error detection using machine learning. By comparing traditional clustering techniques with Long-Short Term Memory (LSTM) networks, the authors demonstrate that LSTMs can successfully group syslog messages based on temporal causality and hidden patterns, potentially predicting network failures before they occur.

Methodology

The researchers evaluated two distinct machine learning paradigms: unsupervised clustering and sequence-based deep learning.

Traditional Clustering (K-Means & HDBScan)

The first approach utilized K-Means and HDBScan. Syslog messages were vectorized using a "bag-of-words" model, which counts word frequencies. The Bayesian Information Criterion (BIC) was used to attempt to find an optimal number of clusters. This method focuses purely on the textual content of individual messages.

LSTM Networks

In contrast, the authors implemented a Long-Short Term Memory (LSTM) network, a type of Recurrent Neural Network (RNN) specifically designed for sequence data. Unlike traditional clustering, the LSTM was trained on the order of messages to capture temporal relationships.

Preprocessing: To ensure the model learned general error patterns rather than specific device identities, variables such as IP addresses, timestamps, and usernames were stripped from the logs.

Architecture: The model follows a many-to-one architecture. As shown in Figure 4, the network takes a sequence of 15 messages as input to predict the subsequent message in the stream. The architecture includes multiple LSTM layers followed by a dense layer and an activation function.

LSTM Architecture

Hidden State Analysis: Beyond simple prediction accuracy, the authors analyzed the activations of hidden neurons. They discovered that individual units specialized in specific network events (e.g., login attempts vs. hardware errors), allowing the LSTM to function as a sophisticated feature extractor for clustering.

Dataset and Experimental Setup

The study utilized real-world data from a Comcast Splunk database. The initial dataset of over 2.3 million messages was filtered to a subset of 347,264 messages from January 2017 to ensure data quality. This dataset encompassed 1,288 distinct message types.

Key Insights

Content vs. Context

A primary finding was that K-Means often failed because it prioritized word similarity over operational context. If two unrelated errors shared common vocabulary, they were incorrectly grouped. Furthermore, traditional clustering frequently fell into the "Super Cluster" trap, where a high volume of routine "noise" messages created a single massive cluster that obscured meaningful errors.

Temporal Causality and Neuron Specialization

LSTMs proved superior by identifying sequences of "low-level" messages that consistently preceded "high-level" failures. This capability shifts network monitoring from reactive troubleshooting to proactive warning. The analysis revealed that specific hidden units became specialists; for instance, one unit might only fire during SSH/login events, while another focused exclusively on EEPROM reading errors.

Results and Discussion

  • Performance: K-Means was computationally fast but qualitatively poor, with only 20% of its clusters showing promise for actual troubleshooting.
  • Accuracy: The LSTM model achieved a 73% validation accuracy in predicting the next syslog message.
  • Operational Efficiency: Once trained, the LSTM processed 15 minutes of log data in under 20 seconds, comfortably meeting the operational requirement of sub-minute processing for real-time monitoring.
  • Qualitative Success: The LSTM-based clustering successfully grouped messages that were temporally related, even when their text formats differed significantly. Figure 5 illustrates how different clusters successfully isolate specific categories of issues, such as memory parity errors (Cluster 9) or power supply and fan failures (Cluster 23).
Qualitative Clustering Results

Conclusion and Future Work

This research serves as a successful proof of concept for sequence-based network monitoring. While the current model demonstrates high accuracy and operational efficiency, future work will focus on improving generalization across different router vendors and integrating "Attention" mechanisms. Adding an attention layer would provide interpretability, helping engineers understand which specific messages in a sequence most influenced a failure prediction. Ultimately, the goal is to move toward a system that provides exact probabilities of major network failures based on the current stream of minor log events.

Summary updated

BibTeX
@misc{nadeem2018automating,
  author = {Moin Nadeem and Vibhor Nigam and Dimosthenis Anagnostopoulos and Patrick Carretas},
  title = {{Automating Network Error Detection using Long-Short Term Memory Networks}},
  year = {2018},
  eprint = {1806.02000},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.02000},
}
Figure