Skip to main content
QUICK REVIEW

[Paper Review] Visualizing Dynamics: from t-SNE to SEMI-MDPs

Nir Ben-Zrihem, Tom Zahavy|arXiv (Cornell University)|Jun 22, 2016
Reinforcement Learning in RoboticsComputer Science22 references12 citations
TL;DR

This paper proposes a fully automatic method to discover and visualize a Semi-Markov Decision Process (SMDP) model from Deep Q-Network (DQN) representations, using time-aware clustering on t-SNE-embedded neural activations. The approach reveals hierarchical temporal abstractions and policy structure without domain knowledge, validated through likelihood-based evaluation and visual interpretation of learned skills in Atari environments.

ABSTRACT

Deep Reinforcement Learning (DRL) is a trending field of research, showing great promise in many challenging problems such as playing Atari, solving Go and controlling robots. While DRL agents perform well in practice we are still missing the tools to analayze their performance and visualize the temporal abstractions that they learn. In this paper, we present a novel method that automatically discovers an internal Semi Markov Decision Process (SMDP) model in the Deep Q Network's (DQN) learned representation. We suggest a novel visualization method that represents the SMDP model by a directed graph and visualize it above a t-SNE map. We show how can we interpret the agent's policy and give evidence for the hierarchical state aggregation that DQNs are learning automatically. Our algorithm is fully automatic, does not require any domain specific knowledge and is evaluated by a novel likelihood based evaluation criteria.

Motivation & Objective

  • To address the lack of tools for analyzing and visualizing temporal abstractions in Deep Reinforcement Learning agents.
  • To automatically discover an internal Semi-Markov Decision Process (SMDP) model from DQN representations without requiring domain-specific knowledge or manual feature engineering.
  • To develop a visualization framework that overlays SMDP structure on t-SNE maps for interpretability of DQN policies.
  • To evaluate the discovered SMDP model using novel likelihood-based criteria and correlation with trajectory rewards.

Proposed method

  • Train a DQN agent and record state visits, neural activations, Q-values, and value estimates during evaluation.
  • Apply t-SNE dimensionality reduction to the DQN’s last-layer activations to create a 2D embedding preserving local structure.
  • Use a novel time-aware clustering algorithm that incorporates temporal context (sliding window of size w) to group t-SNE points into clusters representing states with similar dynamics.
  • Fit an SMDP model by estimating transition probabilities and rewards from the clustered data using empirical frequencies.
  • Visualize the SMDP as a directed graph on top of the t-SNE map, with nodes as clusters and edges as transitions.
  • Evaluate model quality using three criteria: value function consistency (VMSE), correlation between greedy policy choices and trajectory rewards, and correlation between greedy policy and top/bottom reward trajectories.

Experimental results

Research questions

  • RQ1Can we automatically discover a structured, interpretable SMDP model from the internal representations of a trained DQN without prior knowledge?
  • RQ2Does the discovered SMDP reflect meaningful temporal abstractions and hierarchical state aggregation in DQN policies?
  • RQ3Can the SMDP model be used to explain the agent’s behavior through visual and quantitative evaluation?
  • RQ4How well does the SMDP model predict actual agent behavior, as measured by reward correlation and value consistency?

Key findings

  • The SMDP model revealed clear, interpretable skills in the Breakout environment, such as cluster 10 showing a well-defined left-tunnel carving policy.
  • Clusters with higher transition entropy (e.g., clusters 6 and 16 in Breakout) showed less defined policies and more ambiguous mean states, indicating uncertainty in learned behavior.
  • In Pacman, clusters were spatially localized, with distinct agent positions (e.g., cluster 19 in the north-west, cluster 9 in the south-east), confirming location-based state abstraction.
  • The SMDP value function showed high correlation with the DQN’s Q-values, indicating strong model fitness as measured by VMSE.
  • The greedy policy’s transition choices correlated positively with high-reward trajectories, with higher correlation to top-rewarded paths than to low-rewarded ones.
  • The model achieved a sparse transition matrix, indicating that each cluster transitions only to a small subset of other clusters, supporting the presence of distinct, localized skills.

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.