Temporal Gradient Inversion for Private Trajectory Reconstruction in Embodied Reinforcement Learning

Sudip Bhujel, Shanghao Shi, Ruiquan Huang, Ning Zhang, Yang XiaoNeurIPS 2026

TL;DR

When distributed robots learn together by sharing only mathematical model updates (gradients) instead of raw camera feeds, we assume their physical surroundings stay private. This paper introduces TRACE, an attack showing that because a robot moves smoothly through a persistent 3D world, an honest-but-curious server can stitch those sequential updates together to reconstruct crisp videos of the private rooms the robot visited—and the exact actions it took—in mere milliseconds.

What Problem Does This Paper Address?

In distributed reinforcement learning (RL), fleets of embodied agents—think household vacuum robots or warehouse navigators—learn policies locally and send only parameter gradients back to a central server. The promise is privacy: raw camera frames never leave the device.

However, we already know from supervised learning that "gradient inversion" attacks can sometimes reverse-engineer training images from gradients. Historically, these attacks treated inputs as independent, isolated snapshots, often requiring tens of seconds or minutes of heavy optimization per image.

Embodied RL changes the game in two ways. First, actor-critic RL gradients (like PPO and A2C) are messy mixtures of policy, value, and entropy losses weighted by hidden rollout advantages, which trips up standard inversion methods. Second—and crucially—a robot's observations aren't independent snapshots; they are a movie governed by physics. Bounded turns and forward steps mean frame $t$ looks a lot like frame $t-1$. Prior single-frame attacks completely ignore this temporal coherence. The authors ask: Can an adversary weaponize the physical continuity of time to reconstruct entire private trajectories rapidly and accurately?

Figure 1: Illustration of trajectory reconstruction from embodied RL gradients. (Left) Prior work inverts each gradient gt independently, ignoring temporal coherence; TRACE processes the full trajectory {g1, . . . , gT } with a causal transformer that sequentially decodes observations (ˆst) and discrete actions (ˆat), improving recovery accuracy. (Right) Qualitative illustration of pixel error (MSE) and reconstruction fidelity (PSNR) versus sequence length t: single-frame optimization attacks (t=1) incur high error, while TRACE improves with longer context—realizing temporal reconstruction gain—until returns diminish as t →T (see Remark D.5).

Methods

Instead of running a slow optimization loop for every intercepted gradient, the authors propose TRACE (Temporal Reconstruction Attack on Consecutive Encodings), an amortized learning-based attack. The server trains an inversion network offline on auxiliary trajectories from the same task family, then runs near-real-time inference on the victim's ordered gradient stream.

Figure 2: TRACE attack overview.

TRACE consists of three core modules:

  1. Encoders: A residual MLP compresses million-dimensional raw gradients into compact latent vectors, while a CNN encodes visual frames into context tokens.
  2. Causal Temporal Transformer: Rather than looking at one gradient in a vacuum, a transformer interleaves gradient latents with previous image-context tokens using causal attention. As the sequence unfolds, historical visual context resolves ambiguities in the current noisy gradient.
  3. Dual-Head Decoder: From the contextualized latent, transposed convolutions reconstruct the RGB observation while an MLP predicts the discrete action taken.

Because training with ground-truth past frames ("teacher forcing") causes errors to snowball during real inference when ground truth is missing, the authors use scheduled sampling and a short-horizon autoregressive rollout loss so the model learns to trust its own slightly imperfect visual history.

Datasets

Rather than static image datasets, the authors generate trajectories using the AI2-THOR indoor 3D simulator. Victim agents are trained on point-goal navigation tasks, receiving $84 \times 84$ RGB camera observations and choosing from 5 discrete actions (MoveAhead, RotateLeft, RotateRight, LookDown, LookUp), with extended tests on 10 actions and multi-modal inputs. No standalone benchmark dataset is newly named, though the evaluation splits scenes into training and strictly held-out test rooms to measure zero-shot cross-scene transfer.

Key Insights and Ideas

  • A2C and PPO leak identically at the start of a round: Even though PPO uses a clipped surrogate objective and A2C does not, the authors prove mathematically that right at the broadcast checkpoint parameters ($\theta_0$), the clipping is inactive. Their per-step gradients coincide, meaning one attack breaks both algorithms without modification.
  • Actions hide in plain sight: You don't even need deep learning to figure out what the robot did. By summing the columns of the policy-head gradient matrix, an attacker can analytically recover the exact discrete action in closed form—provided the policy isn't 100% deterministic and entropy regularization is reasonably small.
  • Time is an information multiplier: Using conditional mutual information, the authors prove that conditioning on past gradients cannot hurt Bayes-optimal reconstruction—and actively helps whenever past frames carry scene layout info that the current noisy RL gradient missed. Remarkably, at sequence length $T=1$, TRACE actually underperforms a single-frame MLP baseline; its superiority comes entirely from stitching temporal context together.

Key Results

  • Speed & Fidelity: On held-out scenes ($T=8$), TRACE achieves 18.77 dB PSNR (PPO) and 18.87 dB PSNR (A2C) with 100% action recovery, running in just 3.0–4.5 ms per frame. Classical optimization baselines (DLG, IG) fail on complex RL losses (5.5–9.5 dB PSNR) while taking 31–76 seconds per frame. Compared to the strongest single-frame learned baseline (LtI), TRACE gains ~1–2 dB PSNR and nearly halves perceptual error (LPIPS drops from ~0.67 to ~0.36).
  • Sequence Length Scaling: Extending trajectory context from $T=1$ to $T=8$ yields a massive ~6 dB jump in PSNR (12.85 to 18.74 dB), climbing further to 20.29 dB at $T=64$.
  • Few-Shot Scene Adaptation: Zero-shot reconstruction on unseen rooms is already strong (18.8 dB), and fine-tuning on just 10%–50% of target-domain trajectories boosts PSNR up to 23.8 dB (SSIM 0.74).
  • Defenses Fall Short: Pruning 90% of gradient values or applying 8-bit quantization barely scratches TRACE (~18.5–18.8 dB PSNR, >98% action accuracy). Only heavy 2-bit/4-bit quantization, high Gaussian noise, or formal DP-SGD ($\varepsilon \in \{1, 5, 10\}$, dropping PSNR to ~12–13 dB and action accuracy to ~20%) meaningfully thwart the attack.

Limitations and Future Work

  • Per-step gradient assumption: TRACE primarily assumes the client transmits ordered, per-step gradients evaluated at the broadcast parameters $\theta_0$. When clients average gradients over multiple steps or perform multi-epoch local updates along a changing optimization path, temporal structure blurs.
  • Privacy-utility trade-offs: While DP-SGD successfully degrades the attack, the authors do not evaluate how much that noise harms the robot's actual navigation performance.
  • Future directions: Extending temporal attacks and sequence-aware defenses to continuous action spaces (like robotic arm torques), off-policy replay buffers with shuffled minibatches, and multi-epoch federated updates.

Summary updated

Abstract

Distributed learning in embodied reinforcement-learning agents offers a degree of privacy by retaining raw sensor data on-device and transmitting only policy gradients to the server. Yet temporal structure can amplify this leakage beyond single-frame attacks. We introduce Temporal Reconstruction Attack on Consecutive Encodings (TRACE), an amortized temporal gradient-inversion attack that autoregressively reconstructs the sequence of private observation-action trajectories from per-step policy-learning gradients. The attack exploits two structural signals ignored by prior single-frame methods: (i) cross-time correlation between successive embodied gradients, which we formalize via a conditional mutual-information bound, and (ii) closed-form action recovery from policy-head gradient structure, which we prove exact when standard entropy regularization is sufficiently small. On held-out embodied scenes, TRACE reaches $18.8$ dB PSNR with near-perfect action recovery at $3$–$4.5$ ms per reconstructed frame, dominating the learning-based baseline across all reconstruction metrics and exceeding optimization attacks while running orders of magnitude faster. Further evaluation demonstrates TRACE's broader applicability across recurrent, residual, and compact transformer victim architectures, multi-modal inputs, and larger discrete action spaces. Defense experiments suggest that protecting temporal gradient streams may require sequence-aware privacy mechanisms.
BibTeX
@inproceedings{bhujel2026temporal,
  author = {Sudip Bhujel and Shanghao Shi and Ruiquan Huang and Ning Zhang and Yang Xiao},
  title = {{Temporal Gradient Inversion for Private Trajectory Reconstruction in Embodied Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=beAxdz8rqD},
}
Figure