Test-Time Generalized Category Discovery

Shambhavi Mishra, Omprakash Chakraborty, Julio Silva-Rodriguez, Ismail Ben Ayed, Marco Pedersoli, Jose DolzarXiv 2026

TL;DR

This paper introduces Test-Time Generalized Category Discovery (TT-GCD), a realistic deployment scenario where a model must adapt to domain shifts, recognize known classes via text prompts, and discover entirely new categories—all at inference time without labeled data. The authors propose PACT, a framework that uses lightweight feature re-alignment and unified visual prototypes to significantly outperform existing adaptation and discovery methods while being up to 22x faster.

What Problem Does This Paper Address?

In the lab, we often treat "domain shift" and "novel category discovery" as separate problems. Test-Time Adaptation (TTA) focuses on models handling environmental changes (like snow or fog) but assumes the list of objects remains the same. Conversely, Generalized Category Discovery (GCD) focuses on finding new types of objects but usually assumes the environment is stable and requires labeled training data for known classes.

Real-world deployment is messier. Imagine an autonomous vehicle trained in sunny New York but deployed in a snowy mountain pass in Alberta. It faces a "compound challenge": familiar objects (cars, pedestrians) look different due to the snow glare (domain shift), and it encounters completely new objects it was never trained on, like moose or bears (novel categories).

The authors argue that existing paradigms fail here: TTA methods misclassify the moose as a car, while GCD methods break down under the domain shift. TT-GCD is the first setting to demand simultaneous adaptation, recognition, and discovery under fully unsupervised test-time conditions.

Figure 1: The TT-GCD setting. A VLM trained on New York streets, with no labeled source data [Left], is deployed on an unlabeled Alberta stream [Middle] that combines domain shift (snow), known classes (car) and novel classes (moose). [Right] TTA misclassifies the novel class as a known class, Open-Set TTA discards it as an outlier, GCD needs labeled target-domain data, and TT-GCD adapts to the shift, classifies the known and discovers the novel.

Methods

The authors propose PACT (Prototype Assignment for Category discovery at Test time), which decouples the problem into two stages:

  1. Feature Re-Alignment: When the domain shifts, visual features drift away from their corresponding text embeddings in models like CLIP. PACT fixes this by collecting a small initial buffer of test images and updating only the LayerNorm affine parameters of the image encoder. This is guided by confident "zero-shot" predictions—essentially using the model's own best guesses to pull shifted visual features back toward the fixed text anchors.
  2. Unified Category Discovery: A major hurdle in Vision-Language Models (VLMs) is the "modality gap"—image and text embeddings often occupy different regions of the feature space. To avoid biasing the model toward one modality, PACT represents both known and novel categories as visual prototypes on a unit hypersphere.
  3. Known prototypes are estimated from the re-aligned features of the initial buffer.
  4. Novel prototypes are initialized using a spherical k-means++ approach to cover "unoccupied" regions of the feature space.
  5. Streaming Adaptation: Once initialized, the encoder is frozen to save computation. As new images arrive, the model performs a simple nearest-prototype assignment and updates the prototypes online.

Datasets

The researchers evaluated PACT across five diverse benchmarks, using a 50/50 split between known and novel classes:

  • Corruption Benchmarks: CIFAR-10-C, CIFAR-100-C, and ImageNet-C (simulating 15 types of synthetic corruptions like blur and noise).
  • Natural Shift: DomainNet (testing across styles like Clipart, Painting, and Sketch).
  • Fine-grained Shift: CUB-C (birds dataset with corruptions).

Key Insights and Ideas

  • The Modality Gap Matters: One of the most important findings is that representing known classes with visual prototypes—rather than just their original text embeddings—leads to massive performance gains (up to 27 points on DomainNet). This levels the playing field between known and novel classes in the embedding space.
  • Alignment Benefits the Unknown: Even though the feature re-alignment stage only uses pseudo-labels for known classes, it significantly improves the discovery of novel classes. By cleaning up the visual encoder's representations, the "clusters" for new objects become much tighter and easier to separate.
  • Efficiency is King: By freezing the encoder after a brief warmup, PACT avoids the heavy "backward pass" required by most TTA methods during the rest of the stream. This makes it viable for real-time applications.
Figure 2: Mean performance (Known vs. novel) over CIFAR-10-C, CIFAR-100-C and ImageNet-C. Dashed lines mark the best baseline on each axis.

Key Results

  • Accuracy: PACT consistently outperformed seven adapted baselines. On CIFAR-10-C, it beat the next best method by 16.8 points in overall accuracy. On the challenging DomainNet natural shift, it achieved a mean accuracy of 46.89% compared to the best baseline's 22.56%.
  • Speed: PACT processes a batch of 128 images in just 76ms, representing a 12–22x speedup over online adaptation baselines that require constant gradient updates.
  • Flexibility: The system remains effective even when the number of novel categories is unknown and must be estimated from the data stream.

Limitations and Future Work

  • Warmup Dependency: PACT requires an initial buffer (warmup) to perform re-alignment. In scenarios where the domain shifts constantly throughout the stream (rather than once at the start), a single re-alignment might not be enough.
  • Novel Class Estimation: While PACT works with an estimated number of novel classes, there is still a performance gap compared to when the exact number is known. Improving "on-the-fly" cluster count estimation remains an open challenge.
  • Class Imbalance: The current study assumes a relatively balanced distribution of classes; real-world "long-tail" distributions where some novel classes are very rare might require further refinement of the prototype update rules.

Summary updated

BibTeX
@misc{mishra2026test,
  author = {Shambhavi Mishra and Omprakash Chakraborty and Julio Silva-Rodriguez and Ismail Ben Ayed and Marco Pedersoli and Jose Dolz},
  title = {{Test-Time Generalized Category Discovery}},
  year = {2026},
  eprint = {2609.33937},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.33937},
}
Figure