Abstract
Training a single crowd-counting model on multiple datasets often leads to "biased learning," where the model favors dominant domains at the expense of smaller ones. This paper introduces the Domain-specific Knowledge Propagating Network (DKPNet), which employs a novel Variational Attention (VA) mechanism. By modeling domain-specific features through a latent variable prior, DKPNet achieves state-of-the-art performance across diverse datasets without the performance degradation typical of joint training.
The Multi-Domain Challenge in Crowd Counting
Crowd counting—estimating the number of people in an image—is hindered by the "laborious labeling" problem. Manually annotating thousands of heads per image is exhausting, resulting in specialized datasets that are often small or focused on specific density levels. For example, ShanghaiTech A features highly congested scenes, while ShanghaiTech B focuses on low-density street views.
Ideally, Multi-Domain Learning (MDL) would allow a single "super-model" to learn from all available data. However, researchers observed a "joint training penalty": deep models tend to focus on the surface statistical regularities of dominant domains. In practice, joint training can decrease performance on smaller datasets by up to 5%, as the model "forgets" how to handle low-density scenes in favor of high-density ones that dominate the loss function.
Methods: From Standard to Variational Attention
The core innovation of DKPNet is moving away from standard self-attention mechanisms, such as Squeeze-and-Excitation (SE) blocks, which often produce confused feature distributions when faced with multiple domains.
1. Variational Attention (VA)
Inspired by Variational Autoencoders (VAEs), the authors introduce a latent variable $z$ to control the attention mechanism. They model the prior distribution of this latent variable as a Gaussian Mixture Model (GMM), where each Gaussian component represents a specific data domain. This allows the model to dynamically "switch" its attention strategy based on the domain of the input image.
2. Intrinsic Variational Attention (InVA)
To handle real-world scenarios where dataset labels might be messy or sub-domains might exist within a single dataset, the authors proposed Intrinsic Variational Attention (InVA):
- Clustering: InVA uses unsupervised clustering to reassign "intrinsic" domain labels, effectively handling overlaps between datasets.
- Sub-Gaussian Components (SGC): It breaks down each domain into finer sub-components to capture subtle variations in scene types.
The final architecture utilizes a truncated HRNet backbone, with VA/InVA modules refining feature maps before density estimation.
Key Results and Insights
DKPNet was evaluated on four major benchmarks: ShanghaiTech (Part A & B), UCF-QNRF, and the massive NWPU dataset. The model achieved State-of-the-Art (SOTA) results across the board:
- Performance Gains: On the NWPU validation set, DKPNet improved the Mean Absolute Error (MAE) by 24% compared to standard individual training.
- Consistency: Unlike baseline joint training, which saw performance drops on specific datasets, DKPNet improved performance on every dataset simultaneously.
- Efficiency: DKPNet is highly parameter-efficient, using only 14 million parameters—significantly fewer than competitors like Bayes (20M) or DM-Count (20M).
Conclusion
By forcing attention through a variational bottleneck, DKPNet compels the model to learn distinct, separable strategies for different crowd types. This "soft branching" approach is more efficient than previous "hard" multi-branch architectures. While the current two-stage training process (initial training followed by clustering for InVA) is effective, future work may focus on end-to-end self-supervised discovery of these variational domains.
Summary updated