In the world of Reinforcement Learning (RL), "online" learning is the gold standard for real-time adaptation. However, it comes with a major headache: catastrophic interference. This happens when a single update to a neural network's weights causes it to "forget" what it learned about other states. While deep learning has dominated RL, its tendency to interfere with itself makes it notoriously unstable in fully online, one-transition-at-a-time settings.
This paper introduces OAKTD (Online Attentive Kernel-Based Temporal Difference Learning), a novel approach that uses kernel methods and attention mechanisms to create a sparse, stable, and highly adaptive value function.
TL;DR
OAKTD is a new online reinforcement learning algorithm that solves the problem of "catastrophic forgetting" by using a smooth, learnable attention mechanism over kernel-based features. By optimizing the representation and the value function on two different timescales, it achieves superior stability and performance on classic control benchmarks compared to traditional sparse methods like Tile Coding.
What Problem Does This Paper Address?
The authors target the instability of Value Function Approximation (VFA) in online RL. When an agent learns from a single transition, a global update can degrade the accuracy of the value function for states it hasn't seen recently.
To fix this, researchers often use sparse representations—ensuring that only a few parameters are updated at any given time. Traditional methods like Tile Coding are effective but "rigid" because they rely on expert-defined grids. On the other hand, "hard" selection methods (like $k$-sparse autoencoders) can be non-differentiable and jumpy. The authors argue that a truly effective sparse representation must be:
- Learnable: Adapts to the data.
- Non-prior: Doesn't require expert-defined features.
- Non-truncated: Smooth and continuous rather than a "hard" on/off switch.
- Explicit: Represented by a clear mechanism.
Methods
The OAKTD algorithm consists of three main components:
- Online Dictionary Construction: Using a Modified Novelty Criterion (MNC), the algorithm builds a "dictionary" of representative states on the fly. If a new state is sufficiently different from existing ones, it's added to the dictionary.
- Attentive Kernel-VFA: This is the core innovation. Instead of just using a standard kernel (like a Gaussian RBF), the authors introduce an attentive function. It uses a softmax-based score function (calculated using $L_1$ norms of state differences) to weight the importance of different dictionary elements. This acts as a "soft" sparsification, focusing the model's "attention" on relevant local features.
- Two-Timescale Optimization: To ensure the math doesn't break, the algorithm updates parameters at different speeds.
- The Slow Part updates the attention parameters ($w$) to learn the best sparse representation.
- The Fast Part updates the value weights ($\theta$) to estimate the expected rewards. This separation is a classic technique in RL theory to guarantee convergence in non-linear systems.
Datasets
The authors evaluated OAKTD on four classic continuous-state control benchmarks:
- Mountain Car: Driving an underpowered car up a steep hill.
- Acrobot: Swinging a two-link robot arm above a certain height.
- CartPole: Balancing a pole on a moving cart.
- Puddle World: Navigating a 2D space while avoiding "puddles" (high-cost areas).
These are standard benchmarks used to test an agent's ability to handle continuous inputs and find optimal policies in low-dimensional but challenging physics environments.
Key Insights and Ideas
- Attention as Sparsification: The most elegant "aha" moment is treating attention not just as a way to "focus," but as a way to achieve differentiable sparsity. By using a softmax over kernel outputs, the model naturally ignores irrelevant parts of the state space without the harshness of a "hard" cutoff.
- Locality is Key: Visualization of the attention weights (Figures 5 and 6 in the paper) shows that the model learns to focus attention on the area immediately surrounding the current state. This confirms that the model is successfully reducing global interference.
- Stability through Separation: The two-timescale approach allows the algorithm to treat the representation as "quasi-static" while the value function learns, preventing the "chasing its own tail" behavior often seen in online non-linear VFA.
Key Results
OAKTD was compared against several baselines: OKTD (standard kernel TD), OSKTD (selective kernel TD), and TD with Tile Coding.
- Superior Stability: In all four tasks, OAKTD showed higher mean cumulative rewards and significantly lower standard deviation (less "jitter") than other kernel-based methods.
- Efficiency: In the Mountain Car task, OAKTD converged faster than Tile Coding and achieved a smoother value function with far fewer parameters.
- Fast Dictionary Convergence: The authors proved (and empirically showed) that the dictionary of states stabilizes very early in the learning process (often within the first 0.5% of training steps), allowing the rest of the learning to proceed on a solid foundation.
Limitations and Future Work
While OAKTD performs well, the authors note several areas for expansion:
- Action Spaces: The current work focuses on discrete action spaces (using an $\epsilon$-greedy policy). Extending this to continuous action spaces (e.g., via Policy Gradient methods) is a logical next step.
- Optimization Alternatives: The two-timescale approach is stable but might be slower than other optimization techniques. The authors suggest investigating if semi-gradient methods could also provide convergence guarantees.
- Broader ML Applications: The "attentive kernel" concept isn't limited to RL; it could potentially improve other kernel-based models like Support Vector Machines (SVM) or Regressors (SVR) by making them more adaptive to local data densities.
Summary updated