In deep learning, representing categories often relies on a simple assumption: we can allocate a dedicated parameter set—a prototype, centroid, proxy, or prompt—to every distinct class. Whether it is the final weight matrix of a standard softmax classifier, a set of learned anchors for deep metric learning, or class-conditional prompts in vision-language models, this one-to-one mapping provides a clean, explicit target for optimization.
This approach works exceptionally well for standard benchmarks with modest label spaces. However, real-world applications frequently break this paradigm. When scaling to web-scale image retrieval, open-vocabulary object detection, or face verification across millions of unique identities, the memory footprint of these category-specific parameters scales linearly ($O(C)$) with the number of classes $C$. Storing, updating, and computing gradients against millions of independent vectors or matrices quickly triggers a severe memory bottleneck, exhausting hardware resources and stalling training.
The Diverse Manifestations of Class-Specific Memory
The memory scaling challenge is not isolated to a single architecture; it reappears across various paradigms wherever category-specific states are maintained.
Centroids and Proxies in Metric Learning
Deep metric learning frequently utilizes explicit class centers to pull intra-class features together and push inter-class features apart. For instance, Qi et al. introduce contrastive-center loss, and Gallo et al. propose Git loss to optimize these embedding distances. Similarly, Kim et al. utilize proxy anchors to represent entire categories. While these methods provide strong discriminative signals, the authors across these works note that maintaining a unique learned vector or proxy for millions of categories creates an unsustainable memory bottleneck during the training phase.
Prompts and Queries in Vision-Language Models
As models shift toward parameter-efficient fine-tuning and open-vocabulary tasks, the per-class allocation has grown even heavier than a simple embedding vector. Ren et al. demonstrate that while class-specific visual prompts enable efficient adaptation of large pre-trained models, optimizing individual prompts for every category introduces substantial memory overhead that restricts web-scale deployment. Similarly, the test-time adaptation framework proposed in DART faces a scaling challenge when forced to maintain persistent learned states or prompts for tens of thousands of categories.
Statistical Summaries and Structural Matrices
The overhead becomes even more acute when classes require higher-order statistics rather than static vectors. Momeni et al. point out that storing statistical summaries like Gram matrices and class means for analytic continual learning creates a massive storage bottleneck as categories scale. In speaker verification, Zheng et al. show that storing a unique projection matrix for every speaker class creates prohibitive storage bottlenecks when scaling to large populations.
Why the Bottleneck Occurs: The Mechanics of the Explosion
To understand why this bottleneck occurs, we must look at the interaction between the computational graph and hardware constraints. The issue is rarely the static storage of the parameters on a disk; it is the active memory footprint required during backpropagation.
When a model computes a loss that contrasts a sample against all classes, it must load the parameters for all classes into GPU memory simultaneously. For a single prototype consisting of a 512-dimensional float32 vector, the memory is negligible. But if a model attempts to capture intra-class variance by using multiple sub-centers or prototypes per class—as explored by Tong et al. for noisy label correction and Su et al. for weakly supervised point cloud segmentation—the memory footprint is multiplied by the number of sub-centers, compounding the scalability crisis.
Naive Scaling:
[Class 1: Prototypes] -> Loaded into VRAM
[Class 2: Prototypes] -> Loaded into VRAM
...
[Class M: Prototypes] -> Loaded into VRAM (O(C) Memory Explosion)
Sparse/Dynamic Scaling:
[Active Mini-batch] -> Identifies relevant/confusing classes
-> Dynamically loads only a subset Q << C into VRAM
Furthermore, in dense prediction tasks like semantic segmentation or character recognition, predicting individual probability maps or calculating pairwise differences across high-dimensional label spaces creates severe memory overhead during loss computation, as highlighted by Cui et al. and Liao et al..
Algorithmic Strategies for Scalability
To escape the linear scaling trap, researchers have developed methods that decouple the size of the total label space from the active memory required during a single training step.
Sparse Activation and Confusing Classes
Instead of updating or computing losses against all classes simultaneously, models can dynamically isolate a subset of relevant classes. For instance, Jun Wang introduces an Include and Exclude (IE) loss that operates in an exponential projection space but restricts its focus to the $Q$ nearest "confusing" classes. This bypasses the need to compute gradients against the entire label space, turning an $O(C)$ problem into an $O(Q)$ problem during the backward pass.
Dual Optimization and Shrinking
For linear formulations, such as multi-class Support Vector Machines, the memory pressure often stems from storing dual variables for massive datasets. Keerthi et al. address this by optimizing dual variables one example at a time. They employ "shrinking" and "cooling" heuristics to identify and temporarily remove inactive variables from memory, drastically reducing the active working set size.
Knowledge Sharing and Meta-Embeddings
In long-tailed scenarios, maintaining independent memory banks for rare "tail" classes is highly inefficient because those parameters are rarely updated. To maximize memory utility, Chen et al. introduce a dynamic meta-embedding module. This allows tail classes to share or "borrow" semantic knowledge from a shared visual memory bank, ensuring that the allocated prototype space is utilized efficiently across the entire distribution rather than sitting idle.
Key Foundational Work
Evaluation of Summarization Schemes for Learning in Streams (2006) — contributed 2 concept elements to this direction.
A sequential dual method for large scale multi-class linear svms (2008) — contributed 1 concept elements to this direction.