Skip to main content
Back

FedBPrompt Tracks People Across Cameras While Sharing 1% of Data

A visual prompting framework guides Vision Transformers toward pedestrians in federated re-ID, cutting communication by 99% while boosting cross-domain accuracy.

Pro

  • FedBPrompt learns visual prompts for federated person re-ID, guiding ViT attention to pedestrians. Paper
  • BAPM splits prompts into upper, middle, lower body groups plus holistic prompts with a constrained attention mask.
  • PFTS freezes the backbone and only communicates prompts, cutting uploaded parameters to about 1% of full model.
  • Beats SSCU by 3.3 mAP and 4.9 Rank-1 on average across three unseen domains under leave-one-out protocol.
  • Tested on CUHK02, CUHK03, Market1501, and MSMT17 with ViT-B/16, using 50 prompts per layer.
  • Code released at github.com/leavlong/FedBPrompt; accepted to CVPR 2026.

Cross-camera person re-identification usually assumes you can pool footage from every institution into one training set. In the real world you cannot: hospitals, transit agencies, and city surveillance systems keep their data siloed. A new paper accepted to CVPR 2026 tackles that constraint head-on with FedBPrompt, a framework that trains a Vision Transformer for federated domain-generalized re-ID by learning small sets of visual prompts instead of shipping the full backbone across the network.

Why global attention keeps missing the person

Federated Domain Generalization for Person Re-Identification (FedDG-ReID) is the task of learning identity features from clients that never share raw images, with the goal of generalizing to an unseen camera network. Vision Transformers dominate the leaderboard, but their global attention often fails to distinguish pedestrians from high similarity backgrounds or diverse viewpoints, and cross-client distribution shifts amplify the challenge.

The authors identify two concrete failure modes. When each client sees different scenes, the model latches onto whichever background is most common locally and produces false matches between different individuals. When viewpoints vary, patches of the same person land in different spatial positions, feature similarity collapses, and correct matches get missed.

Diagram of background and viewpoint heterogeneity across federated re-ID clients

Two flavors of prompt, one attention mask

FedBPrompt injects learnable tokens into every Transformer layer, but the trick is how those tokens are wired. The Body Distribution Aware Visual Prompts Mechanism (BAPM) divides prompts into two groups: Holistic Full Body Prompts suppress cross-client background noise, while Body Part Alignment Prompts capture fine-grained details robust to pose and viewpoint variations.

The alignment prompts are split into three disjoint subsets tied to the upper, middle, and lower thirds of the image. A structured attention mask then blocks each part-prompt from attending to patches outside its assigned band, so upper-body prompts can only interact with upper-body patches, and so on. Holistic prompts are unconstrained and can attend to every patch. Crucially, all prompts can still talk to each other via self-attention, letting the part tokens build structural relationships that the holistic tokens fold into a coherent global feature.

In practice the paper uses 50 prompts per layer: 15 for the three body regions (5 each) and 35 holistic ones. The mask itself is just an additive term inside the standard scaled dot-product attention, setting mismatched query-key pairs to negative infinity before the softmax.

Shipping 0.46M parameters instead of 86M

Full-parameter federated training of a ViT-B/16 is brutal on bandwidth. FedBPrompt's second contribution, the Prompt-based Fine-Tuning Strategy (PFTS), addresses that. Clients implant a lightweight, randomly initialized set of Body Distribution-Aware Visual Prompts and are tasked with exclusively training only these parameters. Only the updates to these prompt parameters are communicated to the central server for aggregation, reducing the uploaded parameter volume to as little as a mere 1% of the full model.

The workflow is straightforward federated averaging with a frozen ReID backbone:

  1. The server broadcasts current prompt weights to every client.
  2. Each client freezes the ViT, trains only its local prompts on its private dataset, and returns the updated prompts.
  3. The server aggregates prompts using dataset-size-weighted averaging.
  4. Repeat until convergence, then deploy the global prompts alongside the shared backbone.
FedBPrompt architecture showing client-side prompt injection and server-side aggregation

What the numbers say

Evaluation runs on four standard re-ID benchmarks: CUHK02, CUHK03, Market1501, and MSMT17, arranged in a leave-one-domain-out protocol so the model is always tested on an unseen camera network. The team plugged BAPM and PFTS into six existing FedDG-ReID baselines ranging from FedProx and MixStyle up through the recent SSCU method.

Averaged across three unseen-domain settings under Protocol-1:

  • SSCU baseline: 33.3 mAP / 48.9 Rank-1. Adding BAPM: 36.6 / 53.8, a gain of 3.3 and 4.9 points.
  • FedProx baseline: 22.9 mAP / 35.1 Rank-1. With BAPM: 32.9 / 48.6, jumping 10 and 13.5 points.
  • PFTS alone lifts every baseline by 4-11 points in mAP while communicating roughly 1% of the parameters.

The gains are largest on the hardest transfers, like training on Market1501+CUHK02+CUHK03 and testing on MSMT17, where BAPM adds 15.9 mAP points on FedProx and 5.8 Rank-1 on SSCU. Ablation confirms that the part-alignment prompts, not the holistic ones, are the primary driver: adding only holistic prompts helps, but the constrained-attention split is where the misalignment problem actually gets solved.

Attention map comparison between baseline and BAPM showing localized body-part focus

Where it fits and where it does not

The real breakthrough is architectural: this is one of the first visual-prompt designs built for federated aggregation rather than adapted from NLP. Existing prompt-based FL methods have focused exclusively on the text domain, communicating prompt updates for pre-trained language models. FedBPrompt shows that if you bake spatial structure into the prompt layout, prompt-only aggregation can approach full-parameter accuracy on a vision task with heavy distribution shift.

Practical implications for anyone deploying re-ID across institutions:

  • Communication cost drops from roughly 86M to 0.46M parameters per round, making mobile or edge participation viable.
  • Both BAPM and PFTS are drop-in modules for any ViT-based FedDG-ReID pipeline, so existing systems built on FedProx, FedPav, DACS, or SSCU can adopt them without a rewrite.
  • The three-band body split is a strong prior for upright pedestrian imagery, which means the same design would need rework for aerial, top-down, or heavily occluded footage where the upper/middle/lower assumption breaks down.

Code and training scripts are available at the official repository, and the full paper is on arXiv with a matching CVPR 2026 version in the open-access proceedings.