XAI and Strategy Extraction via Reward Redistribution

Marius-Constantin Dinu, Markus Hofmarcher, Vihang Prakash Patil, Matthias Dorfer, Patrick M. Blies, Johannes Brandstetter, Jose A. Arjona-Medina, Sepp Hochreiter

Executive Summary

Align-RUDDER bridges the gap between bioinformatics and reinforcement learning (RL) by utilizing Multiple Sequence Alignment (MSA) to extract interpretable strategies from a small number of expert demonstrations. By redistributing rewards to key sub-tasks, it enables agents to solve complex, sparse-reward challenges—such as mining a diamond in Minecraft—far more efficiently than standard deep learning approaches.

Introduction & Problem Statement

Reinforcement Learning agents are notoriously "black box" models. While they can achieve superhuman performance in complex games, it is often impossible to decipher why they made a specific decision or what overarching strategy they are following. This lack of interpretability remains a major barrier to deploying RL in high-stakes real-world applications like robotics or medical systems.

Furthermore, RL struggles significantly with delayed and sparse rewards. Imagine playing a game of chess where the only feedback is a single signal (+1 for a win, -1 for a loss) at the very end. Determining which of the 50 moves actually caused the win is known as the credit assignment problem. Previous methods, such as RUDDER, used LSTMs to redistribute rewards but required massive amounts of data to learn effectively. To overcome this, the authors propose extracting strategies from just a handful of expert demonstrations using techniques borrowed from biological sequence analysis.

Methodology: Align-RUDDER

The authors introduce Align-RUDDER, which replaces the complex LSTM in the original RUDDER framework with a Profile Model based on Multiple Sequence Alignment (MSA)—a staple tool in bioinformatics typically used for comparing DNA or protein sequences.

The process follows five key steps:

  1. Defining Events: Raw states are clustered into discrete "events" (e.g., "picked up wood," "crafted pickaxe").
  2. Scoring Matrix: A matrix is constructed where rare events are assigned higher scores, emphasizing their strategic importance.
  3. Multiple Sequence Alignment (MSA): Using the ClustalW algorithm, the method aligns several expert trajectories to identify common "anchor points" or sub-tasks.
  4. PSSM and Profile Model: A Position-Specific Scoring Matrix (PSSM) is created to represent the "consensus" strategy of the experts.
  5. Reward Redistribution: When a new agent explores the environment, it receives a reward based on how well its current sequence of actions aligns with the expert profile. This transforms a single end-of-game reward into a series of immediate, dense rewards for following a proven strategy.

Experimental Datasets

The researchers evaluated Align-RUDDER on two primary benchmarks:

  • Gridworld (FourRooms and EightRooms): A classic RL environment where an agent must navigate through rooms and portals to reach a goal.
  • Minecraft (MineRL "ObtainDiamond" task): A highly complex, procedurally generated environment. To obtain a diamond, an agent must execute a long chain of sub-tasks: gather logs $\rightarrow$ craft planks $\rightarrow$ craft table $\rightarrow$ craft wooden pickaxe $\rightarrow$ mine stone, and so on. This is widely considered one of the hardest tasks in the RL community due to its extended time horizon and extremely sparse rewards.

Key Insights

  • Bioinformatics Meets RL: The most striking conceptual leap is treating a strategy as a "biological sequence" of actions. Just as evolution conserves vital protein domains, expert players conserve vital sub-tasks.
  • Data Efficiency: While deep learning models like LSTMs require thousands of examples to understand a sequence, MSA can extract a robust consensus from as few as two to ten demonstrations.
  • Intrinsic Explainability: Because the strategy is represented as a sequence of human-understandable events, the agent’s behavior is inherently "explained" by its alignment to the profile. Observers can pinpoint exactly where an agent deviates from the expert path.
  • Step-Function Q-values: The authors note that in complex tasks, the "value" of a state should not increase smoothly; rather, it should jump whenever a crucial sub-task is completed. Align-RUDDER explicitly rewards these strategic jumps.

Results

  • Superior Learning Speed: In Gridworld tasks, Align-RUDDER reached 80% of the optimal return significantly faster than state-of-the-art methods like DQfD or SQIL, particularly in low-data regimes (5–10 demonstrations).
  • Minecraft Breakthrough: Align-RUDDER stands as the first "pure learning method" (i.e., not relying on hand-crafted intermediate rewards) to successfully mine a diamond in the MineRL environment.
  • Quantitative Success: While the absolute success rate for mining a diamond was 0.1%, this is a landmark achievement given that other pure RL methods fail entirely. For context, an agent with a 50% success rate on each of the 31 required sub-tasks would have a theoretical success rate of only $4.66 \times 10^{-10}$.

Limitations and Future Work

  • Event Sensitivity: The method's success relies heavily on clustering states into discrete events. If there are too many distinct events (typically more than ~20), alignment quality drops—a phenomenon known in bioinformatics as the "Inconsistency of Maximum Parsimony."
  • Strategy Diversity: Align-RUDDER assumes that experts follow a broadly similar underlying strategy. If different experts utilize wildly different paths to the goal, the MSA might fail to find a meaningful consensus unless the demonstrations are first grouped by strategy.
  • Future Directions: The authors suggest that future work could incorporate more sophisticated clustering techniques to handle highly complex state spaces, as well as exploring methods to manage multiple, competing expert strategies simultaneously.

Summary updated

BibTeX
@inproceedings{dinu2020xai,
  author = {Marius-Constantin Dinu and Markus Hofmarcher and Vihang Prakash Patil and Matthias Dorfer and Patrick M. Blies and Johannes Brandstetter and Jose A. Arjona-Medina and Sepp Hochreiter},
  title = {{XAI and Strategy Extraction via Reward Redistribution}},
  booktitle = {xxAI @ ICML},
  year = {2020},
  doi = {10.1007/978-3-031-04083-2\_10},
}
Figure