Stable Self-Modulating Quantum Fast-Weight Programmers with Bounded Memory Gates

Kuo-Chung Peng, Jiun-Cheng Jiang, Chun-Hua Lin, Yifeng Peng, Junghoon Justin Park, Huan-Hsin Tseng, Hsin-Yi Lin, Kuan-Cheng Chen, Chen-Yu Liu, Shinjae Yoo, Samuel Yen-Chi ChenarXiv 2026

TL;DR

Quantum Fast-Weight Programmers (QFWPs) offer a parallelizable, BPTT-free alternative to recurrent quantum neural networks for sequence modeling. However, introducing input-dependent "self-modulation" gates to improve accuracy can cause the model to numerically diverge over long sequences. This paper introduces a simple, sign-preserving tanh bound to the memory retention gate, eliminating long-sequence divergence while preserving the model's superior forecasting performance.

What Problem Does This Paper Address?

Modeling sequential data with quantum circuits typically relies on architectures like Quantum LSTMs. However, these models suffer from a major bottleneck: they require Backpropagation Through Time (BPTT) through a time-ordered series of nonlinear quantum states, which is computationally expensive and gradient-intensive.

Quantum Fast-Weight Programmers (QFWPs) bypass this by eliminating the traditional hidden state. Instead, a classical "slow" network dynamically updates the parameters (the "fast weights") of a variational quantum circuit. While a recent extension called Self-Modulating QFWP introduced input-dependent gates to control how past memory is retained or amplified, it introduced a new flaw: because the old-state multiplier is unconstrained, repeated multiplications over long sequences cause the parameters to geometrically explode, leading to gradient divergence.

Methods

The authors propose a bounded old-state modulation rule to stabilize the architecture.

In a standard Self-Modulating QFWP, the fast-weight parameters $\Theta_t$ are updated by balancing a new update matrix $\Delta_t$ and the previous state $\Theta_{t-1}$, each scaled by an input-dependent modulation matrix ($M_t^{new}$ and $M_t^{old}$):

$$\Theta_t = \Delta_t \odot M_t^{new} + \Theta_{t-1} \odot M_t^{old}$$

To prevent $M_t^{old}$ from causing geometric growth, the authors apply a element-wise tanh activation function specifically to the old-state gate:

$$\tilde{M}_t^{old} = \tanh(M_t^{old})$$

This bounds the recurrent multiplier strictly between $[-1, 1]$. The authors specifically chose tanh because it is sign-preserving, smooth, and behaves like an identity function near zero, avoiding the non-negative restriction that a standard sigmoid gate would impose.

Datasets

The architecture was evaluated on three distinct time-series forecasting tasks:

  1. Open Jaynes-Cummings Dynamics: A simulated open quantum system (a two-level qubit coupled to a cavity mode) generated using the CUDA-Q Dynamics backend, predicting qubit excitation probability.
  2. Dispersive Transmon-Resonator Dynamics: A simulated closed quantum system, predicting the resonator position quadrature.
  3. Milan Telecommunication Activity Dataset: A noisy, real-world urban spatiotemporal dataset used to forecast SMS activity across 100 spatial grid cells in Milan, Italy.

Key Insights and Ideas

  • Memory Modulation is the Real Driver: Through ablation studies (comparing "Only-New" vs. "Only-Old" modulation branches), the authors discovered that the performance gains in Self-Modulating QFWPs are almost entirely driven by how the model filters and retains past memory ($M_t^{old}$), rather than how it modulates new inputs.
  • The Danger of Unbounded Recurrence: Unbounded multipliers work fine for short sequences, but as the sequence length ($N$) scales to 32 or 64, geometric amplification reliably triggers numerical instability and training failures.
  • Stabilization Without Sacrifice: Restricting the memory gate with a tanh function successfully eliminates long-sequence divergence without degrading the model's ability to capture complex, long-range temporal dynamics.

Key Results

  • Eliminating Divergence: In quantum dynamics configurations where the original unbounded Self-Modulating QFWP failed to complete training due to gradient explosion, the bounded version successfully converged and achieved low mean-squared error (MSE).
  • Faster Convergence and Better Tracking: On the Jaynes-Cummings benchmark, standard QFWP suffered from noisy, amplitude-mismatched predictions. In contrast, the Self-Modulating variants tracked the oscillatory decay accurately and much earlier in training.
Fig. 1. Prediction trajectories at hidden size H = 10 and sequence length N = 32 on both benchmarks. Rows show epochs 10, 20, 50, and 100; columns compare Standard QFWP and full Self-Modulating QFWP on Jaynes–Cummings and transmon-resonator dynamics.
  • Long-Sequence Superiority: As shown in the convergence curves below, the advantage of self-modulation becomes starkest at longer sequence lengths ($H=14, N=64$), where standard QFWP performance degrades significantly.
Fig. 2. Representative test-MSE convergence curves for (H, N) = (4, 4), (10, 16), and (14, 64). Columns show Jaynes–Cummings and transmon-resonator dynamics; curves compare Standard QFWP, full Self-Modulating QFWP, Only-Old, and Only-New.
  • Real-World Transfer: On the Milan SMS dataset, the self-modulating framework demonstrated clear benefits over the standard baseline at longer input windows ($N=64$), achieving paired win rates above 0.7 across various hidden sizes.

Limitations and Future Work

The authors note that the bounded modification was not exhaustively swept across the Milan telecommunication dataset because the unbounded version happened to remain stable under that specific protocol. Consequently, the absolute necessity of the bounded gate for all types of noisy, real-world classical data remains an open question. Future work includes exploring broader real-world applications and establishing formal theoretical guarantees for the bounded fast-weight update dynamics.

Summary updated

BibTeX
@misc{peng2026stable,
  author = {Kuo-Chung Peng and Jiun-Cheng Jiang and Chun-Hua Lin and Yifeng Peng and Junghoon Justin Park and Huan-Hsin Tseng and Hsin-Yi Lin and Kuan-Cheng Chen and Chen-Yu Liu and Shinjae Yoo and Samuel Yen-Chi Chen},
  title = {{Stable Self-Modulating Quantum Fast-Weight Programmers with Bounded Memory Gates}},
  year = {2026},
  eprint = {2607.02363},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.02363},
}
Figure