How You Act Tells a Lot: Privacy-Leakage Attack on Deep Reinforcement Learning

Xinlei Pan, Weiyao Wang, Xiaoshuai Zhang, Bo Li, Jinfeng Yi, Dawn Song

Abstract

Machine learning has been widely applied to various applications, some of which involve training with privacy-sensitive data. While privacy breaches in supervised learning are well-studied, the vulnerabilities of deep reinforcement learning (DRL) remain largely unexplored. This paper investigates whether trained DRL policies can leak private information about their training environments. We propose two primary methods: environment dynamics search via genetic algorithms and candidate inference based on shadow policies. Our experiments demonstrate that DRL agents potentially leak sensitive information, such as floor plans in navigation tasks and hardware configurations in continuous control environments. We achieve an average floor plan recovery rate of 95.83% for policy gradient agents and high accuracy in recovering robot parameters and driving conditions. This work highlights a critical privacy risk in deploying DRL-based systems.

Introduction

As deep reinforcement learning (DRL) moves from research labs into real-world applications—such as indoor service robots, industrial automation, and autonomous vehicles—the trained "policy" (the neural network governing the agent's behavior) becomes a potential vector for privacy leakage. This paper defines the Dynamics Recovery problem: can an attacker reverse-engineer private details of the training environment simply by observing how a trained agent acts? For instance, could a competitor infer the proprietary floor plan of a facility where a navigation robot was trained? Our research proves that the way an agent acts "tells a lot" about the world it grew up in.

Methodology

We propose two black-box attack vectors that do not require access to the neural network's internal weights, only observations of the agent's actions in response to various states:

  1. Transition Dynamics Search (Genetic Algorithm): This approach is used when the attacker knows the general constraints of an environment (e.g., a 7x7 grid) but not the specific layout. A Genetic Algorithm (GA) evolves a population of candidate environments, scoring them based on how closely an optimal policy in the candidate matches the observed behavior of the target (victim) policy.
  2. Candidate Inference (Shadow Policies): This method applies when the attacker has a discrete set of potential environments (e.g., "was this trained on Robot A, B, or C?"). The attacker trains multiple "shadow policies" on each candidate to establish behavioral benchmarks. A Support Vector Machine (SVM) then classifies the victim agent's performance patterns to identify the most likely training environment.

Experimental Setup

Our attacks were evaluated across diverse simulation environments:

  • Grid World: A navigation task using LiDAR-like sensors to recover 2D floor plans.
  • MuJoCo/Roboschool (Hopper & Half-Cheetah): Continuous control tasks to infer physical parameters like torso density, joint friction, or motor power.
  • Box2D (Bipedal Walker): Used to infer hull angle speed settings.
  • TORCS: A high-fidelity driving simulator used to infer road surface friction coefficients.

Key Insights: Memorization as a Vulnerability

A primary driver of these leaks is the tendency of DRL agents to overfit to their training environments.

DQN agent memorization: the agent follows the same path even when obstacles are removed.

As illustrated in Figure 1, a DQN agent trained in a specific Grid World will follow the exact same trajectory even if all obstacles are removed. This confirms that the agent has "memorized" the optimal path rather than truly sensing its surroundings. Furthermore, we found that Policy Gradient (PG) methods leak more information than deterministic methods like DQN because their probabilistic output provides a richer signal for attackers to exploit.

Key Results

The proposed attacks demonstrated remarkable success across all tested domains. In the Grid World navigation task, the Genetic Algorithm recovered floor plans with high fidelity.

Comparison of ground truth floor plan vs. various levels of recovery similarity.

As shown in Figure 4, the algorithm can reach up to 100% similarity in reconstructing the training environment. Quantitatively, we achieved a 95.83% accuracy for PG agents and 89.55% for DQN agents in floor plan recovery. In robot configuration tasks (Hopper and Half-Cheetah), the shadow policy attack identified the correct hardware setup with over 81% accuracy. In the TORCS simulator, road friction coefficients were identified with 94.3% accuracy.

Conclusion and Future Work

This study reveals that privacy leakage is a significant, yet overlooked, risk in DRL. The leakage is essentially a byproduct of the agent's failure to generalize beyond its training data. While our current work focuses on relatively low-dimensional state spaces, future research should explore how these vulnerabilities scale to complex 3D environments.

To mitigate these risks, we suggest focusing on Privacy-Preserving Reinforcement Learning. Potential defenses include incorporating differential privacy by adding noise to the policy or enforcing stricter generalization requirements during training to ensure behavior is driven by immediate sensory input rather than environmental memory.

Summary updated

BibTeX
@inproceedings{pan2019how,
  author = {Xinlei Pan and Weiyao Wang and Xiaoshuai Zhang and Bo Li and Jinfeng Yi and Dawn Song},
  title = {{How You Act Tells a Lot: Privacy-Leakage Attack on Deep Reinforcement Learning}},
  booktitle = {AAMAS},
  year = {2019},
  url = {https://openreview.net/forum?id=QK8k77ukhe0},
}
Figure