// § 01

An impossible triangle

In Part I, we argued that self-supervised learning is learning one object: the spectral decomposition of the pointwise mutual information between two views of the data, with different parametrizations and learning strategies. This post applies the spectral view to reinforcement learning (RL). Taking the current state-action pair and the next state as the two views induces a new decomposition, the spectral decomposition of the transition operator. The full details are in the paper ↗, with code on the project page ↗, and an overview is in the slides ↗.

An RL agent has to do three things well:

  • Modeling. Represent the value function, the policy, or the dynamics of a large, nonlinear world.
  • Exploration. Know what it does not know, so that it collects the right data.
  • Planning. Turn what it knows into a good policy, efficiently and reliably.

Before spectral representations, this was an impossible triangle: existing approaches pick two at best. Concretely, model-free deep RL, such as Q-learning or policy gradients with neural networks, models flexibly, but uncertainty is hard to estimate with arbitrary networks, and there is no guarantee that training finds a good policy. Classic control with linear dynamics, the linear quadratic regulator, has clean uncertainty estimates and an exact planner, but linear dynamics are far too restrictive. Deep model-based RL and world models bring back the flexible model, but planning through a learned nonlinear model is expensive, and uncertainty is again hard to quantify.

ModelingExplorationPlanning
Model-free deep RL✓✗✗
Linear quadratic regulator✗✓✓
Deep model-based RL, world models✓✗✗
Spectral representation✓✓✓

This post argues that the spectral representation breaks the triangle and gets all three. The representation comes from the dynamics, it is learned with the same tools as in Part I, and it makes the value function of every policy linear.

// § 02

The spectral view of RL: every Q becomes linear

2.1 Every Q is linear in the spectral representation

Following Part I, take the current state-action pair (s,a)(s,a) and the next state s′s' as the two views. The spectral decomposition of their PMI is

P(s,a,s′)P(s,a)P(s′)=P(s′∣s,a)P(s′)=⟨ϕ(s,a),μ(s′)⟩,\frac{P(s,a,s')}{P(s,a)P(s')} = \frac{P(s'\mid s,a)}{P(s')} = \langle \phi(s,a), \mu(s')\rangle ,

that is,

P(s′∣s,a)=P(s′) ⟨ϕ(s,a),μ(s′)⟩.P(s'\mid s,a) = P(s')\,\langle \phi(s,a), \mu(s')\rangle .

This is the spectral decomposition of the transition operator.

The factorization is just an SVD of the dynamics, so it exists, with possibly infinitely many features, whenever the transition operator is compact. For example, take a stochastic nonlinear system s′=f(s,a)+εs' = f(s,a) + \varepsilon with Gaussian noise ε∼N(0,σ2I)\varepsilon\sim\mathcal{N}(0,\sigma^2 I), for any nonlinear ff. Its transition is a Gaussian kernel between f(s,a)f(s,a) and s′s',

P(s′∣s,a)∝exp⁡ ⁣(−∥s′−f(s,a)∥22σ2),P(s'\mid s,a) \propto \exp\!\Big(-\frac{\|s'-f(s,a)\|^2}{2\sigma^2}\Big),

which, for any α∈(0,1)\alpha\in(0,1), splits off a density on s′s' alone (Ren et al., Eq. 12):

P(s′∣s,a)=pα(s′)⋅gα(f(s,a))αd⋅exp⁡ ⁣(−∥(1−α2) s′−f(s,a)∥22σ2(1−α2)),P(s'\mid s,a) = p_\alpha(s')\cdot\frac{g_\alpha(f(s,a))}{\alpha^d}\cdot\exp\!\Big(-\frac{\|(1-\alpha^2)\,s'-f(s,a)\|^2}{2\sigma^2(1-\alpha^2)}\Big),

where pα(s′)=N(s′;0,σ2α−2I)p_\alpha(s') = \mathcal{N}(s';0,\sigma^2\alpha^{-2}I) depends only on s′s' and gα(f)=exp⁡(α2∥f∥2/(2(1−α2)σ2))g_\alpha(f) = \exp\big(\alpha^2\|f\|^2/(2(1-\alpha^2)\sigma^2)\big) only on (s,a)(s,a). The last factor is a Gaussian kernel, and a Gaussian kernel is an inner product of infinitely many random Fourier features, so P(s′∣s,a)=pα(s′) ⟨ϕω(s,a),μω(s′)⟩P(s'\mid s,a) = p_\alpha(s')\,\langle \phi_\omega(s,a), \mu_\omega(s')\rangle, the same form as above with pαp_\alpha in place of P(s′)P(s'). So general nonlinear control becomes linear in the right feature space, which the spectral dynamics embedding exploits for stochastic nonlinear control.

Why is this the right representation for RL? An RL problem is a Markov decision process: in state ss the agent takes action aa, receives reward r(s,a)r(s,a), and moves to s′s' with probability P(s′∣s,a)P(s'\mid s,a). Its goal is a policy π(a∣s)\pi(a\mid s) that maximizes the γ\gamma-discounted total return, and the central quantity is the action-value function Qπ(s,a)Q^\pi(s,a), which satisfies the Bellman equation

Qπ(s,a)=r(s,a)+γ∫P(s′∣s,a) Vπ(s′) ds′,Q^\pi(s,a) = r(s,a) + \gamma \int P(s'\mid s,a)\,V^\pi(s')\,ds' ,

where Vπ(s′)=Ea′∼π(⋅∣s′)[Qπ(s′,a′)]V^\pi(s') = \mathbb{E}_{a'\sim\pi(\cdot\mid s')}\big[Q^\pi(s',a')\big] is the value of the next state.

Represent the reward with the same feature, r(s,a)=⟨ϕ(s,a),θr⟩r(s,a) = \langle \phi(s,a), \theta_r\rangle, plug both into the Bellman equation, and the integral moves inside the inner product:

Qπ(s,a)=⟨ϕ(s,a),  θr+γ EP(s′)[μ(s′) Vπ(s′)]⏟ηπ⟩.Q^\pi(s,a) = \Big\langle \phi(s,a),\; \underbrace{\theta_r + \gamma\, \mathbb{E}_{P(s')}\big[\mu(s')\,V^\pi(s')\big]}_{\eta^\pi} \Big\rangle .

So the Q-function of every policy is linear in the same feature ϕ(s,a)\phi(s,a). Only the weight ηπ\eta^\pi depends on the policy. The feature itself depends only on the dynamics and the reward, so it can be learned once and reused while the policy changes.

2.2 The parallel with Part I

In Part I, the two views xx and x′x' gave a representation that makes every downstream prediction linear. Here, the two views are (s,a)(s,a) and s′s', and every policy's value is the downstream prediction.

Part I: SSLPart II: RL
Two viewsxx and x′x', e.g., an image and its augmentation(s,a)(s,a) and s′s', the current state-action and the next state
What is decomposedP(x,x′)P(x)P(x′)\dfrac{P(x,x')}{P(x)P(x')}P(s′∣s,a)P(s′)=P(s,a,s′)P(s,a)P(s′)\dfrac{P(s'\mid s,a)}{P(s')} = \dfrac{P(s,a,s')}{P(s,a)P(s')}
Representationϕ(x)\phi(x)ϕ(s,a)\phi(s,a)
What becomes linearE[y∣x]\mathbb{E}[y\mid x] for every downstream task yyQπ(s,a)Q^\pi(s,a) for every policy π\pi
How it is learnedparametrization × fitting rulethe same two knobs
// § 03

What a linear Q buys

Once Qπ=⟨ϕ,ηπ⟩Q^\pi = \langle\phi,\eta^\pi\rangle, the hard parts of RL become the easy parts of linear algebra.

Policy. For the KL-regularized policy improvement step,

max⁡π  Ea∼π[Qπ(s,a)]−λ KL(π(⋅∣s) ∥ π0(⋅∣s))  ⇒  π(a∣s)∝π0(a∣s) exp⁡ ⁣(⟨ϕ(s,a),ηπ⟩/λ),\max_\pi\; \mathbb{E}_{a\sim\pi}\big[Q^\pi(s,a)\big] - \lambda\,\mathrm{KL}\big(\pi(\cdot\mid s)\,\|\,\pi_0(\cdot\mid s)\big) \;\Rightarrow\; \pi(a\mid s) \propto \pi_0(a\mid s)\,\exp\!\big(\langle \phi(s,a), \eta^\pi\rangle/\lambda\big),

so the policy is determined by QQ, and therefore by the same representation ϕ(s,a)\phi(s,a). Taking π0\pi_0 to be the current policy, this is a natural policy gradient step: if π(a∣s)∝exp⁡(ϕ(s,a)⊤θ)\pi(a\mid s)\propto\exp(\phi(s,a)^\top\theta), the update simply adds ηπ/λ\eta^\pi/\lambda to θ\theta.

Planning. Policy evaluation is a least-squares problem in η\eta: regress r(s,a)+γ ϕ(s′,a′)⊤η^r(s,a) + \gamma\,\phi(s',a')^\top\hat\eta onto ϕ(s,a)\phi(s,a). Nonlinear dynamics no longer make planning nonconvex, because the nonlinearity is absorbed into ϕ\phi.

Exploration. With linear features, uncertainty has a closed form, as in linear bandits. Adding the bonus

b(s,a)=αϕ(s,a)⊤Σ−1ϕ(s,a),Σ=∑(s,a)∈Dϕ(s,a)ϕ(s,a)⊤+λI,b(s,a) = \alpha\sqrt{\phi(s,a)^\top\Sigma^{-1}\phi(s,a)}, \qquad \Sigma = \sum_{(s,a)\in\mathcal{D}}\phi(s,a)\phi(s,a)^\top + \lambda I,

to the reward gives optimism in the face of uncertainty, with provable sample efficiency, as shown in CTRL and A Free Lunch from the Noise.

Model-based benefits without rollouts. The representation is learned from the dynamics, so it carries what a world model knows. But it is used by a model-free critic, so there is no trajectory synthesis during training and no planning at decision time. That makes it far cheaper than world-model methods, and it avoids compounding errors from long imagined rollouts.

The dual side. The same factorization makes the state-action occupancy of any policy, the distribution of where the policy spends its time, linear in the dual feature P(s′) μ(s′) π(a′∣s′)P(s')\,\mu(s')\,\pi(a'\mid s'), apart from the initial-state term:

dπ(s′,a′)=(1−γ) ρ0(s′) π(a′∣s′)+⟨γ Edπ[ϕ(s,a)]⏟ζπ,  P(s′) μ(s′) π(a′∣s′)⟩,d^\pi(s',a') = (1-\gamma)\,\rho_0(s')\,\pi(a'\mid s') + \Big\langle \underbrace{\gamma\,\mathbb{E}_{d^\pi}\big[\phi(s,a)\big]}_{\zeta^\pi},\; P(s')\,\mu(s')\,\pi(a'\mid s') \Big\rangle ,

where dπd^\pi is the normalized discounted occupancy and ρ0\rho_0 the initial-state distribution. The primal QQ and the dual occupancy are then both linear, which gives a primal-dual spectral method for off-policy evaluation.

// § 04

Learning φ: the same two knobs

All of these benefits assume the spectral representation ϕ\phi is given. In practice the dynamics are unknown, so ϕ\phi has to be learned from transitions (s,a,s′)(s,a,s'). Maximum likelihood under the factorization is intractable. With free features, P(s′) ⟨ϕ(s,a),μ(s′)⟩P(s')\,\langle\phi(s,a),\mu(s')\rangle is an unnormalized density, so the model is

P(s′∣s,a)=P(s′) ⟨ϕ(s,a),μ(s′)⟩Z(s,a),Z(s,a)=∫P(s′) ⟨ϕ(s,a),μ(s′)⟩ ds′,P(s'\mid s,a) = \frac{P(s')\,\langle\phi(s,a),\mu(s')\rangle}{Z(s,a)}, \qquad Z(s,a) = \int P(s')\,\langle\phi(s,a),\mu(s')\rangle\,ds' ,

and maximum likelihood needs the partition function Z(s,a)Z(s,a):

max⁡ϕ,μ  E(s,a,s′)[log⁡⟨ϕ(s,a),μ(s′)⟩−log⁡Z(s,a)],\max_{\phi,\mu}\; \mathbb{E}_{(s,a,s')}\Big[\log\langle\phi(s,a),\mu(s')\rangle - \log Z(s,a)\Big],

where log⁡P(s′)\log P(s') is dropped since it does not depend on ϕ,μ\phi,\mu. Each Z(s,a)Z(s,a) is an integral over the whole next-state space, and the inner product must also stay positive for the log to be defined. But this is exactly the problem of Part I with x=(s,a)x=(s,a) and x′=s′x'=s', so the same two knobs apply: how to parametrize the decomposition and how to fit it.

  • Linear. P(s′∣s,a)=P(s′) ⟨ϕ(s,a),μ(s′)⟩P(s'\mid s,a) = P(s')\,\langle\phi(s,a),\mu(s')\rangle with finite-dimensional features, fit by the spectral contrastive (SVD) loss, which has a simple unbiased stochastic gradient. This is Speder.
  • Latent-variable. P(s′∣s,a)=∫P(s′∣z) P(z∣s,a) dzP(s'\mid s,a) = \int P(s'\mid z)\,P(z\mid s,a)\,dz, so ϕ(s,a)=P(z∣s,a)\phi(s,a) = P(z\mid s,a), fit by the evidence lower bound as in a variational autoencoder. This is LV-Rep.
  • Energy-based. P(s′∣s,a)∝P(s′) exp⁡(υ(s,a)⊤ψ(s′))P(s'\mid s,a) \propto P(s')\,\exp\big(\upsilon(s,a)^\top\psi(s')\big), which again expands into infinitely many random features. It is fit by score matching on noise-perturbed next states, as in diffusion models, which is Diff-SR, or by noise-contrastive estimation, as in CTRL and its ranking-based, noise-perturbed version CTRL-SR.
FIGURE 01 / SPECTRAL REPRESENTATION-BASED RL
Overview: transitions from the replay buffer train a spectral representation phi(s,a) under linear, latent-variable, or energy-based formulations; the representation then feeds the value network used by the policy.
Figure 1. Transitions from the replay buffer train the representation ϕ(s,a)\phi(s,a) with one of three formulations and their learning methods (top). The value network is built on ϕ(s,a)\phi(s,a), and the policy maximizes it (bottom).

Each choice gives a complete RL algorithm. The representation loss runs alongside a standard actor-critic: the critic is linear in ϕ(s,a)\phi(s,a), or a small head on top of it for energy-based features, the reward is added as a prediction target so that it is linear in ϕ\phi too, and the policy maximizes the critic. In practice, keeping the representation loss as a regularizer on top of the critic loss helps. Our conjecture is that a representation learned only by fitting the dynamics is task-agnostic: with limited rank, its top singular subspace can be misaligned with the subspace where QQ lives. The same failure mode, task-agnostic spectral features that miss the target when the rank is insufficient, is analyzed for instrumental variable regression in Meunier et al.

// § 05

Breaking the triangle in practice

The four algorithms, Speder, LV-Rep, Diff-SR, and CTRL-SR, were run on the same TD3 backbone with fixed hyperparameters on 27 tasks from the DeepMind Control Suite, and compared with TD3, SAC, and TD7. The spectral methods do better on average, and the gap is largest on the hardest dynamics, the dog and humanoid tasks, where the energy-based representations lead.

FIGURE 02 / STATE-BASED CONTROL
Learning curves on DeepMind Control from states: average over all tasks and dog and humanoid tasks, comparing TD3, SAC, TD7, Speder, LV-Rep, Diff-SR, and CTRL-SR.
Figure 2. Normalized score against training frames from proprioceptive states: the average over 27 tasks, and five of the hardest tasks. Energy-based representations (Diff-SR, CTRL-SR) lead on dog and humanoid. Selected panels from the paper.

From pixels, the comparison is with model-based methods, DreamerV3 and TD-MPC2, and the model-free DrQ-v2. The model-free Diff-SR and CTRL-SR match or exceed the model-based methods on average, without any planning at decision time.

FIGURE 03 / CONTROL FROM PIXELS
Learning curves on DeepMind Control from pixels, comparing DrQ-v2, DreamerV3, TD-MPC2, Diff-SR, and CTRL-SR.
Figure 3. Normalized score against training frames from pixels. The spectral methods match or exceed DreamerV3 and TD-MPC2 on average, without trajectory synthesis. From the paper.

The ablations tell a consistent story. Performance improves with the representation dimension, and the energy-based CTRL-SR is better at equal dimension and keeps scaling, since it implicitly learns an infinite-dimensional feature map.

// § 06

Beyond MDPs

Real agents rarely see the full state. They see images, video, or text. Planning in a general partially observable MDP is intractable, but many practical problems are LL-decodable: the last LL observations and actions determine the state, which is what frame stacking assumes in visual RL. Decomposing the dynamics of this window, the Q-function is again linear in a feature ϕ(xt,at)\phi(x_t,a_t) of the window xtx_t, as in the latent-variable version.

The idea also reaches beyond RL benchmarks. The linear Q makes the inverse problem tractable, recovering rewards and motor primitives from demonstrations, which has been used to analyze animal behavior. And the same decomposition applies to a semi-MDP, where the actions are temporally extended skills. Spectral Skills is built on this semi-MDP decomposition: it learns each skill as a spectral representation of how a motion continues, so that one frozen humanoid controller can track, chain, and compose skills, as discussed in our SuperMimic post.

FIGURE 04 / SPECTRAL SKILLS ON HARDWARE
Figure 4. Skill composition on the real robot with Spectral Skills. Video from the project page.

A single structure, the spectral decomposition of the transition operator, gives a representation that makes every policy's value linear. That one fact supports flexible modeling with deep networks, provable exploration, and efficient planning at once, and it is learned with the same tools that self-supervised learning uses. The derivations, the POMDP extension, and the full experiments are in the paper ↗, the code is on the project page ↗, and an overview is in the slides ↗.

// BONUS

Relation to successor features

Click to expand

Successor features are one of several earlier spectral representations for RL. As summarized in Table 1 of Speder, they all decompose a state-to-state operator induced by a policy, Pπ(s′∣s)=∫P(s′∣s,a) π(a∣s) daP^\pi(s'\mid s) = \int P(s'\mid s,a)\,\pi(a\mid s)\,da:

RepresentationDecomposed dynamics
Successor featuressvd⁡((I−γPπ)−1)\operatorname{svd}\big((I-\gamma P^\pi)^{-1}\big)
Proto-value functionseig⁡(ΛPπ+(Pπ)⊤Λ)\operatorname{eig}\big(\Lambda P^\pi + (P^\pi)^\top\Lambda\big)
Krylov basis{(Pπ)ir}i=1k\{(P^\pi)^i r\}_{i=1}^k
Spectral state aggregationsvd⁡(Pπ)\operatorname{svd}(P^\pi)
Spectral representation (this post)svd⁡(P(s′∣s,a)/P(s′))\operatorname{svd}\big(P(s'\mid s,a)/P(s')\big)

Here rr is the reward and Λ\Lambda a diagonal reweighting. Successor features decompose (I−γPπ)−1=∑t≥0γt(Pπ)t(I-\gamma P^\pi)^{-1} = \sum_{t\ge 0}\gamma^t (P^\pi)^t, the discounted visits under π\pi. Because PπP^\pi mixes in a specific π\pi, all of these features carry that policy and have to be relearned when the policy changes. In contrast, the spectral representation decomposes the transition itself, which does not depend on any policy,

P(s′∣s,a)=P(s′) ⟨ϕ(s,a),μ(s′)⟩,P(s'\mid s,a) = P(s')\,\langle \phi(s,a), \mu(s')\rangle ,

and moves the policy into the weight ηπ\eta^\pi instead. Every policy-induced operator then follows by averaging the feature, Pπ(s′∣s)=P(s′) ⟨Ea∼π(⋅∣s)[ϕ(s,a)],μ(s′)⟩P^\pi(s'\mid s) = P(s')\,\big\langle \mathbb{E}_{a\sim\pi(\cdot\mid s)}[\phi(s,a)], \mu(s')\big\rangle.

// THANKS

Acknowledgements

This post is based on joint work with Haotian Sun, Na Li, and Dale Schuurmans. We also thank Feiyang Wu, Anqi Wu, and Ye Zhao for the collaboration on Spectral Skills.

// SOURCES

References

  1. Gao, Sun, Li, Schuurmans, and Dai 2025, Spectral Representation-based Reinforcement Learning
  2. Spectral-RL project page and code
  3. Dai 2026, Spectral Representation-based Reinforcement Learning, talk slides
  4. Spectral Representation I: What Is Self-Supervised Learning Really Learning?
  5. Zhang et al. 2022, Making Linear MDPs Practical via Contrastive Representation Learning (CTRL)
  6. Ren et al. 2022, A Free Lunch from the Noise
  7. Ren et al. 2023, Spectral Decomposition Representation for RL (Speder)
  8. Ren et al. 2023, Latent Variable Representation for RL (LV-Rep)
  9. Shribak et al. 2024, Diffusion Spectral Representation for RL (Diff-SR)
  10. Ren et al. 2025, Stochastic Nonlinear Control via Finite-Dimensional Spectral Dynamics Embedding
  11. Hu et al. 2024, Primal-Dual Spectral Representation for Off-policy Evaluation
  12. Zhang et al. 2024, Provable Representation with Efficient Planning for Partially Observable RL
  13. Efroni et al. 2022, Provable RL with a Short-Term Memory
  14. Wang et al. 2025, Learning Task-Agnostic Motifs to Capture the Continuous Nature of Animal Behavior
  15. Barreto et al. 2017, Successor Features for Transfer in RL
  16. Fujimoto et al. 2018, TD3
  17. Haarnoja et al. 2018, SAC
  18. Fujimoto et al. 2023, TD7
  19. Yarats et al. 2022, DrQ-v2
  20. Hafner et al. 2023, DreamerV3
  21. Hansen et al. 2024, TD-MPC2
  22. Meunier et al. 2025, Demystifying Spectral Feature Learning for Instrumental Variable Regression
  23. Barreto et al. 2017, Successor Features for Transfer in Reinforcement Learning