Learning Task-relevant Representations for Generalization via Characteristic Functions of Reward Sequence Distributions

Rui Yang, Jie Wang, Zijie Geng, Mingxuan Ye, Shuiwang Ji, Bin Li, Feng Wu · DOI

Introduction

Visual Reinforcement Learning (RL) agents often struggle when deployed in environments that differ from their training settings. This failure is frequently attributed to "observational overfitting," where agents learn to rely on task-irrelevant visual features—such as background textures or lighting—rather than the underlying physics of the task. To address this, we present CRESP (Characteristic Reward Sequence Prediction), a method designed to learn robust, task-relevant representations that generalize across diverse visual domains.

The CRESP Framework

The core philosophy of CRESP is that while visual transitions can be noisy and contain irrelevant information, reward signals are inherently tied to the task. By focusing on the "fingerprint" of future rewards, an agent can learn to ignore visual distractions.

The CRESP framework for learning task-relevant representations by filtering out visual distractions.

Reward Sequence Distributions (RSDs)

Instead of predicting a single scalar reward, CRESP models the distribution of a sequence of future rewards ($T$ steps ahead) conditioned on a sequence of actions. This captures the long-term dynamics of the task. Because rewards are invariant to visual changes that do not affect task performance (e.g., a background color swap), they serve as a pure source of task-relevant information.

Characteristic Functions for Tractability

Predicting high-dimensional probability distributions is computationally intensive. CRESP simplifies this by using characteristic functions—the Fourier transform of the probability density function. Since two distributions are identical if and only if their characteristic functions match, this provides a mathematically rigorous yet tractable way to compare complex reward distributions.

Mapping action sequence space to the Reward Sequence Distribution (RSD) space.

Experimental Evaluation

We evaluated CRESP using the DeepMind Control (DMC) Suite and the Distracting Control Suite (DCS). The latter introduces significant visual noise, including dynamic backgrounds (videos) and changing colors for the robot and floor. Agents were trained on a limited set of distractions and tested on 30 entirely unseen, out-of-distribution environments.

Key Results and Insights

CRESP demonstrates a significant leap in generalization performance:

  • Superior Generalization: CRESP outperformed state-of-the-art methods like DrQ and CURL in 11 out of 12 experimental settings, achieving an average performance boost of +31.0% in unseen environments.
  • Semantic Feature Grouping: t-SNE visualizations reveal that CRESP effectively groups semantically similar observations (e.g., identical robot poses) regardless of background noise. In contrast, baseline methods often failed to separate the agent's state from the distracting visual context.
  • Distributional Advantage: By predicting the full distribution rather than just the mean reward, the model captures environmental uncertainty more effectively, leading to richer and more robust features.

Conclusion

CRESP offers a mathematically elegant solution to the problem of observational overfitting in visual RL. By leveraging the invariance of reward sequences and the tractability of characteristic functions, it enables agents to focus on what truly matters for the task, paving the way for more reliable deployment in real-world, unpredictable environments.

Summary updated

BibTeX
@inproceedings{yang2022learning,
  author = {Rui Yang and Jie Wang and Zijie Geng and Mingxuan Ye and Shuiwang Ji and Bin Li and Feng Wu},
  title = {{Learning Task-relevant Representations for Generalization via Characteristic Functions of Reward Sequence Distributions}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2022},
  doi = {10.1145/3534678.3539391},
}
Figure