Skip to main content
QUICK REVIEW

[Paper Review] Learning Finite State Representations of Recurrent Policy Networks

Anurag Koul, Sam Greydanus|arXiv (Cornell University)|Nov 29, 2018
Reinforcement Learning in RoboticsComputer Science29 citations
TL;DR

This paper introduces Quantized Bottleneck Insertion, a method to learn finite-state representations of recurrent policy networks by training autoencoders with quantized latent spaces to convert continuous RNN memory and observation vectors into discrete Moore Machines. The approach yields compact, interpretable policy models that preserve performance and reveal insights into memory and observation usage, with minimal-state representations (e.g., 3 memory states in Pong) and accurate extraction of ground-truth structures in synthetic tasks.

ABSTRACT

Recurrent neural networks (RNNs) are an effective representation of control policies for a wide range of reinforcement and imitation learning problems. RNN policies, however, are particularly difficult to explain, understand, and analyze due to their use of continuous-valued memory vectors and observation features. In this paper, we introduce a new technique, Quantized Bottleneck Insertion, to learn finite representations of these vectors and features. The result is a quantized representation of the RNN that can be analyzed to improve our understanding of memory use and general behavior. We present results of this approach on synthetic environments and six Atari games. The resulting finite representations are surprisingly small in some cases, using as few as 3 discrete memory states and 10 observations for a perfect Pong policy. We also show that these finite policy representations lead to improved interpretability.

Motivation & Objective

  • To improve interpretability of recurrent neural network (RNN) policies, which are difficult to understand due to high-dimensional continuous memory and observation vectors.
  • To address the challenge of analyzing RNN memory use, which is critical for decision-making but opaque due to complex gating mechanisms.
  • To develop a method that learns compact, finite-state representations of RNN policies that preserve performance while enabling analysis.
  • To identify cases where RNN policies rely on memory, observations, or neither—revealing whether they act reactively or in open-loop.
  • To enable visualization and formal analysis of policy behavior through extracted Moore Machines.

Proposed method

  • Train Quantized Bottleneck Networks (QBNs) as autoencoders with quantized latent representations to encode continuous RNN memory states and observation vectors.
  • Insert the QBNs into the trained RNN in place of continuous memory and observation 'wires', transforming the policy into a Moore Machine Network (MMN) with discrete states.
  • Use 'straight-through' gradient estimators to train the QBNs despite the non-differentiable quantization step.
  • Extract a Moore Machine from the MMN by clustering equivalent states and minimizing the machine using standard FSM minimization techniques.
  • Fine-tune the extracted Moore Machine to correct inaccuracies introduced by quantization.
  • Visualize and analyze the resulting finite-state machines to interpret memory and observation usage patterns.

Experimental results

Research questions

  • RQ1Can we learn a finite-state representation of an RNN policy that preserves its performance while enabling interpretability?
  • RQ2What is the minimal number of discrete memory states and observation features required to represent a trained RNN policy accurately?
  • RQ3In which Atari games does the RNN policy rely primarily on memory, observations, or neither—indicating reactive or open-loop control?
  • RQ4Can the method accurately recover known ground-truth Moore Machines in synthetic environments with controlled memory usage?
  • RQ5What insights into policy behavior can be gained by analyzing the structure of the extracted Moore Machines?

Key findings

  • The method successfully extracted the ground-truth Moore Machine in synthetic environments with known memory structures, demonstrating accuracy in representation learning.
  • In Atari games, the extracted Moore Machines maintained near-equivalent performance to the original RNN policies, with minimal performance drop after fine-tuning.
  • For the Pong policy, only 3 discrete memory states and 10 observations were needed to achieve perfect performance, indicating highly compact memory use.
  • In Bowling and Freeway, the analysis revealed that the RNNs used memory minimally or ignored observations entirely, indicating reactive or open-loop control strategies.
  • In Space Invaders and Boxing, both memory and observations were meaningfully used, as confirmed by the structure of the extracted Moore Machines.
  • The approach enabled the identification of policy behavior patterns not apparent from observing the RNN in action, such as the absence of meaningful memory use in certain games.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.