Quantum-Train Long Short-Term Memory: Application on Flood Prediction Problem

Chu-Hsuan Abraham Lin, Chen-Yu Liu, Kuan-Cheng ChenQCE 2024 · OpenReview

TL;DR

This paper introduces Quantum-Train (QT), a novel hybrid quantum-classical machine learning approach that significantly reduces the number of trainable parameters in Long Short-Term Memory (LSTM) models for flood prediction. By mapping classical neural network weights to a quantum state's probability distribution, QT enables efficient training and inference on classical hardware, making advanced flood forecasting more accessible.

What Problem Does This Paper Address?

Flood prediction is a critical task for climate change adaptation, but current models face challenges. Quantum Machine Learning (QML) offers potential advantages like processing multiple outcomes simultaneously, but practical applications are hindered by issues such as scaling problems with quantum circuits for larger datasets and the necessity of quantum hardware for inference. Classical methods, while effective, can be computationally intensive. This paper aims to bridge this gap by developing a QML-inspired technique that leverages the strengths of both classical LSTMs and quantum principles to create a more efficient and practical flood prediction model.

Methods

The core innovation is the Quantum-Train (QT) framework, which integrates with classical Long Short-Term Memory (LSTM) networks. Instead of directly replacing classical layers with quantum ones, QT uses a quantum neural network (QNN) to train the classical LSTM. Here's how it works:

  1. Mapping Classical Weights to Quantum States: The parameters (weights) of a classical LSTM model are mapped to a quantum state. This mapping is achieved by using a QNN whose parameters are adjusted to alter the probability distribution of measuring the quantum state. These probabilities are then used to derive the classical LSTM's parameters.
  2. Parameter Reduction: The QT approach significantly reduces the number of trainable parameters in the LSTM model. Instead of the original number of parameters (M), QT requires a number that scales polylogarithmically with M (PolyLog(M)). This is achieved by using a QNN with a specific ansatz and parameterized gates (like U3 and CU3).
  3. Classical Inference: Crucially, once trained, the QT-LSTM model operates entirely on classical hardware. This circumvents the major limitation of many QML approaches, which require quantum computers for inference.
  4. Flood Prediction Application: The trained QT-LSTM model is then applied to predict water levels, a key indicator for flood forecasting. The model's performance is evaluated using Mean Squared Error (MSE) and Mean Absolute Error (MAE) for water level prediction, and classification metrics for flood warning prediction.

Datasets

The study uses historical data for flood prediction, including:

  • Water levels and discharge rates from five river stations along the Wupper.
  • Water reservoir levels.
  • Weather data and forecasts from three weather stations.
  • Supplementary columns representing different time lags (1-7 data points) for the Kluserbrücke water levels.

The data is used for both training and testing the classical LSTM and the QT-LSTM models. The classification prediction task uses data from the year 2023, with a threshold of 100 cm for flood events.

Key Insights and Ideas

  • Parameter Efficiency is Key: The most significant insight is that QML principles can be leveraged not just for quantum speedups, but for drastically reducing the parameter count in classical models, leading to more efficient training and potentially better generalization.
  • Bridging the Quantum-Classical Divide: QT offers a practical pathway to utilize quantum concepts without requiring quantum hardware for inference. This makes advanced QML-inspired techniques accessible for real-world applications.
  • LSTM's Temporal Power Enhanced: By applying QT to LSTMs, the paper demonstrates that the temporal modeling capabilities of LSTMs can be enhanced or made more efficient through quantum-assisted training.
  • Trade-off Between Accuracy and Efficiency: While the QT-LSTM shows a slight decrease in predictive accuracy compared to a fully classical LSTM, this comes with a substantial reduction in trainable parameters and the benefit of classical inference. This trade-off is presented as a valuable proposition for practical deployment.

Key Results

  • Parameter Reduction: The QT-LSTM model reduced the number of trainable parameters from 40,451 in the classical LSTM to 18,830.
  • Water Level Forecasting:
    • Classical LSTM achieved an MSE of 38.02 and MAE of 4.19.
  • QT-LSTM achieved a higher MSE of 475.91 and MAE of 17.44, indicating lower accuracy in this specific metric.
  • Flood Warning Classification (for 2023 data):
    • Classical Model: True Warning (11.78%), Correct No Warning (85.75%), False Alert (0.00%), Missed Warning (2.47%).
  • QT-LSTM Model: True Warning (10.41%), Correct No Warning (84.11%), False Alert (1.64%), Missed Warning (3.84%).
  • While the classical model slightly outperformed QT-LSTM in classification metrics (fewer false/missed alerts), the QT-LSTM achieved comparable performance with significantly fewer parameters.
  • Training Time: The QT-LSTM training time was simulated as 11 hours on a classical computer, which is noted as not reflecting actual quantum computer training time.

Limitations and Future Work

  • Accuracy Trade-off: The QT-LSTM exhibits lower accuracy in water level forecasting (higher MSE/MAE) compared to the classical LSTM. The paper acknowledges this trade-off between parameter efficiency and predictive performance.
  • Simulation vs. Real Quantum Hardware: The training time for QT-LSTM was simulated on classical hardware. The actual training time on a real quantum computer remains to be determined and could be a significant factor.
  • Future Work: The authors suggest continuing to refine and expand QT capabilities, paving the way for more resource-efficient and broadly applicable ML models. They highlight the potential of QT for tackling complex ML problems, especially in resource-constrained environments. Further exploration into the broader implications of the QT approach for managing large-scale models with limited quantum resources is also implied.

Summary updated

Abstract

Flood prediction is a critical challenge in the context of climate change, with significant implications for ecosystem preservation, human safety, and infrastructure protection. In this study, we tackle this problem by applying the Quantum-Train (QT) technique to a forecasting Long Short-Term Memory (LSTM) model trained by Quantum Machine Learning (QML) with significant parameter reduction. The QT technique, originally successful in the “A Matter of Taste” challenge at QHack 2024, leverages QML to reduce the number of trainable parameters to a polylogarithmic function of the number of parameters in a classical neural network (NN). This innovative framework maps classical NN weights to a Hilbert space, altering quantum state probability distributions to adjust NN parameters. Our approach directly processes classical data without the need for quantum embedding and operates independently of quantum computing resources post-training, making it highly practical and accessible for real-world flood prediction applications. This model aims to improve the efficiency of flood forecasts, ultimately contributing to better disaster preparedness and response.
BibTeX
@inproceedings{lin2024quantum,
  author = {Chu-Hsuan Abraham Lin and Chen-Yu Liu and Kuan-Cheng Chen},
  title = {{Quantum-Train Long Short-Term Memory: Application on Flood Prediction Problem}},
  booktitle = {QCE},
  year = {2024},
  url = {https://openreview.net/forum?id=xDUSG9kNCv},
}
Figure