NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Investigating Action Encodings in Recurrent Neural Networks in Reinforcement Learning

Matthew Kyle Schlegel, Volodymyr Tkachuk, Adam White, Martha White

Abstract

Building and maintaining state to learn policies and value functions is critical for deploying reinforcement learning (RL) agents in the real world. Recurrent neural networks (RNNs) have become a key point of interest for the state-building problem, and several large-scale reinforcement learning agents incorporate recurrent networks. While RNNs have become a mainstay in many RL applications, many key design choices and implementation details responsible for performance improvements are often not reported. In this work, we discuss one axis on which RNN architectures can be (and have been) modified for use in RL. Specifically, we look at how action information can be incorporated into the state update function of a recurrent cell. We discuss several choices in using action information and empirically evaluate the resulting architectures on a set of illustrative domains. Finally, we discuss future work in developing recurrent cells and discuss challenges specific to the RL setting.

Introduction

In Reinforcement Learning (RL), building an internal representation of the world—a "state"—is essential for agents operating under partial observability. While Recurrent Neural Networks (RNNs) are standard for this task, the specific mechanism for incorporating an agent's previous actions into its state update remains under-explored. Most agents simply concatenate the previous action to the current observation (an additive approach). However, actions are not merely additional features; they are the primary drivers of state transitions. This paper investigates whether alternative architectural choices, specifically multiplicative encodings, can better capture this relationship.

Architectural Approaches to Action Encoding

The study compares two primary categories of architectural designs for incorporating action information into the state update:

  1. Additive Encodings: The conventional method where the action is concatenated to the observation. This includes standard RNN/GRU cells and "Deep Additive" variants that process the action through additional layers.
  2. Multiplicative Encodings: Inspired by second-order RNNs, this method uses the action to transform the state transition logic directly. In this setup, the action effectively "selects" or weights the transition matrix, allowing for a more direct modeling of action-contingent dynamics.
  3. Factored Multiplicative: To address the high parameter count of full multiplicative tensors, the authors evaluate a low-rank approximation that retains the benefits of multiplicative interaction with a smaller memory footprint.
Comparison of additive and multiplicative state update architectures.

Experimental Setup

The architectures were evaluated across several environments designed to test memory and action-contingent transitions:

  • Ring World: A cycle of states requiring the agent to count steps from a landmark.
  • TMaze & Directional TMaze: Tasks requiring long-term memory of a starting cue. The "Directional" version makes observations highly dependent on previous rotation actions.
  • Image Directional TMaze: Uses high-dimensional MNIST-style observations.
  • Lunar Lander: A continuous-state control task from OpenAI Gym.

Key Results and Insights

The empirical evaluation revealed that multiplicative updates allow the action to fundamentally change the dynamics of the state update, rather than just acting as another input feature.

Root Mean Squared Value Error across different action encoding strategies.

Key findings include:

  • Superior Performance: In the Directional TMaze, multiplicative variants (MARNN/MAGRU) achieved near 100% success, significantly outperforming additive models which struggled to exceed 70% success even with tuning.
  • Robustness to Truncation: Multiplicative models showed greater resilience when using short Truncated Backpropagation Through Time (BPTT), learning long-term dependencies more effectively than additive counterparts.
  • State Representation: TSNE visualizations indicated that multiplicative agents successfully grouped internal states by environmental meaning, whereas additive agents often became "hyper-focused" on the action itself.
  • Efficiency: Factored multiplicative models achieved performance comparable to full multiplicative versions while remaining parameter-efficient.

Discussion and Future Work

While multiplicative models demonstrate clear advantages in environments with action-contingent transitions and when using Experience Replay, some challenges remain. The performance gap narrows in purely online, incremental settings where initialization and learning rates become more volatile. Furthermore, scaling these methods to high-dimensional continuous action spaces remains an area for future research, potentially requiring advanced tensor factorization or embedding strategies.

For more details, see the full paper: Investigating Action Encodings in Recurrent Neural Networks in Reinforcement Learning

Summary updated

BibTeX
@article{schlegel2022investigating,
  author = {Matthew Kyle Schlegel and Volodymyr Tkachuk and Adam White and Martha White},
  title = {{Investigating Action Encodings in Recurrent Neural Networks in Reinforcement Learning}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=K6g4MbAC1r},
}
Figure