Perceptual Reward Functions

Ashley D. Edwards, Charles Lee Isbell Jr., Atsuo TakanishiarXiv 2016 · arXiv

Introduction

In traditional Reinforcement Learning (RL), the design of reward functions is often the most labor-intensive and brittle component of the system. Designers typically rely on internal state variables—such as the precise $(x, y)$ coordinates of a robotic joint or the velocity of a game object—to define success. This approach requires deep domain knowledge and manual coding for every new task.

In contrast, humans often learn from visual demonstrations, such as a picture of a completed task or a video of a motion. This paper introduces Perceptual Reward Functions (PRFs), a framework that allows agents to learn complex behaviors by comparing their current visual state to a goal image or motion template using raw pixels as the primary input.

The PRF Framework

The core of the PRF approach is a distance-based reward derived from visual features. The reward function is defined as:

$$F(T_A, T_G) = \frac{1}{e^{D(T_A, T_G)}}$$

Where $T_A$ represents the agent's current visual template, $T_G$ is the goal template, and $D$ is the Euclidean distance between their Histogram of Oriented Gradients (HOG) features. HOG features were selected for their ability to capture local shape and appearance while remaining robust to variations in color, texture, and minor spatial translations.

The PRF pipeline: from environment state (left) to motion template (center) and HOG feature extraction (right).

To address the "non-Markovian" nature of static images—where a single frame lacks information about velocity or direction—the authors utilize an Exponential Moving Average (EMA) of frames. This provides a low-memory temporal history, allowing a standard Deep Q-Network (DQN) to perceive motion without complex recurrent architectures.

Task Representation and Descriptors

The authors propose three distinct methods for defining visual goals:

  1. Direct: A single image representing the desired final state (e.g., a cleared game screen).
  2. Window: A cropped region of interest, focusing the agent's attention on specific spatial relationships.
  3. Motion Templates: A 2D representation of motion over time, enabling agents to learn specific trajectories or sequences of actions from video data.

Experimental Results

The PRF method was evaluated across diverse environments, including classic Atari games and high-fidelity robotic simulations.

Atari Benchmarks: Breakout and Flappy Bird

In Breakout and Flappy Bird, agents using PRFs achieved performance levels comparable to, and in some cases exceeding, agents trained with manually tuned, domain-specific reward functions. This demonstrates that visual similarity is a viable and effective proxy for traditional reward logic.

A Breakout agent learning to clear bricks using perceptual rewards based on visual similarity to a goal state.

Robotic Mimicry: The Kobian Simulator

A significant highlight of the research is the application of PRFs to robotic facial expressions. Using the Kobian simulator, the agent learned to synthesize "Happy" and "Surprise" expressions. Most notably, the Human PRF (HPRF) experiment showed that a robot could learn to mimic human expressions by comparing its own motion templates to those derived from the Cohn-Kanade human facial expression database. This cross-domain success suggests that pixels can serve as a universal language for transferring skills from humans to machines, regardless of differences in underlying geometry.

Discussion and Future Work

While PRFs offer a powerful alternative to manual reward engineering, challenges remain. The authors identify the "infinite reward" problem, where an agent may prefer to stay in a high-reward "near-goal" state indefinitely rather than completing a task. Additionally, while PRFs reduce the need for state-based tuning, they introduce new hyperparameters such as HOG cell size and EMA decay rates. Future work will focus on better integration of terminal functions and improving the robustness of visual mappings in highly cluttered or complex environments.

Summary updated

BibTeX
@misc{edwards2016perceptual,
  author = {Ashley D. Edwards and Charles Lee Isbell Jr. and Atsuo Takanishi},
  title = {{Perceptual Reward Functions}},
  year = {2016},
  eprint = {1608.03824},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1608.03824},
}
Figure