FracEncoder: Towards Adaptive Cognitive Trajectories via Fractional-Order Context Encoding

Lulu Wang, Shengling Wang, Anlin Chen, Ke Chao, Weicheng WangNeurIPS 2026

TL;DR

Standard reinforcement learning agents struggle when sensors fail or lag because their memory works like a game of telephone—compressing the past step-by-step until early, vital clues fade into noise. FracEncoder swaps out standard calculus for fractional calculus, giving agents a non-local memory that directly connects their entire past "train of thought" to the present moment. Best of all, it learns a single, interpretable dial ($\alpha$) that automatically tunes how far back in time the agent needs to remember for any given task.

What Problem Does This Paper Address?

Imagine driving a car, except your speedometer is broken, or your rearview mirror shows you what happened five seconds ago. In reinforcement learning (RL), a single snapshot of the world often doesn't give an agent enough information to make a smart move—violating the neat, memoryless "Markov property" that standard RL relies on.

To reconstruct missing context, researchers usually bolt Recurrent Neural Networks (RNNs, LSTMs, GRUs) onto agents. However, traditional recurrent models suffer from two major flaws:

  1. The Markovian Compression Bottleneck: At every time step, an RNN squashes its entire past into a single hidden state vector ($h_t = f(h_{t-1}, x_t)$). It passes history along recursively, meaning early insights get overwritten by fresh noise, and past "cognitive states" (the history of how it was thinking) cannot directly influence the present.
  2. Rigid Memory Spans: Different tasks require vastly different memory horizons, yet standard recurrent gates have fixed, exponential memory decay patterns without an explicit knob to adaptively stretch or shrink memory range.
Figure 1: Comparison of latent dynamics between traditional RNN-based encoders and FracEncoder.

Methods

If standard Neural Ordinary Differential Equations (ODEs) are memoryless because integer-order derivatives only look at an instantaneous point in time, what happens if you take a 0.6-th derivative?

Enter fractional calculus. Unlike standard derivatives, a fractional-order derivative (specifically, the Caputo fractional derivative of order $\alpha \in (0, 1)$) is actually an integral over time. It naturally weaves history into the system's dynamics.

The authors build FracEncoder, a plug-and-play context module for standard RL algorithms like Soft Actor-Critic (SAC) and TD3:

  • Non-Local Cognitive Trajectories: Instead of computing the next hidden state solely from the previous one, FracEncoder solves a fractional differential equation driven by historical interactions (observations, past actions, and rewards). Numerically, the current hidden state becomes a weighted sum over all previous hidden states, governed by a power-law kernel $(t - \tau)^{\alpha - 1}$. Power-law decay is much gentler than exponential decay, keeping distant memories alive.
  • Learnable Memory Horizon ($\alpha$): Rather than guessing the right fractional order $\alpha$, the authors make it an end-to-end learnable parameter via backpropagation. Smaller $\alpha$ values produce slower weight decay (longer memory); larger $\alpha$ values focus on the recent past.
  • Decoupled Actor-Critic Encoding: When plugged into SAC, the actor (policy) and critic (value estimator) each get their own separate FracEncoder, mapping hidden trajectories into Gaussian context variables ($z_t^a$ and $z_t^c$) regularized by a temporal KL-divergence term.
Figure 3: Framework of FracEncoder integrated into SAC.

Datasets

Because RL agents learn through live interaction rather than static datasets, the authors evaluate FracEncoder across three interactive continuous-control benchmark suites (over a dozen tasks total):

  • Partially Observable Control (PyBullet): Pendulum, CartPole, Hopper, Walker, and Ant—each tested in two blinded variants: -P (velocity masked out) and -V (positions masked out).
  • Meta-Reinforcement Learning: PRN and PRN-Wind, where the agent must deduce hidden, shifting environmental rules (like wind) purely from sparse interaction history.
  • Delayed-Observation Control: Modified PyBullet Pendulum and Hopper environments where sensor readings arrive $\tau = 4$ or $\tau = 8$ steps late.

Key Insights and Ideas

  • $\alpha$ is a physical thermometer for cognitive complexity: Watching where the learned $\alpha$ settles tells you how memory-hungry a task actually is. On standard Hopper ($\tau=0$), the actor's $\alpha_a$ settles at $0.75$ (short memory). Crank the sensor delay up to $\tau=8$ steps, and $\alpha_a$ drops to $0.47$, automatically stretching its power-law tail further into the past!
  • Actors and Critics think on different timescales: Separating the actor and critic encoders boosts Hopper-V returns from $2084$ to $2602$. Furthermore, the two networks converge to distinct $\alpha$ values—proving that choosing an action and evaluating long-term value require fundamentally different memory horizons.
  • Power-law memory barely costs extra compute: Despite summing over historical states (within a window $T=64$), 1,000 gradient updates on Hopper-P take $12.5\text{ s}$ and $3.4\text{ GB}$ of VRAM on a V100—virtually identical to GRU-ODE ($11.6\text{ s}$ and $3.2\text{ GB}$).

Key Results

Compared against strong memory baselines—including GRU-ODE, GPIDE, RESeL, and Linear Recurrent Units (LRU)—FracEncoder matches or leads across nearly all tasks:

  • Extreme Sensor Delays: Under brutal 8-step observation delays ($\tau = 8$), baseline performance collapses while FracEncoder stays resilient. On 8-step delayed Hopper, FracEncoder scores $732.1 \pm 152.7$, decisively beating RESeL ($515.4$), LRU ($482.5$), and GRU-ODE ($348.7$). On 8-step delayed Pendulum, it hits $-511.5 \pm 7.9$ vs. RESeL's $-562.3$ and GRU-ODE's $-732.4$.
  • Plug-and-Play Generality: Swapping the underlying RL backbone from SAC to TD3 preserves FracEncoder's dominance across occluded, meta-RL, and delayed tasks, confirming the magic lies in the encoder itself.
Figure 5: Sensitivity and ablation analysis of FracEncoder. The first two panels in the top row show performance under different observation delays τ on Pendulum delay and Hopper delay, and the third panel shows the history length ablation on Pendulum-P. The first two panels in the bottom row compare learnable and fixed fractional orders α on Pendulum-P and Hopper-P, and the third panel shows the history length ablation on Hopper-P.

Limitations and Future Work

While FracEncoder dominates low-to-medium dimensional control and delay tasks, the authors note that on very high-dimensional locomotion tasks (Ant-P and Ant-V), it remains competitive but trails behind RESeL in final returns—suggesting that extra optimization stability tricks are still important as state spaces scale up. Additionally, practical implementation still relies on a finite sliding history window ($T=64$), as a very short window misses cues while an overly long window ($T=128$) introduces redundancy and optimization difficulty. Explicit directions for future work are not discussed in the paper.

Summary updated

Abstract

In real-world tasks such as robotic control and autonomous driving, agents often face non-Markovian environments due to incomplete observations. Solving such information-impoverished decision tasks requires reconstructing the context from history. However, existing recurrent encoders have two fundamental limitations: First, the model suffers from a Markovian compression bottleneck, i.e., it only processes observation history as input but neglects thought process history. This leads to the loss of deep semantic cues from early interactions, which are easily overwritten by noise over time due to recursion. Second, it lacks the adaptive capability to adjust the memory span for different tasks. To address these limitations, we propose FracEncoder, a context encoder based on fractional-order neural differential equations. First, FracEncoder leverages the nonlocal property of the fractional-order derivative and uses a power-law kernel to directly incorporate the trajectory of the thought process into the evolution of the current state, effectively overcoming the temporal locality limitations of traditional models. Second, the fractional order $\alpha$ is set as an end-to-end learnable parameter. It explicitly characterizes how strongly the system anchors to its history, so the model can discover a suitable memory span for each task. We evaluate FracEncoder on more than ten benchmarks across three settings, namely partially observable tasks, meta reinforcement learning, and delayed-observation control. FracEncoder consistently matches or outperforms representative baselines, including GPIDE, GRU-ODE, ReSeL, and LRU. On the challenging 8-step delayed-observation task, it reaches average returns of $-511.5 \pm 7.9$ on Pendulum and $732.1 \pm 152.7$ on Hopper. As a plug-in module, FracEncoder also yields stable gains across different reinforcement learning algorithms. Ablation studies further show that the learned $\alpha$ aligns with the intrinsic memory demand of each task, providing an interpretable physical measure of the cognitive complexity of non-Markovian tasks. The code is available at https://github.com/wll99/FracEncoder.
BibTeX
@inproceedings{wang2026fracencoder,
  author = {Lulu Wang and Shengling Wang and Anlin Chen and Ke Chao and Weicheng Wang},
  title = {{FracEncoder: Towards Adaptive Cognitive Trajectories via Fractional-Order Context Encoding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=yUT3YSeo8K},
}
Figure