Of Mice and Machines: A Comparison of Learning Between Real World Mice and RL Agents

Shuo Han, German Espinosa, Junda Huang, Daniel Dombeck, Malcolm A. MacIver, Bradly C. Stadie

Introduction: The Recklessness of Reinforcement Learning

Modern reinforcement learning (RL) algorithms have achieved superhuman performance in complex games and simulations. However, a significant behavioral gap remains between these artificial agents and biological organisms shaped by millions of years of evolution. While RL agents are masters of reward optimization, they are remarkably reckless, often risking "death" for marginal efficiency gains. In contrast, biological agents prioritize survival, exhibiting sophisticated risk-assessment behaviors like wall-following (thigmotaxis) and strategic hesitation.

This paper investigates this gap by comparing real mice with RL agents in a high-risk, predator-avoidance task. The authors identify that standard RL agents lack a concept of mortality; they will take a mathematically optimal direct path to a goal even if it means brushing dangerously close to a predator. To bridge this gap, the researchers introduced two biologically inspired mechanisms—a trauma-inspired replay buffer and variance-penalized TD learning—to encourage naturalistic, cautious behaviors.

Methods: Bridging the Gap with Biological Inspiration

The researchers compared real mice facing a robotic predator in a physical hexagonal arena with RL agents in a simulated Gymnasium counterpart. The baseline RL model used was TDMPC-2, a state-of-the-art model-based algorithm. To induce biological alignment, two novel modifications were implemented:

  1. Trauma-Inspired Safety Buffer (TISB): Inspired by biological trauma and PTSD, this modifies the standard experience replay buffer. It artificially amplifies the negative reward of being caught by a factor of 200 and ensures that 50% of every training batch consists of these "near-death" experiences.
  2. Variance-Penalized Temporal Difference (TD) Learning: Real mice often pause to assess highly uncertain situations. To replicate this, the authors modified the TD target to penalize Q-value variance across different actions. In states where actions lead to wildly different outcomes (e.g., when a predator is nearby), the high variance acts as a penalty, incentivizing the agent to wait and gather information rather than charging forward.
Experimental setup comparing real-world mouse behavior with a robotic predator to a simulated Gymnasium environment.

Experimental Framework and Datasets

The study utilized two primary data sources:

  • Real-World Mouse Data: Trajectory data from 8 laboratory mice navigating a physical hexagonal grid arena ("cellworld") while avoiding a robotic predator.
  • Simulated Environment: A custom "cellworld gymnasium" environment built on the Gymnasium API, perfectly mirroring the physical setup for training RL and LLM agents.

Interestingly, the authors also tested an LLM (GPT-4o) as an agent. Despite its vast world knowledge and cautious internal "reasoning" (e.g., outputting thoughts like "Moving cautiously..."), the GPT-4o agent exhibited the same reckless, direct-path behavior as standard RL agents, suggesting that LLMs lack inherent biological alignment regarding fear.

Key Results: Achieving Biological Alignment

The modifications successfully narrowed the behavioral gap between machines and mice:

  • Exploration Overlap: Standard RL agents explored only 21.3% of the arena, taking direct paths. Mice explored 77%. The visitation pattern overlap between baseline RL and mice was a mere 20.9%. With the implementation of TISB and Variance-Penalized TD learning (VP-TDMPC-2), this overlap jumped to 86.1%.
  • Emergence of Hesitation: The modified VP-TDMPC-2 agents traveled 45% less distance during their initial entry into the environment, mirroring the cautious "waiting and peeking" behavior of real mice.
  • Episode Length: Standard RL agents rushed the task in an average of 7.09 steps. The modified agent took 13.89 steps, aligning almost perfectly with the 14.04-step average of real mice, reflecting more deliberate planning under risk.
Simulated environment showing the RL agent (blue circle) navigating the hexagonal grid with visibility-based sensing.

Discussion and Future Work

While the modified VP-TDMPC-2 agent successfully learned to hesitate and follow walls, it is currently a proof-of-concept. Training stability remains a challenge, as cautious behaviors only emerge under specific hyperparameter settings. Furthermore, the model has yet to replicate complex biological strategies like "baiting," where a mouse intentionally attracts a predator's attention before retreating. Future work will focus on integrating deeper opponent modeling to capture these advanced survival strategies.

Summary updated

BibTeX
@inproceedings{han2025mice,
  author = {Shuo Han and German Espinosa and Junda Huang and Daniel Dombeck and Malcolm A. MacIver and Bradly C. Stadie},
  title = {{Of Mice and Machines: A Comparison of Learning Between Real World Mice and RL Agents}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=q2pjlx1OeX},
}
Figure