ControlJEPA: Principled Trajectory Regularization via Lyapunov Tube Loss

Thai Khanh Nguyen, Yen Nhi Pham, Vo Ngoc Bich Uyen, Thieu Vo, Cuong Pham, Tan Minh NguyenNeurIPS 2026

TL;DR

When Large Language Models (LLMs) generate text, their internal hidden states trace wild, unconstrained paths through representation space. ControlJEPA borrows a classic idea from control theory—Lyapunov stability—to gently guide these trajectories inside a well-behaved mathematical "tube" during training, without touching the model's architecture. The payoff? Up to 10% higher accuracy on reasoning tasks, better data efficiency, and smoother internal dynamics that stick around even when the training wheels come off at inference time.

What Problem Does This Paper Address?

Standard next-token prediction (NTP) is shortsighted. It grades a model token-by-token, imposing zero global structure on the trajectory of hidden states ($h_0, h_1, \dots, h_T$) unfolding inside the transformer.

Recently, researchers noticed the geodesic hypothesis: models generalize better when their internal representations move in straighter, more predictable lines. Prior methods (like Semantic Tube Prediction, or STP) tried to enforce this by penalizing sharp angles between consecutive steps.

Here’s the catch: controlling direction isn't the same as controlling distance. Imagine walking alongside a straight highway—even if you face forward, nothing stops you from drifting miles off into the desert. Existing angle-based regularizers lack any mathematical grip on the magnitude of trajectory drift, leaving concepts like "how wide is the allowable path?" completely undefined.

Methods

Instead of inventing a new neural architecture, the authors treat the transformer's step-by-step hidden state updates as a discrete-time dynamical system and bring in Input-to-State Stability (ISS) from control theory.

Figure 1: Lyapunov Tube. The displacement dt = ht −htstart is decomposed into a longitudinal component along the reference secant vgeo and a transversal error et ⊥vgeo. The Lyapunov Tube Loss penalizes violations of Vt+1 ≤γVt + τ, confining hidden-state trajectories within the tube. (Definition 3.2).

Here is how ControlJEPA works:

  1. Draw a Reference Line: Pick two semantic anchor states (start and end of a segment) and draw a straight vector between them ($v_{\text{geo}}$).
  2. Measure the Drift: At each intermediate token $t$, decompose the hidden state's movement into two parts: progress along the line, and perpendicular drift away from the line (the transversal error, $e_t$).
  3. Normalize It: Define a dimensionless "energy" $V_t = \|e_t\|_2^2 / \|v_{\text{geo}}\|_2^2$. Dividing by the total chord length makes this scale-invariant, so the model can't cheat by simply shrinking all its embeddings toward zero.
  4. Apply the Lyapunov Tube Loss: Add a penalty ($\mathcal{L}_{\text{Lyap}}$) to standard NTP loss whenever $V_{t+1}$ fails to contract safely toward the tube: specifically, whenever $V_{t+1} > \gamma V_t + \tau$ (where $\gamma$ is a contraction rate and $\tau$ is a slack parameter). If the state is already behaving inside the tube, the ReLU/softplus penalty drops to zero (or near-zero).

Datasets

The authors evaluate fine-tuning across six established benchmarks (no new datasets are introduced):

  • NL-RX-SYNTH & NL-RX-TURK: Natural language to regular expression translation.
  • GSM8K: Grade-school math word problems requiring multi-step reasoning.
  • Spider: Complex text-to-SQL semantic parsing.
  • NQ-Open: Open-domain question answering.
  • HellaSwag: Commonsense natural language inference.

Key Insights and Ideas

  • Don't crush the wiggle room—control it: You might think forcing the perpendicular drift $\|e_t\|_2$ all the way to zero would make the cleanest trajectory. The authors prove mathematically (via a spectral capacity bound) that forcinghidden states strictly onto a 1D line collapses the rank of the output logits to at most 2, destroying the model's expressive power. Confirming this, cranking up contraction too tightly ($\gamma=0.8$) tanks accuracy to 28.7%, whereas looser regularization ($\gamma=0.95$) hits 86.78%.
Impact of contraction rate gamma on geometric components and downstream accuracy, showing collapse under strict constraints.
  • The "Partial-ISS" sweet spot: Because zero drift ruins capacity, healthy models live in a partial-ISS regime where the tube boundary is occasionally violated. In this regime, ControlJEPA doesn't crush the error to zero; instead, it bounds the temporal variance, keeping the trajectory at a steady, uniform distance from the reference path rather than wildly oscillating.
  • The manifold remembers at inference: During text generation, the Lyapunov loss is completely turned off (since you don't know the end anchor $h_{t_{\text{end}}}$ before generating it!). Yet empirically, the hidden states still stay tightly confined inside a smooth tube on unseen inputs—meaning training genuinely reshaped the underlying representation geometry.

Key Results

Tested across six model families—including Llama-3 (1B, 3B, 8B), Gemma-2-2B, Qwen3-1.7B, DeepSeek-R1-Distill-1.5B, OpenELM, and OLMo-2—ControlJEPA consistently beats standard NTP fine-tuning, LLM-JEPA, and STP:

Accuracy comparison of ControlJEPA against baselines across six datasets, six model families, and three Llama-3 model sizes.
  • Big jumps on reasoning & QA: On GSM8K and NQ-Open, ControlJEPA boosts accuracy by ~10 percentage points over standard fine-tuning, and beats STP by ~6 and ~4 percentage points, respectively.
  • Data efficiency: Under subsampling, ControlJEPA matches full-dataset standard fine-tuning using only a fraction of the training examples, driven by a much higher semantic signal-to-noise ratio.
  • Zero inference overhead & easy tuning: It requires zero architectural changes and maintains stable peak performance across a wide hyperparameter range ($\lambda \in [0.01, 0.08]$).

Limitations and Future Work

  • Theory stops at the training set: All mathematical bounds on tube width and variance apply strictly to training trajectories; why this stability generalizes to unseen test prompts remains an open theoretical question.
  • Scale and segmentation constraints: Experiments are currently capped at 8B-parameter models, and defining the start/end anchors relies on dataset-provided semantic segmentation.
  • What's next: The authors plan to extend ControlJEPA to vision and multimodal models, and explore Lyapunov-constrained decoding—actively steering trajectories during inference itself.

Summary updated

Abstract

Next-token prediction leaves hidden-state trajectories largely unconstrained, while existing geometric regularizers primarily control the direction rather than the magnitude of trajectory deviations. We introduce \emph{ControlJEPA}, a trajectory regularization framework based on a discrete-time Lyapunov contraction condition from practical Input-to-State Stability theory. Its Lyapunov Tube Loss penalizes violations of this condition on a normalized, scale-invariant measure of transversal deviation. When the contraction condition holds at every step, the hidden-state trajectory remains within an explicit tube around the reference secant. In the partial-ISS regime, we bound mean transversal energy, temporal variance, and average tube width using the Lyapunov loss and contraction parameters, with horizon-independent variance bounds under uniformly bounded violations. ControlJEPA requires no architectural modifications. Across six benchmarks and six model families, it consistently improves accuracy and data efficiency over standard fine-tuning and prior trajectory regularizers. The resulting smoother transversal profile also persists empirically during inference, when the regularizer is inactive. The code is publicly available at: \url{https://github.com/t-khanusa/ControlJEPA}
BibTeX
@inproceedings{nguyen2026controljepa,
  author = {Thai Khanh Nguyen and Yen Nhi Pham and Vo Ngoc Bich Uyen and Thieu Vo and Cuong Pham and Tan Minh Nguyen},
  title = {{ControlJEPA: Principled Trajectory Regularization via Lyapunov Tube Loss}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=pw4nMbt6SR},
}
Figure