Enhancing Echo State Networks with Gradient-based Explainability Methods

Francesco Spinnato, Andrea Cossu, Riccardo Guidotti, Andrea Ceni, Claudio Gallicchio, Davide Bacciu

Introduction

Recurrent Neural Networks (RNNs) are powerful tools for temporal data analysis, yet their high computational cost often limits their deployment in resource-constrained environments. Echo State Networks (ESNs) provide a "green" alternative by utilizing a fixed, random recurrent reservoir and only training the final readout layer. Despite their efficiency, ESNs often suffer from "tunnel vision"—standard readout mechanisms typically rely on the final reservoir state or a simple average, making them highly susceptible to noise distributed throughout the sequence.

This research explores a novel approach to enhance ESN robustness by integrating Gradient-based Explainability (XAI) methods. By leveraging importance scores to weight hidden states, the model learns to prioritize signal over noise, effectively using its own internal explanations to refine performance.

Methodology: XAI-Driven State Aggregation

The authors propose a "one-shot" enhancement technique that replaces simple state averaging with a weighted average based on gradient sensitivity. The process involves three primary steps:

  1. Base Model Training: A standard ESN is initially trained using a simple average of all reservoir states.
  2. Importance Extraction: XAI methods are applied to calculate the gradient of the output with respect to each input point, identifying which time steps most significantly influence the prediction.
  3. Weighted Retraining: These importance scores are normalized and used as weights to create a single aggregated hidden state. The readout layer is then retrained once using this refined representation.
Comparison of raw input signal and reservoir states (left) versus importance-weighted versions (right).

Three XAI variants were evaluated: raw Gradient, Gradient*Input (accounting for signal magnitude), and GradientSHAP (using baseline comparisons).

Experimental Setup

The methodology was benchmarked across 30 binary classification datasets from the UCR time series repository. To evaluate robustness, varying levels of Gaussian noise were injected into the data, ranging from clean signals to "10x noise" scenarios where noise duration significantly exceeded the original signal length.

Results and Discussion

The experimental results highlight several key findings:

  • Superiority of Gradient*Input: The GRAD*INP method emerged as the most effective, consistently outperforming both standard baselines and more complex methods like GradientSHAP. The latter's reliance on random baselines proved less effective for structured time-series data.
  • Noise Robustness: While performance was comparable on clean data, the gap widened significantly under noisy conditions. At high noise levels, the GRAD*INP method maintained an F1-score of 0.69, whereas the traditional "Last State" approach plummeted to 0.47.
  • Computational Efficiency: As a one-shot enhancement, the method adds minimal overhead, preserving the speed advantages that make ESNs attractive for edge computing.

Conclusion

By treating XAI as a feedback mechanism rather than just a post-hoc explanation tool, this research demonstrates that "self-aware" models can achieve significantly higher robustness. While currently limited to binary classification, future work aims to extend this framework to multiclass problems and time-series regression, potentially revolutionizing lightweight reservoir computing for real-time sensor analysis.

Summary updated

BibTeX
@inproceedings{spinnato2024enhancing,
  author = {Francesco Spinnato and Andrea Cossu and Riccardo Guidotti and Andrea Ceni and Claudio Gallicchio and Davide Bacciu},
  title = {{Enhancing Echo State Networks with Gradient-based Explainability Methods}},
  booktitle = {ESANN},
  year = {2024},
  doi = {10.14428/esann/2024.es2024-78},
}
Figure