Neural Memory Plasticity for Anomaly Detection

Tharindu Fernando, Simon Denman, David Ahmedt-Aristizabal, Sridha Sridharan, Kristin R. Laurens, Patrick J. Johnston, Clinton FookesarXiv 2019 · arXiv

Abstract

Anomaly detection in medical diagnostics is challenged by the high variability of "normal" physiological patterns across individuals. Traditional Neural Memory Networks (NMNs) often struggle with this variability due to their reliance on static attention weights and the inherent recency bias of LSTM components. This paper presents a "plastic" neural memory architecture that incorporates differentiable plasticity and Hebbian learning principles. By allowing connection weights to evolve dynamically for each input, the model achieves superior performance in identifying anomalies in EEG and MRI data. Experimental results show significant accuracy improvements over state-of-the-art static models, particularly in complex tasks like schizophrenia risk detection.

Introduction

Detecting anomalies in medical data—such as EEG heartbeats or MRI scans—is a critical yet difficult task. The primary challenge lies in the definition of "normal," which varies significantly between patients. A feature that indicates a pathology in one individual might be a benign variation in another.

Existing Neural Memory Networks (NMNs) utilize an external memory "scratchpad" to store and retrieve information. However, these networks typically employ static attention weights learned during training, making them too rigid to adapt to the nuances of individual medical samples. Furthermore, the Long Short-Term Memory (LSTM) units frequently used in these architectures suffer from "recency bias," where the model prioritizes the most recent data points at the expense of long-term dependencies that are often crucial for defining an anomaly.

Methodology: Plastic Neural Memory

To overcome these limitations, we propose a Plastic Neural Memory mechanism. The core innovation is the introduction of differentiable plasticity into the read, write, and output controllers of the memory module.

In this architecture, every connection weight ($w$) is decomposed into two distinct components:

  1. A Fixed Component: A standard weight optimized during the training phase.
  2. A Plastic Component: A "Hebbian trace" that evolves dynamically as the model processes a specific input.

This design is inspired by the biological principle that "neurons that fire together, wire together." As the model encounters a specific EEG signal or MRI slice, it temporarily modifies its internal weights to emphasize the most salient features of that particular sample.

Schematic representation of the Plastic Neural Memory architecture, featuring read, write, and output controllers interacting with a dynamic memory module.

The architecture utilizes two LSTM layers to generate an initial embedding of the input, which then queries the plastic memory. The final classification is performed by a dense layer with a softmax activation.

Experimental Setup

The model was rigorously evaluated across three diverse medical datasets:

  • TUH Abnormal EEG Database: A large-scale public dataset containing nearly 3,000 recordings categorized as normal or abnormal.
  • MRI Brain Tumor Database: A collection of 3,064 images from 233 patients, used for classifying Meningioma, Glioma, and Pituitary tumors.
  • Schizophrenia Risk EEG: A specialized dataset focusing on children (ages 9–12) who are either at-risk for schizophrenia or typically developing.

Results and Discussion

The Plastic NMN consistently outperformed traditional machine learning baselines (SVM, Random Forest) and standard deep learning architectures (CNNs, vanilla NMNs).

  • Abnormal EEG Detection: Achieved 93.2% accuracy, a significant improvement over the standard memory model's 83.4%.
  • MRI Tumor Classification: Reached 97.54% accuracy, outperforming the previous state-of-the-art of 94.46%.
  • Schizophrenia Risk Detection: Achieved 93.85% accuracy, whereas a standard CNN managed only 76.33%.

Key Insights

  • Sparsity and Saliency: Plastic memory produces sparser outputs compared to traditional attention-based memory. By dynamically weakening irrelevant connections, the model effectively filters out noise to focus on diagnostic cues.
  • Contextual Anchoring: Unlike standard LSTMs, the plastic memory serves as a long-term anchor, enabling the model to maintain context across long sequences and avoid recency bias.
  • Computational Efficiency: The model is highly efficient, capable of generating 1,000 predictions in approximately 13 seconds on a standard single-core CPU. This makes it a viable candidate for real-time clinical applications.

Visual analysis using Principal Component Analysis (PCA) further confirmed that the plastic memory creates a much clearer separation between classes in the embedding space than static models.

Conclusion and Future Work

While the Plastic NMN offers significant performance gains, it faces a computational trade-off: runtime grows exponentially with the embedding dimension ($k$), although it scales linearly with memory length ($l$). Future research will focus on extending this framework to multimodal inputs (e.g., simultaneous EEG and MRI analysis) and leveraging the inherent sparsity of plastic memory to provide automated summarizations of complex medical recordings for clinicians.

Summary updated

BibTeX
@misc{fernando2019neural,
  author = {Tharindu Fernando and Simon Denman and David Ahmedt-Aristizabal and Sridha Sridharan and Kristin R. Laurens and Patrick J. Johnston and Clinton Fookes},
  title = {{Neural Memory Plasticity for Anomaly Detection}},
  year = {2019},
  eprint = {1910.05448},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.05448},
}
Figure