Learned models of physical systems that update themselves while running have one blunt tool for abrupt change: when prediction error spikes, they throw away their memory of recent observations and start over. That works for a cart-pole whose mass suddenly changes. It is dangerous for a magnetized plasma jet. When such a jet kinks, only part of the dynamics changes: energy moves from a straight column into a helical mode, while the pumping flow that feeds the jet keeps behaving as before. A model that erases everything is left uninformed, with no usable recent context, exactly when the plasma is least forgiving. We propose summarizing the recent sensor stream as a density matrix, the trace-one positive matrix used in quantum mechanics and, more recently, in text models to represent mixtures. Here it describes how signal energy is spread across a small set of spatial modes and how those modes are phase-locked to one another. When the predicted and observed matrices diverge, their difference tells us which modal subspace changed. We forget only the context tied to that subspace and keep the rest.
The core claim is simple and testable. On streaming magnetic-probe data from a pumped, collimating plasma jet passing through its kink transition, this subspace-selective reset should recover prediction accuracy faster than a full reset, and it should carry less leftover error than a sliding window. The density matrix is doing the work only if it also beats an ordinary covariance-based change detector. We treat that comparison as the result that decides whether the idea survives.
Why this regime, and what is missing
The physical setting is magnetohydrodynamic (MHD) pumping, the process by which electromagnetic forces drive conducting gas. You, Yun and Bellan showed that flared magnetic field lines produce an axial force that sucks neutral gas into a jet. The jet reaches about 100 km/s, near the Alfvén speed, and 10^3 to 10^4 times the local background density. Flux piling up where the flow stalls then pinches the column narrow. Bellan, You and Yun placed this pumping inside a six-stage spheromak formation sequence lasting 10–20 µs. In that sequence, the lengthening column crosses the Kruskal–Shafranov threshold and kinks into a helix, which is a discrete change in which modes carry the energy. This is the regime that motivates the work: it is non-stationary, but only partially. Pumping continues through the kink, so some of the old dynamics stay valid after the transition.
Existing learning-based plasma control does not adapt online. The TCV controller of Degrave et al. is a fixed network trained in a force-balance simulator with randomized physics. The authors attribute its steady elongation offsets to its lack of memory. Its simulator also sets flow to zero, so it cannot represent pumping at all. The offline tokamak work in the file, such as offline model-based RL for tokamaks and the HL-3 dynamics model, learns from shot databases and does not update during a discharge. The differentiable MRX solver preserves structure exactly, but it solves for equilibria and needs about 14 hours per relaxation. It constrains our design: no first-principles solve can sit inside the loop.
The adaptation methods supply our machinery and our main competitors. Event-triggered neural processes use a sliding window of recent observations, a threshold on scalar prediction error derived from a concentration bound, and a full context flush when the threshold is crossed. They show that long windows (w300) without triggers fail cart-pole swing-up after a parameter jump. Implicit identification (IIDA) encodes a short interaction history into a flat latent vector. Both treat change as all-or-nothing. That is the gap we target: a full flush after an instability starts leaves the model unconditioned for several instability growth times.
The density-matrix literature supplies the representation, though only by analogy. Zhang et al. build sentence density matrices as weighted sums of outer products of word vectors. Sordoni, Bengio and Nie optimize concept density matrices with quantum relative entropy. Qiao et al. use trace-distance "difference matrices" to separate literal from metaphorical meaning. All three work on static token sequences. None update online, and none work on physical fields. We borrow the construction (weighted outer products), the comparison (trace distance), and the idea that diagonal and off-diagonal entries carry different information. We do not claim their NLP gains transfer.
Core construction
Project each snapshot of the magnetic-probe array onto $k$ spatial modes, with $k$ around 8–16. The modes are computed once, offline, from training shots. Take the analytic signal (via a Hilbert transform) of the resulting mode amplitudes to get a complex vector $a_\tau \in \mathbb{C}^k$ at time $\tau$. The window density matrix is
$$\rho_t = \frac{\sum_{\tau \in W_t} w_\tau\, a_\tau a_\tau^\dagger}{\sum_{\tau \in W_t} w_\tau\, \|a_\tau\|^2},$$
where $W_t$ is the recent window and $w_\tau$ are per-sample weights. The weights start at one and are what selective forgetting modifies.
Each entry has a physical reading. The diagonal is the fraction of energy in each mode. The von Neumann entropy $S(\rho_t) = -\operatorname{Tr}\rho_t \ln \rho_t$ measures how many modes effectively share that energy. Complex off-diagonal entries record phase locking. A rotating m=1 kink appears as a coherent cosine–sine pair with a definite phase, and the sign of that phase encodes the helix's handedness. This is a real reason to use complex numbers here rather than an imported formalism. Trace normalization separates how energy is distributed from how much energy there is, so a jet that simply brightens does not look like a regime change.
The dynamics model is a conditional neural process, a network that predicts the next probe snapshot from a set of recent context pairs. From the forecasts over the last few steps we form a predicted matrix $\rho^{\text{pred}}_t$. When the trace distance $D(\rho^{\text{pred}}_t, \rho^{\text{obs}}_t)$ exceeds a threshold calibrated on stationary segments to a fixed false-alarm rate, we eigendecompose $\Delta = \rho^{\text{obs}}_t - \rho^{\text{pred}}_t$. Eigenvectors with large eigenvalue magnitude span the changed subspace; call the projector onto it $P$. Each context sample is then reweighted by the fraction of its energy that lies outside the changed subspace, $\|(I-P)a_\tau\|^2/\|a_\tau\|^2$, so samples dominated by changed modes are forgotten. Samples describing the continuing pumping flow are kept. The computation involves $k\times k$ matrices with $k\le 16$, so the cubic cost that worries text applications is a few microseconds here.
Research Program
The work has three stages. First, we build a simulated diagnostic stream. We will run a resistive MHD simulation of a line-tied, current-driven column fed by an axial mass source, with synthetic probe arrays and camera-like line-integrated emission. We sweep gun current so that shots cross q=1 at different times, and we add known probe noise. This gives ground-truth kink onset times and ground-truth modal content, which the lab cannot provide. Second, we replay archival Caltech jet-experiment shots as a stream: magnetic probe arrays, plus 2-million-frame-per-second camera frames used only for labeling the onset. The file notes these shots have no standardized public dataset, so this depends on collaboration and data curation. Third, as a sanity check, we run the method unchanged on the Van-der-Pol and cart-pole parameter-jump tasks from Brunzema et al.. There we build $\rho$ from delay-embedded state vectors and confirm that the method does no harm where full flushes are appropriate.
We are explicit about scope. The laboratory kink unfolds over microseconds, so this is streaming prediction and filtering in replay, not closed-loop control of the jet. The link to real-time control is the latency budget: a $k\le16$ eigendecomposition fits within TCV's 100 µs cycle. Hardware control is left for later.
Baselines
The naive reference is a fixed-weight network trained on randomized simulated physics with no online updating, in the style of Degrave et al.. It shows how much adaptation matters at all in this regime. A second reference is a long sliding window with no trigger, which Brunzema et al. show keeps stale data after a jump.
The strongest existing method is the event-triggered conditional neural process of Brunzema et al.: the same network, scalar-error concentration trigger, and full flush. It is the only method in the file designed for abrupt jumps. The file reports qualitative recovery "within seconds" on cart-pole, and no reported result found on Lacuna for its numerical prediction error. We also run IIDA's recurrent context encoder as the strongest flat-latent competitor. Its reported figures (an average 63% MSE reduction over baselines on MuJoCo, and 57.1% versus 42.6% for domain randomization on the UR10 arm, from IIDA) are on robotics, not plasma. For every plasma task in this proposal, there is no reported result found on Lacuna.
All methods share the same network backbone, window length, training shots, and a matched hyperparameter search budget. Trigger thresholds are set so that every method has the same false-alarm rate on stationary segments.
Beating the strongest baseline means two things at matched false alarms: lower prediction error integrated over the recovery interval after kink onset, and no worse error in steady state. The ablations isolate each ingredient. We pair the density-matrix trigger with a full flush, to separate detection from selective forgetting. We use a real-valued rather than complex $\rho$, to test whether phase coherence matters. Finally, we run an unnormalized covariance trigger with a CUSUM detector, together with the same subspace reweighting. This last ablation is the decisive threat.
Why not just…?
Why not just add memory to the policy, as Degrave et al. suggest? A recurrent network can absorb slow drift, and IIDA-style encoders are exactly this. But nothing in a flat recurrent state says which part of the context became invalid at a discrete transition. Brunzema et al.'s long-window failure is the same stale-memory problem in another form. We include IIDA's encoder, and if it matches selective reset over the recovery interval, the explicit mechanism is unnecessary.
Why not just detect change on an ordinary covariance matrix? This is the most serious threat. Our $\rho$ is a trace-normalized, complex second-moment matrix, and a well-tuned covariance change detector may catch kink onset just as early. The contribution would then shrink to eigenvector-based selective forgetting plus the normalization. The covariance-plus-CUSUM ablation settles this directly. If it matches on detection lead time and recovery error, we will report the method as covariance-subspace forgetting and drop the density-matrix framing.
Why not just estimate physical parameters online with a Kalman filter? The quantities that govern the kink, such as internal current profile, the safety factor at depth, and pile-up density, are not observable from external probes in real time. IIDA found that implicit identification beat an explicit model even when the explicit model had ground-truth parameters. We still run an extended Kalman filter on a reduced circuit model in simulation, where the true safety factor is known, to test this in the plasma setting.
Why not just use a small sliding window? Brunzema et al. show that small windows make steady-state predictions jittery. Pumping-phase noise would pay that cost continuously. We run windows at several lengths to trace the tradeoff curve that selective reset is supposed to beat.
Proposed Experiments
The decisive checks are three.
The first is detection lead time at matched false-alarm rate. In simulation we know the q=1 crossing exactly and compare the trace-distance trigger against the scalar-error and covariance triggers. We expect the density trigger to fire earlier. The coherent m=1 pair should appear in the off-diagonal entries before it dominates prediction error, and the real-valued ablation should lose that lead.
The second is prediction error after onset. We integrate normalized probe-prediction error over the five to ten e-folding times after onset. Selective reset should cut this well below the full flush while matching it in steady state. We will also check that the retained context is the pumping subspace, using the simulation's ground-truth mode energies.
The third is transfer to archival laboratory shots, with onset labeled from the camera. Here we report whether the simulation ranking of methods survives real noise and imperfect modes.
The kill criterion is stated in advance. If the covariance-plus-CUSUM ablation equals the full method on both lead time and recovery error, the density matrix adds nothing, and the paper becomes a result about subspace-selective forgetting alone.
References
- Dynamic and Stagnating Plasma Flow Leading to Magnetic-Flux-Tube Collimation
- Identification of the Sequence of Steps Intrinsic to Spheromak Formation
- Magnetic control of tokamak plasmas through deep reinforcement learning
- Offline Model-Based Reinforcement Learning for Tokamak Control
- High-Fidelity Data-Driven Dynamics Model for Reinforcement Learning-based Control in HL-3 Tokamak
- MRX: A differentiable 3D MHD equilibrium solver without nested flux surfaces
- Neural processes with event triggers for fast adaptation to changes
- Context is Everything: Implicit Identification for Dynamics Adaptation
- End-to-End Quantum-like Language Models with Application to Question Answering
- Learning Concept Embeddings for Query Expansion by Quantum Entropy Minimization
- A Quantum-Inspired Matching Network with Linguistic Theories for Metaphor Detection