Relational Semantic Grounding for Test-Time Discovery
Authors: Tianle Liu, Gongbo Cheng, Chenggong Ni, Minming Gu, Tao Zhou, Fuyuan Hu, Fan Lyu
Organizations: School of Electronics and Information Engineering, Suzhou University of Science and Technology · School of Intelligence Science and Technology, Nanjing University · School of Computer Science Engineering, North Minzu University · Computer Vision Center, Universitat Autònoma de Barcelona
Test-Time Discovery (TTD) aims to recognize known classes and detect novel ones from a continuous unlabeled test stream after deployment. Existing TTD methods mainly rely on visual clustering or prototype comparison, and can only assign anonymous labels to discovered classes, leaving them difficult to interpret in open-world applications. In this paper, we propose SEGA, a Semantic Grounding with Attributes framework for TTD. SEGA leverages large language models to generate attribute-rich descriptions for known classes and constructs an attribute-anchored visual-semantic space during training. At test time, we introduce Relational Semantic Grounding (RSG), which grounds unknown samples with similar and dissimilar known-class anchors, prompts the LLM to generate candidate concepts, and reranks them in the learned semantic space. The selected concept is further used for confidence-guided test-time semantic stabilization. By coupling attribute-level semantic alignment with relational concept grounding, SEGA transforms anonymous test-time clusters into interpretable semantic concepts. Experiments show that SEGA improves TTD baselines with the promise of semantic grounding for open-world.
Figures & tables
Figure 1: Comparison among different discovery method. (a) Non-semantic discovery, where unknown samples are detected or clustered online but are only assigned anonymous placeholder labels. (b) Pre-known semantic discovery handles unknown sample by matching visual features to a predefined category vocabulary, but it is unrealistic and its discovery ability is limited. (c) Our method aims to more meaningful and open-ended test-time discovery where unknown classes are grounded with visual and semantic relations to known classes, and interpreted through concept generation.
Figure 2: T-SNE visualization of the CLIP-based textual feature for different kinds of text prompt.
Figure 3: Method Schema. During training, LLM-generated attribute descriptions are used to construct a semantic space and guide cross-modal alignment between images and text. During testing, we discovers unknown classes, retrieves their semantic relations to known class anchors, and queries the LLM to generate candidate category names. The candidates are then grounded and filtered by the RSG module, and the selected prediction is used to guide confidence-aware test-time updates.
Method
Real-time Evaluation
Post Evaluation
KA ↑
TA ↑
CA ↑
KA ↑
TA ↑
CA ↑
KF ↓
CIFAR100D
L2P ( Wang et al., 2022b )
59.93±2.15
8.57±2.49
43.10±4.30
50.53±7.25
9.60±1.50
27.39±2.11
27.85±7.21
DP ( Wang et al., 2022a )
66.09±1.01
8.80±1.69
48.34 ±6.78
56.19±2.00
8.68±2.06
28.93±2.25
29.06±1.99
GMP ( Cendra et al., 2024 )
72.77±1.20
7.37± 0.88
42.26±4.54
67.21±2.53
13.04±2.59
27.10±1.77
17.69±2.53
PHE ( Zheng et al., 2024a )
72.35±1.12
16.74±1.05
37.34±1.31
70.12±1.07
14.55± 1.01
24.65±1.35
2.12 ±0.92
HM ( Lyu et al., 2025b )
79.17± 0.13
21.13± 0.62
56.37 ±1.42
80.73 ±1.59
31.03±1.24
34.81± 1.22
3.41±1.49
Table 1: Comparisons on four datasets. Real-time evaluation reflects the accumulated performance across all test batches, while post evaluation reassesses all test samples after testing. Bold and underlining denote the best and second-best results.
Figure 4: Comparisons of average Semantic Score ( S 2 ) on predictions of unknown classes.
Figure 5: Some examples of our prediction procedure and textual feature distribution of output. (Size of bubble and value in bubble is S 2 of the output.)
Method
CIFAR100D
CUB200D
T-ImageNetD
AircraftD
HCA
ARI
NMI
VM
HCA
ARI
NMI
VM
HCA
ARI
NMI
VM
HCA
ARI
NMI
VM
HM ( Lyu et al., 2025b )
63.69
48.35
73.08
73.08
50.46
27.81
70.25
70.25
56.64
40.35
72.70
72.70
33.30
21.33
46.46
46.46
DAA ( Liu et al., 2025 )
65.62
53.96
75.20
75.21
58.19
32.43
75.29
75.29
58.91
42.50
73.53
73.53
32.08
21.20
46.44
46.44
Ours
66.73
53.47
75.51
75.51
58.58
33.66
75.07
75.07
58.55
43.50
74.59
74.59
33.74
22.58
47.12
47.12
Table 2: Comparisons of clustering metrics of post evaluation on four datasets.
Table 8
Figure 6: T-SNE visualization in feature space on CIFAR100D with known and unknown classes.
Test-Time Adaptation (TTA) and Generalized Category Discovery (GCD) are traditionally treated as disjoint problems: the former adapts models to domain shift assuming all test classes are known, while the latter discovers novel categories assuming labeled training data for known classes. However, real-world deployment rarely fits either setting. Motivated by this gap, we introduce Test-Time Generalized Category Discovery (TT-GCD), a unified and more realistic scenario where a vision-language model must adapt to distribution shifts, classify known categories using only textual supervision, and discover novel categories, all during test time and without access to labeled data. To address this challenging scenario, we propose PACT (Prototype Assignment for Category discovery at Test time), a fully unsupervised framework that casts known-class recognition and novel-class discovery via prototype assignment. PACT first re-aligns shifted visual features with the text-derived class representations of the VLM using confident zero-shot predictions. Known and novel categories are then both represented by prototypes in the visual embedding space, estimated from the unlabeled test stream, and each test image is assigned to the category whose prototype is most similar to its visual feature. Extensive experiments across corruption and domain-shift benchmarks demonstrate that PACT outperforms adapted state-of-the-art TTA and GCD methods, effectively bridging the gap between adaptation and discovery.
Shambhavi Mishra, Omprakash Chakraborty, Julio Silva-Rodriguez +3
Open-vocabulary semantic segmentation (OVSS) repurposes a pretrained CLIP encoder for dense prediction without additional labeled supervision. Existing methods improve CLIP's spatial behavior either by redesigning its internal attention or by injecting features from auxiliary vision foundation models; both require access to the host's internal computation and are tailored to its specific forward pass. In this work, we propose Test-time Prototype Adaptation (TPA), a training-free plug-in that operates at the output level, leaving the host's forward pass and weights unmodified. By leveraging a lightweight transductive adaptation phase, TPA identifies confident anchor patches from the host's own output predictions on a small pool of unlabeled deployment-domain images, and aggregates their frozen DINO features into per-class prototypes; at inference, a single cosine similarity lookup against this frozen bank provides an auxiliary score fused linearly with the host's logits. TPA composes with five representative OVSS hosts spanning attention-redesign and VFM-injection designs, across three CLIP backbones, eight benchmarks, and multiple internal VFM choices. Under a single set of hyper-parameters and without per-host tuning or parameter updates, TPA consistently improves segmentation accuracy, with as few as approximately 10% of unlabeled deployment-domain images sufficing for effective bank construction on most benchmarks.
Haozhe Wang, Jintao Cheng, Weibin Li +1
South China Normal University · The Hong Kong University of Science and Technology
Test-Time Discovery (TTD) aims to recognize known classes and detect novel ones while the model is already deployed, operating directly on a continual unlabeled test-time stream. Existing TTD methods are overly conservative, making known and unknown features collapse together and difficult to separate during test-time adaptation. In this paper, we revisit TTD from an energy perspective and find that the natural energy gap between known and unknown classes is unstable and easily collapses. We therefore propose Energy Ring to stabilize this gap by anchoring the two types of classes on separate energy rings. A lightweight adapter enlarges the norm-based gap while preserving known-class directions, and a perturbation consistency module forms compact clusters for unknown classes. During testing, energy-guided confidence weighting improves prediction, and a stability-based rectification mechanism corrects unreliable updates. Experimental results show that Energy Ring significantly improves TTD performance against existing TTD methods.
Tianle Liu, Fan Lyu, Tingliang Feng +6
School of Electronics and Information Engineering, Suzhou University of Science and Technology · Computer Vision Center, Universitat Autònoma de Barcelona · College of Computer Science, Northwest University +4