Efficient Cross-Validation of Echo State Networks

Mantas Lukosevicius, Arnas Uselis

TL;DR

This paper introduces novel, computationally efficient cross-validation schemes for Echo State Networks (ESNs), a type of recurrent neural network well-suited for time series tasks. By optimizing the validation process, these methods allow for more robust hyper-parameter tuning without significantly increasing computational cost, making ESNs more practical for real-world applications.

What Problem Does This Paper Address?

Echo State Networks (ESNs) are powerful for time series learning due to their rapid "one-shot" training. However, achieving optimal performance hinges on careful hyper-parameter tuning. Traditionally, ESNs are validated using a single train-validation split, which can be unreliable and lead to suboptimal model choices. While cross-validation is a standard technique for more robust evaluation in other machine learning domains, its application to time series data, especially with ESNs, presents unique challenges. The paper aims to bridge this gap by proposing and evaluating efficient cross-validation strategies specifically tailored for ESNs, ensuring that the validation process itself doesn't become a computational bottleneck.

Methods

The core contribution lies in developing and analyzing several new cross-validation schemes for ESNs, moving beyond the standard single split. These include:

  • k-fold Cross-Validation (CV): The data is split into $k$ equal folds, and the model is trained and validated $k$ times, each time using a different fold for validation and the rest for training.
  • k-fold Accumulative Validation (AV): Similar to CV, but training is performed only on data preceding the current validation fold. This mimics scenarios where new data becomes available over time.
  • k-fold Walk Forward Validation (FV): This scheme keeps the training data length constant, always using a fixed "minimal" amount of data preceding the validation fold. This is useful for non-stationary data.

Crucially, the authors propose an efficient algorithm for implementing these schemes. The key innovation is to pre-compute and store matrices like $XX^T$ and $Y_{target}X^T$ once for the entire dataset. This allows the ESN to be rerun through the data only a few times, regardless of the number of folds ($k$), significantly reducing the computational overhead compared to a naive implementation. The time complexity of preparing the necessary matrices is pushed down from $O(kN_1^2T)$ to $O(N_1^2T)$, and the overall complexity becomes $O(N_1^2T + kN_1^3)$, which is a substantial improvement, especially when $k$ is large or $T$ is much larger than $N_1$.

Datasets

The paper evaluates the proposed methods on several real-world datasets:

  • Labour: "Monthly unemployment rate in US from 1948 to 1977" (univariate, small size).
  • Gasoline: "US finished motor gasoline product supplied" (univariate, medium size).
  • Sunspots: "Monthly numbers of sunspots" (univariate, larger size).
  • Electricity: "Half-hourly electricity demand in England" (univariate, largest size).
  • Japanese Vowels: A benchmark dataset for time series classification, consisting of LPC cepstrum coefficients from male speakers.

These datasets represent a range of sizes and characteristics, allowing for a comprehensive evaluation of the validation schemes across different scenarios, including generative tasks and classification.

Key Insights and Ideas

  • Cross-validation is crucial for ESNs: The paper strongly suggests that a single validation split (SV) is often insufficient for reliably tuning ESN hyper-parameters, especially for non-stationary time series data.
  • AV and FV outperform SV/CV on non-stationary data: For tasks where the underlying data-generating process "drifts" over time, validation schemes that consider the temporal order of data (like AV and FV) are more effective at selecting hyper-parameters that generalize well.
  • Efficient implementation makes cross-validation feasible: The proposed algorithm dramatically reduces the computational cost of $k$-fold cross-validation for ESNs, making it a practical alternative to single split validation without a significant time penalty.
  • Retraining the final model is often beneficial: For generative tasks, retraining the ESN on all available training and validation data after selecting the best hyper-parameters often yields the best results, especially when data is scarce.
  • Individual regularization can further improve performance: Applying regularization individually to each split during cross-validation, especially for classification tasks, can lead to further improvements in both validation and testing errors.

Key Results

  • Generative Tasks: In experiments on generative datasets, AV and FV consistently found hyper-parameters that produced better generalizing models compared to SV and CV. For instance, on the Labour dataset, AV and FV achieved significantly lower testing NRMSEs when retrained.
  • Time Series Classification: All CV variations (CV, AV, FV, and their "IReg" counterparts) outperformed SV variations in terms of validation error, testing error, and misclassifications. Specifically, "CV IReg Averaged" achieved the best results, with at least one model achieving only 2 test misclassifications on the Japanese Vowels dataset.
  • Computational Efficiency: The proposed efficient implementation of $k$-fold cross-validation for ESNs achieves a significant speedup, allowing for $k$-fold cross-validation with nearly the same time complexity as a simple one-shot validation in many practical scenarios.

Limitations and Future Work

  • No single winner: The paper acknowledges that there isn't a universally best validation scheme; the optimal choice depends on the specific characteristics of the dataset (e.g., stationarity, data scarcity).
  • Stationary data: For stationary and ample datasets, the benefits of cross-validation might be less pronounced, and a simple validation split could suffice.
  • Future work: The paper suggests that the proposed efficient cross-validation methods can be adapted to other reservoir computing types and potentially other readout mechanisms. Further exploration of weighting schemes for combining models from different splits could also be beneficial. The paper also touches upon the importance of how the final trained model is produced from cross-validation results, hinting at further avenues for research.

Summary updated

Abstract

Echo State Networks (ESNs) are known for their fast and precise one-shot learning of time series. But they often need good hyper-parameter tuning for best performance. For this good validation is key, but usually, a single validation split is used. In this rather practical contribution we suggest several schemes for cross-validating ESNs and introduce an efficient algorithm for implementing them. The component that dominates the time complexity of the already quite fast ESN training remains constant (does not scale up with k) in our proposed method of doing k-fold cross-validation. The component that does scale linearly with k starts dominating only in some not very common situations. Thus in many situations k-fold cross-validation of ESNs can be done for virtually the same time complexity as a simple single split validation. Space complexity can also remain the same. We also discuss when the proposed validation schemes for ESNs could be beneficial and empirically investigate them on several different real-world datasets.
BibTeX
@inproceedings{lukosevicius2019efficient,
  author = {Mantas Lukosevicius and Arnas Uselis},
  title = {{Efficient Cross-Validation of Echo State Networks}},
  booktitle = {ICANN (Workshop)},
  year = {2019},
  url = {https://openreview.net/forum?id=KNh5EKFI1i},
}

Loading related content...

Figure