Neural Controlled Differential Equations with Quantum Hidden Evolutions

Lingyi Yang, Zhen Shao · DOI

Introduction

Modeling sequential data is a fundamental challenge in artificial intelligence, with applications spanning finance, healthcare, and signal processing. While Neural Controlled Differential Equations (NCDEs) have emerged as a powerful continuous-time framework for this task, they often encounter difficulties related to numerical stability and overfitting. To address these challenges, we introduce Neural Quantum Controlled Differential Equations (NQDEs). This novel class of models integrates principles from quantum mechanics—specifically the Schrödinger equation and unitary evolution—to provide a physically-inspired regularization that enhances stability and performance in sequential modeling.

The NQDE Framework

The core innovation of NQDEs lies in treating the hidden state of a neural network as a quantum wave function. Unlike traditional architectures that use real-valued latent spaces, NQDEs employ complex-valued hidden states $z_t$. The dynamics of these states are governed by a driven version of the Schrödinger equation: $$dz_t = -iHz_t dX_t$$ where $X_t$ represents the input control path and $H$ is a Hamiltonian matrix representing the system's logic.

To maintain the physical integrity of the system and prevent gradient issues such as exploding or vanishing gradients, the evolution must be unitary. We explore two primary methods for enforcing these constraints:

  1. ProjUNN: A method that projects matrices back into the unitary space using rank-$k$ approximations.
  2. GeoTorch: A manifold-based approach for enforcing orthogonal constraints.

The transition from the complex latent space to a real-valued output is handled by a "collapse" function, inspired by the Born interpretation. This function computes the squared modulus of the complex state and normalizes it to produce a probability distribution for classification.

Experimental Setup

We evaluated four architectural variants of NQDEs (NQDE1–4) on the bi-directional spiral dataset, a standard benchmark for non-linear classification. The dataset consisted of 128 spirals, testing the models' data efficiency and ability to learn complex dynamics from limited information.

Hyperparameter configurations for the NQDE experiments.

As shown in the hyperparameter table above, all models were trained for 20 epochs with a linear layer size of 32. Learning rates were set to 0.002 for the ProjUNN variants (unn) and 0.001 for the GeoTorch variants (geo).

Results and Discussion

All NQDE variants achieved perfect classification accuracy (1.000) on the spiral task, demonstrating the robustness of the quantum-inspired approach. However, significant differences emerged in terms of computational efficiency and optimization.

Performance comparison of NQDE variants on the spiral dataset.

The results in the table above highlight NQDE1_unn as the most efficient model. It achieved the lowest final loss (0.00028) and required the fewest backward Number of Function Evaluations (NFE), totaling 2337.67. In contrast, the GeoTorch-based variants (NQDE3 and NQDE4) were computationally more expensive, requiring nearly double the NFEs of their ProjUNN counterparts. This suggests that ProjUNN's rank-$k$ approximations offer a superior balance between maintaining unitary constraints and computational speed.

Furthermore, the timing of class representation concatenation proved critical. NQDE1, which concatenates representations before the final linear layer, outperformed variants that used different architectural configurations.

Conclusion

NQDEs represent a promising intersection of quantum physics and deep learning. By leveraging unitary dynamics, these models provide natural regularization that ensures stable training and high data efficiency. While these initial results on synthetic datasets are encouraging, future work will focus on scaling NQDEs to high-dimensional real-world sequences and conducting rigorous comparisons against other state-of-the-art sequence models.

Summary updated

BibTeX
@inproceedings{yang2024neural,
  author = {Lingyi Yang and Zhen Shao},
  title = {{Neural Controlled Differential Equations with Quantum Hidden Evolutions}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=vQUq4DVeu6},
}
Figure