HypMoE-ReID: Hyperspherical Mixture-of-Experts for Large Scale Person Re-Identification

Kunlun Xu, Haotong Cheng, Yufei Guo, Jiahuan ZhouNeurIPS 2026

TL;DR

Mixture-of-Experts (MoE) architectures revolutionized large language models by routing distinct inputs to specialized sub-networks, yet they fail spectacularly at fine-grained visual tasks like Person Re-Identification (ReID)—where every input looks roughly the same: a person. Because standard routers cannot easily distinguish subtle visual details, they panic and send almost every image patch to the same overloaded sub-network. HypMoE-ReID solves this "routing collapse" by mapping features onto a unit hypersphere, filtering out background noise, and geometrically forcing experts apart so they naturally specialize in distinct human body parts.

What Problem Does This Paper Address?

Person Re-Identification (ReID) is the computer vision task of matching the same pedestrian across non-overlapping security cameras. Historically, ReID models have been trained on small, curated datasets using dense Vision Transformers (ViTs). However, as surveillance data scales into the hundreds of thousands of images across wildly different environments, dense models hit a wall: because every image passes through the exact same shared parameters, the model is forced to learn generic compromises rather than specialized, fine-grained representations.

Switching to a sparse Mixture-of-Experts (MoE) architecture—which selectively activates specialized sub-networks ("experts") per image patch—seems like the obvious fix. Yet, in single-modality vision tasks, MoEs notoriously suffer from routing collapse. Unlike text or multi-modal tasks where domains are cleanly separated, pedestrian images are remarkably homogeneous at a coarse level. Confronted with subtle inter-person differences and distracting background clutter, the MoE router fails to differentiate tokens, funneling everything to one or two overworked experts while leaving the rest "dead."

Figure 1: Dense models introduce shared knowledge to process all input content, failing to handle diverse person and background noise features. Existing MoE confronts severe routing collapse under fine- grained ReID data. Our method learns better expert specialization by Routing Diversity Learning, while being robust to diverse fine-grained person and background noise information.

Methods

HypMoE-ReID builds on a standard interleaved ViT-MoE backbone (alternating dense Transformer blocks with sparse MoE layers, using 1 shared expert and 16 routed experts per sparse layer), but reimagines the routing geometry on a unit hypersphere ($\ell_2$-normalized feature space):

  • Hyperspherical Top-1 Routing: Each expert is represented by a learnable prototype vector on the unit sphere. Incoming image tokens are normalized and routed to the single expert with the highest cosine similarity.
  • Token Purification: Even with good routing, an expert's assigned batch of tokens will contain uninformative background noise. Before updating the routing geometry, the model computes a "purified" cluster center for each expert by weighting tokens according to their cosine similarity with the expert's prototype—effectively muting noisy outliers that deviate at wide angles.
  • Routing Diversity Learning: To prevent experts from clumping together, the authors apply metric-learning losses directly to the expert prototypes and their purified token clusters. A Global Separation Loss (cross-entropy) pulls each prototype toward its own purified cluster center while pushing it away from all others. Simultaneously, a Local Diversification Loss (soft-margin triplet loss) maximizes the angular margin between an expert and its single hardest negative neighbor, carving out sharp boundaries between specialties.
Figure 4: HypMoE-ReID on unit hypersphere SD−1. (a) Top-K Routing assigns tokens to the K nearest expert prototypes via cosine similarity. (b) Token Purification reweights tokens by their similarity to the assigned prototype. (c) Routing Diversity Learning: Global Separation Loss aligns prototypes to their own cluster centers and pushes others toward orthogonality. Local Diversification Loss maximizes the angular margin between the anchor-positive pair and the hardest negative center.

Datasets

Existing ReID datasets are relatively small and feature narrow domain gaps, masking the limitations of both dense backbones and collapsing MoEs. To stress-test models under realistic scale and heterogeneity, the authors constructed a massive new benchmark comprising 809,701 images and 35,460 identities. It unifies 13 public datasets spanning diverse cameras, lighting, and scenes: Market-1501, MSMT17, CUHK-SYSU, CUHK03, IUST-PersonReID, LaST, MARS, RPIField, LPW, iLIDS-VID, PRID2011, DeepSportRadar, and PRW (converting video tracks into image frames). The authors also note evaluating on a combined large-scale vehicle ReID dataset in their appendix to verify generalizability.

Figure 2: Existing curated ReID datasets feature ideal distri- butions. We build a challenging large-scale ReID benchmark by reorganizing several ReID datasets.

Key Insights and Ideas

  • LLM MoE recipes do not translate directly to fine-grained vision: Transplanting popular LLM MoE configurations (like Mixtral or DeepSeek-R1) directly into ViTs actually degrades accuracy well below a standard dense ViT, despite burning up to $3\times$ the FLOPs. Standard load-balancing losses merely force overloaded experts to process tokens they aren't specialized for.
  • Less is more—Top-1 beats Top-2 routing: While LLMs typically blend Top-2 or Top-4 experts per token, activating just one routed expert (alongside one shared expert for generic knowledge) works far better in ReID. Top-1 routing prevents incompatible, fine-grained feature extractors from interfering with each other.
  • Emergent, human-interpretable part discovery: Without any human body-part labels or priors, geometric separation on the hypersphere naturally drives individual experts to specialize in distinct semantic regions—producing dedicated "Head Experts," "Upper-Body Experts," "Lower-Body Experts," and "Background Experts."

Key Results

  • Crushing Sparse Baselines: HypMoE-ReID outperforms the strongest sparse MoE competitor (a Qwen 2.5-style ViT) by +11.85% mAP and +10.24% Rank-1 (R@1) average accuracy across the 13-dataset benchmark, and beats DeepSeek-R1's MoE architecture by over +11.3% mAP / +10.3% R@1.
  • Beating Dense Backbones for Virtually Free: It is the only tested sparse architecture to beat the dense ViT-B/16 baseline, gaining +2.15% mAP / +1.95% R@1 while requiring nearly identical compute (11.36 GFLOPs vs. 11.35 GFLOPs) and adding just 0.08M active parameters.
  • Plug-and-Play SOTA: Swapping HypMoE-ReID into established ReID frameworks consistently boosts performance. Paired with CLIP-ReID, it sets a new benchmark state-of-the-art at 76.28% Average mAP and 84.52% Average R@1.

Limitations and Future Work

The authors note a minor architectural overhead: introducing learnable routing prototypes adds a tiny increase in active parameters (+0.08M over dense ViT). However, they point out that this can be easily offset by slightly tuning down the hidden dimensions of the expert networks, preserving representation diversity with zero extra per-token compute cost. Broader future research directions are not explicitly discussed in the main paper.

Summary updated

Abstract

With the rapid growth of surveillance data, Person Re-Identification (ReID) is evolving toward large scale scenarios, where datasets exhibit substantial increases in both size and diversity. Under this trend, the widely adopted dense backbone architectures, such as Transformers, suffer from an inherent limitation: Shared parameters couple all input tokens, forcing the model to learn generic representations that are suboptimal for heterogeneous data sources. Although Mixture-of-Experts (MoE) architectures offer a promising solution for handling diverse data, they encounter a fundamental challenge in ReID. Specifically, person images exhibit high inter-instance similarity at the coarse level, while discriminative cues lie in subtle fine-grained details that are easily overlooked. As a result, existing MoE methods often suffer from severe routing collapse, leading to insufficient expert specialization and limited diverse knowledge acquisition capacity. To address these problems, we propose a novel framework, termed Hyperspherical Mixture-of-Experts for Large Scale Person Re-Identification (HypMoE-ReID). Specifically, motivated by theoretical analysis in hyperspherical space, HypMoE-ReID incorporates two key components: (1) a Token Purification mechanism that suppresses noisy tokens detrimental to expert specialization, and (2) a Routing Diversity Learning strategy that explicitly separates experts on a unit hypersphere to enforce specialization and prevent collapse. Furthermore, to facilitate the investigation in large scale ReID, we construct a large-scale ReID benchmark comprising 809,701 images by unifying 13 public datasets with significant distribution gaps. Furthermore, extensive experiments demonstrate that HypMoE-ReID outperforms state-of-the-art MoE-based methods by at least 11.3\%/10.3\% in Average mAP/R@1, and surpasses strong dense backbone models by 2.2\%/2.0\% in Average mAP/R@1. Our code will be released.
BibTeX
@inproceedings{xu2026hypmoe,
  author = {Kunlun Xu and Haotong Cheng and Yufei Guo and Jiahuan Zhou},
  title = {{HypMoE-ReID: Hyperspherical Mixture-of-Experts for Large Scale Person Re-Identification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=hjKg7mWKXq},
}
Figure