Skip to content

NeurIPS 2026

Temporal Gradient Inversion for Private Trajectory Reconstruction in Embodied Reinforcement Learning

Sudip Bhujel1, Shanghao Shi2, Ruiquan Huang1, Ning Zhang2, Yang Xiao1

1University of Kentucky2Washington University in St. Louis

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.

Trajectory leakage

An embodied agent shares per-step policy gradients with a server; TRACE inverts the gradient stream back into the private observation-action trajectory.
Per-step policy gradients are not a private channel. Consecutive gradients are correlated in time, and TRACE turns that correlation into a full reconstruction of what the agent saw and did.

Why a stream leaks more than a frame

Gradient-inversion attacks have mostly been studied on a single batch: one gradient in, one image out. An embodied agent is different. It shares a gradient at every step of a trajectory, and consecutive observations come from the same room, seen from nearly the same pose.

A single-frame attacker throws that redundancy away. TRACE keeps it: each reconstruction becomes context for the next, so the attacker gets a better prior with every gradient it reads. Pixel error falls and fidelity rises as the trajectory gets longer. We call this the temporal reconstruction gain.

Schematic: as sequence length grows, pixel error (MSE) falls and reconstruction fidelity (PSNR) rises relative to a single-frame attack at t = 1.
Schematic of the temporal reconstruction gain. A single-frame attack is stuck at the t = 1 operating point; TRACE moves along the curve as more gradients arrive.

At a glance

  • 18.8dB

    PSNR on held-out scenes

  • 100%

    Action accuracy, PPO and A2C

  • 3–4.5ms

    Per reconstructed frame

  • ~6,900×

    Minimum speedup over optimization attacks

Amortized and autoregressive
A trained inverter conditions on the previous reconstruction and the current gradient to emit the next observation and action. No per-sample optimization, so a frame takes milliseconds rather than minutes.
Two structural signals
Cross-time correlation between successive gradients, bounded via conditional mutual information, and closed-form action recovery from the policy head, proven exact when entropy regularization is small.
Beyond the base setting
Holds up across recurrent, residual, and compact transformer victims, multi-modal inputs, larger discrete action spaces, and aggregated gradients.
What it means for defenses
Per-step perturbation is not enough. Protecting a gradient stream calls for sequence-aware privacy mechanisms.

Attack pipeline

TRACE pipeline: a gradient encoder compresses each gradient to a latent, an image encoder embeds prior observations, a causal temporal transformer contextualizes the interleaved sequence, and a residual decoder reconstructs the observation and predicts the action.
Gradient encoder, image encoder, causal temporal transformer, and a residual decoder that reconstructs the observation and predicts the action at every step.

The attacker sits at the server and receives one policy-learning gradient per environment step; it never sees the agent's camera. Because TRACE is amortized, there is no per-sample optimization: attacking a new trajectory is a single forward pass per step.

  1. 01

    Gradient encoder

    Compresses each per-step policy gradient into a compact latent token.

  2. 02

    Image encoder

    Embeds the reconstructions TRACE has already produced for earlier steps, so the model carries a visual memory of the scene.

  3. 03

    Causal temporal transformer

    Reads gradient tokens and image tokens interleaved in time. Causal masking means step t only sees steps up to t, matching what an online attacker would have.

  4. 04

    Residual decoder and action head

    Reconstructs the observation and predicts the action at every step. The action is also exposed in closed form by the policy-head gradient.

Because the inverter conditions on its own earlier reconstructions, small errors could snowball over a long rollout. Training is exposure-aware, so errors do not compound as the trajectory grows.

Results

We evaluate on point-goal navigation in AI2-THOR. The victim sees 84×84 RGB frames and picks one of five discrete actions; the attacker sees only the per-step policy gradients. Below is one held-out trajectory and what TRACE recovers from its gradient stream.

t = 0MoveAheadt = 1LookUpt = 2RotateLeftt = 3LookUpt = 4LookUpt = 5RotateLeftt = 6LookUpt = 7MoveAhead
Ground truth
TRACE
Ground truth (top) and TRACE reconstructions (bottom) over T = 8 PPO steps. TRACE recovers every action, shown under each step. Room layout, furniture, and lighting come through; fine texture is smoothed out.

Comparison with gradient-inversion baselines

MethodMSE ↓PSNR ↑SSIM ↑LPIPS ↓Act. Acc. ↑Time / frame
DLG0.2895.470.0431.22416.6%31.0 s
Inverting Gradients0.1618.730.1660.76631.5%39.3 s
Learning to Invert0.02316.790.5290.671100%1.2 ms
TRACE0.01418.770.6270.362100%4.5 ms

DLG and Inverting Gradients optimize a dummy input per sample; Learning to Invert is a learned single-frame inverter. All three are adapted from supervised classification with an actor-critic surrogate loss. PSNR in dB; means over held-out sequences, standard deviations are in the paper. Bold marks the best value per column.

The optimization attacks spend 30–75 seconds per frame and still land near noise. Learning to Invert is fast and gets the action right, but inverting each gradient in isolation caps its image quality. TRACE adds about 2 dB PSNR over it, raises SSIM by roughly 0.1, and nearly halves LPIPS, the perceptual distance, while staying within a few milliseconds per frame.

Generality across victims

The leakage is not an artifact of one small CNN. We retrain a separate attacker for each PPO victim below, with no data augmentation, covering a larger action space (K = 10), a compact vision transformer, residual IMPALA-style networks, a recurrent policy, and a victim with multi-modal inputs.

VictimKMSE ↓PSNR ↑SSIM ↑LPIPS ↓Act. Acc. ↑
CNN100.01318.920.6100.37299.5%
Tiny ViT50.04813.990.4560.54399.0%
IMPALA-style CNN50.00721.850.7250.24497.4%
Wider IMPALA CNN50.00722.360.7730.20898.5%
CNN + GRU50.01518.620.5650.39097.5%
Multi-modal CNN50.01119.780.6970.33597.4%

K is the number of discrete actions. Bold marks the best reconstruction.

More capacity does not protect the victim. The wider IMPALA network leaks the most, reaching 22.4 dB PSNR. The Tiny ViT is the hardest case for image reconstruction, yet its actions are still recovered 99% of the time. Across every architecture, action accuracy stays above 97%.

Defenses

We test the standard per-step defenses a deployment might reach for: quantizing the gradient, pruning gradient entries, adding Gaussian noise, and DP-SGD with per-sample clipping. The question is how strong each one has to be before TRACE stops working.

t = 1t = 2t = 3t = 4t = 5t = 6t = 7t = 8
Ground truth
No defense
Pruning 50%
Noise σ = 0.01
DP-SGD
The same trajectory under no defense, 50% pruning, noise σ = 0.01, and DP-SGD (C = 1.0, σ = 1.0). Pruning and light noise are visually indistinguishable from the undefended attack.

Attack quality under each defense

DefenseSettingMSE ↓PSNR ↑SSIM ↑LPIPS ↓Act. Acc. ↑
No defense—0.01818.90.6280.37499.9%
Quantization
8-bit0.02018.50.6190.38499.9%
4-bit0.07512.40.4220.64537.9%
2-bit0.09111.30.3800.68919.4%
Pruning (keep %)
90%0.01818.90.6280.37499.9%
50%0.01818.90.6280.37499.9%
10%0.01818.80.6240.37199.9%
Gaussian noise (σ)
0.0010.01818.80.6260.37699.8%
0.010.02318.10.5990.40194.9%
0.10.04914.20.4380.57259.9%
DP-SGD (ε, δ = 10⁻⁵)
ε = 100.06912.20.3450.65821.4%
ε = 50.06912.10.3420.66321.4%
ε = 10.07112.00.3460.65817.6%

Highlighted cells mark settings where the attack clearly degrades. Pruning settings give the fraction of gradient entries kept.

Pruning does almost nothing: keeping only 10% of the PPO gradient leaves PSNR at 18.8 dB and action accuracy at 99.9%. 8-bit quantization and σ ≤ 0.01 noise are similarly harmless. The attack only breaks under 4-bit or coarser quantization, σ = 0.1 noise, or DP-SGD, where action accuracy falls toward the 20% chance level for five actions. Protecting a gradient stream likely needs sequence-aware privacy mechanisms rather than per-step perturbation.

Citation

@inproceedings{bhujel2026trace,
  title         = {Temporal Gradient Inversion for Private Trajectory Reconstruction in Embodied Reinforcement Learning},
  author        = {Bhujel, Sudip and Shi, Shanghao and Huang, Ruiquan and Zhang, Ning and Xiao, Yang},
  booktitle     = {Advances in Neural Information Processing Systems (NeurIPS)},
  year          = {2026},
  eprint        = {2609.30258},
  archivePrefix = {arXiv},
  primaryClass  = {cs.LG},
  url           = {https://trace-gia.github.io/}
}