The Laplacian Keyboard: Beyond the Linear Span

Siddarth Chandrasekar, Marlos C. Machado

TL;DR

In reinforcement learning (RL), you can teach an agent the "natural harmonics" of an environment without giving it any tasks, allowing it to solve smooth, simple tasks instantly. However, just like trying to draw a sharp square using only a few smooth sine waves, this fails when a new task is spiky or complex. The Laplacian Keyboard fixes this by treating those basic harmonics like keys on a piano, training a "meta-policy" to play sequences of behaviors dynamically—solving complex tasks far faster than starting from scratch.

What Problem Does This Paper Address?

Imagine dropping a robot into a dark room with no goals, letting it wander around, and later asking it to solve a brand-new task in just a few tries. This is the dream of unsupervised RL.

Currently, researchers tackle this from two angles, each with a catch:

  1. Representation-based methods learn a compact mathematical summary (a "basis") of the state space. When a new task arrives, the agent approximates the task's reward as a linear combination of these basis features to get an instant ("zero-shot") policy. The catch: If the new task's reward is too complex to fit inside that fixed linear combination—outside the "linear span"—the resulting behavior is suboptimal.
  2. Behavior-based methods (like the Option Keyboard) give the agent a library of pre-built skills ("options") and learn to stitch them together over time. The catch: Someone usually has to hand-engineer those initial skills or reward features.

How do we get the automatic, math-driven discovery of representation methods and the flexible, sequential skill-stitching of behavior methods without human hand-holding?

Figure 1: Overview of the Laplacian Keyboard. (Left) A reward-free dataset is used to learn a Laplacian representation basis and a USFA, inducing a behavior basis—depicted here as straight-line trajectories in the environment. (Right) In a downstream navigation task, a zero-shot policy selects a single behavior and executes it throughout the episode, yielding a potentially suboptimal trajectory (red). The LK meta-policy instead sequences over behaviors, composing a piecewise trajectory (blue) that better solves the task.

Methods

Just as Fourier transforms break sound waves into smooth, fundamental frequencies, the authors decompose an RL environment's transition graph using graph Laplacian eigenvectors. Small eigenvalues give smooth, global patterns across the state space; larger ones capture sharp, localized details. Because we can only compute a small number ($k$) of these eigenvectors in big environments, sharp rewards get blurred out.

Figure 2: Illustration of the Laplacian basis in the Four-Rooms environment (Sutton et al., 1999). Color intensity reflects the magnitude of each value; scales are normalized per subplot. (a) Selected graph Laplacian eigenvectors under a uniform random policy; parenthetical values indicate the eigenvector graph total variation (Eqn. 1). (b) A sample reward function and its reconstruction using the first k eigenvectors; parenthetical values denote mean squared reconstruction error.

To break past this limitation, the Laplacian Keyboard (LK) operates in two phases:

  • Pre-training (Standard building blocks, novel pairing): Using reward-free data, an encoder learns the first $k$ Laplacian eigenvectors via a contrastive objective. Alongside it, a Universal Successor Feature Approximator (USFA) learns optimal policies for every possible linear combination (weight vector $\mathbf{w}$) of those $k$ eigenvectors. This creates a continuous, infinite library of task-agnostic skills.
  • Downstream Phase (What's new): Instead of picking one fixed weight vector $\mathbf{w}$ for an entire episode (the zero-shot approach), LK trains a hierarchical meta-policy ($\pi_{\text{LK}}$). Looking at the current state, the meta-policy outputs a weight vector $\mathbf{w}$—essentially pressing a chord on the keyboard. The USFA executes that behavior for a fixed number of steps ($t_{\text{term}}$), then hands control back to the meta-policy to pick a new chord. By sequencing linear behaviors piecewise, the agent creates non-linear solutions.
Figure 3: The Laplacian Keyboard framework.

Datasets

No new benchmarks are introduced; the authors evaluate LK on established environments:

  • DeepMind Control Suite (DMC): Continuous control across Cheetah, Quadruped, and Walker (4 tasks each, including backward movement). Pre-training uses existing offline, reward-free datasets collected by three exploration algorithms: APS, Proto, and RND (36 task-dataset pairs total).
  • Four-Rooms & Item-Collector: Classic discrete gridworlds (including a $10\times 10$ toroidal gridworld where items must be collected in strict order) pre-trained via uniform random walks.

Key Insights and Ideas

  • Theory meets intuition on reward "smoothness": The authors prove a mathematical bound (Theorem 3.1) showing that value-function error depends directly on how jagged the reward is (graph total variation) divided by the size of the basis ($\sqrt{\lambda_{k+1}}$). Smooth rewards need tiny bases; spiky rewards break zero-shot methods.
  • Scaling the basis hits a wall: You might think, "Why not just increase $k$?" Empirically, zero-shot performance saturates around $k=20$ to $50$ (and at $k=1$ for Quadruped, where torso height dominates!). Adding more dimensions makes the representation and USFA harder to optimize. Hierarchy bypasses this optimization bottleneck.
  • Continuous beats discrete skill-stitching: Because the meta-policy outputs continuous weight vectors $\mathbf{w}$, small tweaks in its output produce smooth changes in behavior—making exploration much easier than picking from a discrete list of skills.

Key Results

  • Competitive Zero-Shot Foundation: At $k=50$ on DMC (APS dataset), the pure Laplacian basis matches the state-of-the-art Forward-Backward (FB) baseline in zero-shot control (e.g., scoring 588 vs. 484 on Walker, and 591 vs. 622 on Cheetah).
  • Breaking the Linear Span: Even when starved down to $k=1$—giving the agent only two behaviors (positive or negative direction of a single eigenvector)—LK's meta-policy switches between them over 200K steps to improve over zero-shot scores by 14,701% on Cheetah and 1,399% on Walker.
  • Sample Efficiency: Compared to a standard flat TD3 agent learning from scratch over 200K steps, LK achieves higher Area Under the Curve (AUC) across almost all tasks for $k \ge 3$, accumulating 2.4x to 3.9x more return on Quadruped.
  • Matching Privileged Baselines: On Item-Collector, LK nearly matches the Option Keyboard Basis (OKB)—a method given privileged, handcrafted reward features—despite LK learning purely from random walks.

Limitations and Future Work

  • Fixed-horizon awkwardness: Currently, options terminate blindly after a fixed clock ($t_{\text{term}} = 5$ steps in DMC). Learning state-dependent termination conditions should improve skill transitions.
  • Exploration hiccups: In theory, LK should never do worse than zero-shot because the zero-shot weight vector is right there in the meta-policy's action space. In practice, LK occasionally underperforms zero-shot (e.g., $-20\%$ on Cheetah Walk-B at $k=50$) because the meta-policy fails to find that exact weight vector within 200K steps. Warm-starting the meta-policy with zero-shot weights is a clear next step.
  • Global vs. Local: Laplacian eigenvectors are global (like sine waves), requiring many components to pinpoint a tiny local goal. Future "Keyboard" agents could swap in multi-scale diffusion wavelets, or move to fully online skill discovery.

Summary updated

Abstract

Across scientific disciplines, Laplacian eigenvectors serve as a fundamental basis for simplifying complex systems, from signal processing to quantum mechanics. In reinforcement learning (RL), they similarly form a basis over the state space, enabling reward functions to be approximated by projection onto a small set of eigenvectors. This projection makes zero-shot control possible, but it also imposes a fundamental limitation: the induced policies are only as expressive as the linear span of the chosen eigenvectors. We introduce the Laplacian Keyboard (LK), a hierarchical framework that goes beyond this linear span. LK constructs a task-agnostic library of behaviors from these eigenvectors, forming a behavior basis guaranteed to contain the optimal policy for any reward within the linear span. A meta-policy learns to stitch these behaviors dynamically, enabling efficient learning of policies outside the original linear constraints. We bound the value-function error incurred by approximating rewards with a finite Laplacian basis. Empirically, LK improves over the zero-shot solution and is more sample efficient than standard RL methods.
BibTeX
@inproceedings{chandrasekar2026laplacian,
  author = {Siddarth Chandrasekar and Marlos C. Machado},
  title = {{The Laplacian Keyboard: Beyond the Linear Span}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=2xN81qKlwF},
}
Figure