---
title: 'NC-GCD: Neural Collapse in Category Discovery'
url: https://www.emergentmind.com/topics/neural-collapse-inspired-generalized-category-discovery-nc-gcd
type: topic
---

# NC-GCD: Neural Collapse in Category Discovery

Searching arXiv for the primary NC-GCD paper and the original GCD paper to ground the article in the cited literature.
arXiv search query: `id:2507.04725 OR id:2201.02609`
Neural Collapse-inspired Generalized Category Discovery (NC-GCD) is a framework for generalized category discovery that classifies known categories while simultaneously discovering novel categories from unlabeled data by imposing a Neural Collapse–motivated geometric structure on the embedding space. In the generalized category discovery setting, the unlabeled pool contains a mixture of known and novel categories, and the model is required to organize all of them jointly rather than merely reject unknowns or assume that all unlabeled instances are novel. NC-GCD addresses two difficulties emphasized in prior GCD work—**inconsistent optimization objectives** between supervised and unsupervised components, and **category confusion** caused by feature overlap—by pre-assigning and fixing Simplex Equiangular Tight Frame (ETF) prototypes, aligning both labeled and unlabeled data to the same prototype geometry, and stabilizing pseudo-label identities across clustering iterations with a Semantic Consistency Matcher (SCM) [2507.04725][2201.02609].

## 1. Problem setting within generalized category discovery

Generalized Category Discovery (GCD) is defined on a partially labeled dataset in which some categories are known and labeled, while the unlabeled data come from both known and novel categories. In NC-GCD notation, the dataset is
\[
D = D_l \cup D_u,
\]
where
\[
D_l = \{(x_i^l, y_i^l)\} \subset X \times Y_l
\]
contains labeled known-category samples and
\[
D_u = \{x_i^u\} \subset X
\]
contains unlabeled samples from both known and novel categories. The full category set is
\[
Y_u = Y_l \cup Y_n, \qquad Y_l \cap Y_n = \varnothing,
\]
with \(Y_n\) denoting the novel categories. The goal is to classify samples from \(Y_l\) and to discover and organize samples from \(Y_n\) without predefined class structures [2507.04725].

This setting extends the original GCD formulation, which introduced a labeled set \(D_L = \{(x_i,y_i)\}_{i=1}^N\) with \(y_i \in Y_L\), an unlabeled set \(D_U = \{x_j\}_{j=1}^M\) drawn from \(Y_L \cup (Y_U \setminus Y_L)\), and a validation set \(D_V\) on seen classes. Its goal was to assign every \(x \in D_U\) to its correct class in \(Y_U\), including both seen and unseen categories, without knowing which unlabeled samples are seen versus novel or the number of novel classes a priori [2201.02609].

The importance of this formulation is that it removes assumptions made by adjacent paradigms. Semi-supervised learning assumes unlabeled data share the same label set as labeled data; open-set recognition focuses on known-versus-unknown detection rather than organizing unknowns among themselves; and novel category discovery usually assumes that unlabeled data contain only unknown classes and often that the number of unknown classes is known. GCD, and consequently NC-GCD, operates in the mixed seen/unseen regime and treats all unlabeled data as belonging to one global label space [2201.02609].

A common misconception is to view GCD as a variant of unknown-class rejection. In fact, the task requires full categorization of the unlabeled set, including unknown instances among themselves, and NC-GCD preserves that requirement by jointly discovering and labeling all clusters rather than introducing an explicit known/novel reject threshold [2507.04725].

## 2. Neural Collapse as the geometric principle

NC-GCD is organized around Neural Collapse (NC), a geometric phenomenon observed in well-trained classifiers. The framework explicitly highlights four NC properties: **NC1 (Within-class collapse)**, where within-class variance vanishes and features of the same class collapse to their mean; **NC2 (Simplex ETF geometry)**, where centered class means converge to a Simplex ETF; **NC3 (Self-duality)**, where class means align with classifier weight directions; and **NC4 (Nearest-center prediction)**, where prediction reduces to nearest class center [2507.04725].

NC-GCD operationalizes these ideas by constructing a fixed set of \(K\) Simplex ETF prototypes \(P = \{p_1,\dots,p_K\} \subset \mathbb R^d\), one for each class, known and novel. The construction is
\[
P = \sqrt{\frac{K}{K-1}}\, U \left(I_K - \frac{1}{K}\mathbf{1}_K \mathbf{1}_K^\top\right),
\qquad U^\top U = I_K,
\]
where \(U \in \mathbb R^{d \times K}\) has orthonormal columns. The resulting prototypes are unit norm and satisfy
\[
p_k^\top p_j = \frac{K}{K-1}\delta_{k,j} - \frac{1}{K-1},
\qquad \forall k,j \in \{1,\dots,K\}.
\]
This gives equal pairwise angles and a tight-frame structure [2507.04725].

The role of the ETF is not merely descriptive. In NC-GCD, the prototypes are **pre-assigned and fixed** before training and are **never updated**. The stated rationale is twofold. First, the Simplex ETF is taken as the NC limit for balanced classification, maximizing inter-class margins with equal pairwise angles while collapsing within-class variance. Second, using the same fixed geometric targets for both supervised and unsupervised samples enforces a shared objective for known and novel categories, combats prototype drift, and reduces category confusion [2507.04725].

This geometric choice distinguishes NC-GCD from earlier prototype-based GCD pipelines. The original GCD method also classified in feature space by nearest centroid, with labeled centroids formed as class means and novel centroids discovered by \(k\)-means, but its centroids were data-dependent rather than pre-fixed ETF anchors [2201.02609]. A plausible implication is that NC-GCD can be read as a geometry-constrained reformulation of prototype-based GCD.

## 3. Architecture and consistent ETF alignment objective

NC-GCD uses a pre-trained visual encoder \(f(\cdot)\), reported as DINO ViT-B/16 in experiments, to produce embeddings \(e = f(x)\) and augmented embeddings \(e'\). A clustering module \(g(\cdot)\) periodically clusters all embeddings into \(K\) groups and computes cluster centers
\[
C = \{c_1,\dots,c_K\}.
\]
If the ground-truth number of classes \(K\) is available, it is used directly; if \(K\) is unknown, it is estimated from clustering and the ETF is then constructed with this \(K\) [2507.04725].

Pseudo-labels for unlabeled samples are assigned by cosine similarity to current cluster centers:
\[
\hat y_i = \arg\max_k \frac{e_i^\top c_k}{\|e_i\|\,\|c_k\|}.
\]
The confidence of a sample within its assigned cluster is
\[
s_i = \frac{e_i^\top c_{\hat y_i}}{\|e_i\|\,\|c_{\hat y_i}\|}.
\]
For each cluster \(k\), NC-GCD selects the top \(\alpha\%\) of samples with highest \(s_i\) to form \(\tilde{\mathcal D}_k\), and aligns them to the corresponding fixed ETF prototype \(p_k\) using the unsupervised ETF alignment loss
\[
\mathcal L_{\mathrm{ETF}}^u
=
\frac{1}{|\tilde{\mathcal D}_k|}
\sum_{e_i \in \tilde{\mathcal D}_k}
\|e_i - p_k\|^2.
\]
This is defined clusterwise over high-confidence unlabeled samples [2507.04725].

For labeled data, SCM produces an ETF-aligned label
\[
y_i^{\mathrm{ETF}} = \phi_{\mathrm{SCM}}(y_i^l),
\]
and supervised alignment pulls labeled features toward their mapped ETF prototypes:
\[
\mathcal L_{\mathrm{ETF}}^s
=
\frac{1}{|\mathcal D^l|}
\sum_{x_i^l \in \mathcal D^l}
\|e_i^l - p_a\|^2,
\qquad a = y_i^{\mathrm{ETF}}.
\]
The combined Consistent ETF Alignment Loss is
\[
\mathcal L_{\mathrm{ETF}}
=
(1-\gamma)\mathcal L_{\mathrm{ETF}}^u
+
\gamma \mathcal L_{\mathrm{ETF}}^s,
\]
where \(\gamma\) balances unsupervised and supervised contributions [2507.04725].

NC-GCD does not discard contrastive representation learning. It adds an unsupervised representation term,
\[
\mathcal L_{\mathrm{REP}}^u
=
-\frac{1}{|B|}
\sum_{i\in B}
\log
\frac{\exp(e_i \cdot e_i'/\tau)}
{\sum_{j\neq i}\exp(e_i \cdot e_j/\tau)},
\]
and a supervised representation term,
\[
\mathcal L_{\mathrm{REP}}^s
=
-\frac{1}{|B_l|}
\sum_{i\in B_l}
\frac{1}{|H(i)|}
\sum_{h\in H(i)}
\log
\frac{\exp(e_i^l \cdot e_h/\tau)}
{\sum_{j\neq i}\exp(e_i^l \cdot e_j/\tau)},
\]
where \(H(i)\) collects in-batch samples sharing the same label and \(\tau\) is the temperature. These combine as
\[
\mathcal L_{\mathrm{REP}}
=
(1-\lambda)\mathcal L_{\mathrm{REP}}^u
+
\lambda \mathcal L_{\mathrm{REP}}^s.
\]
The final objective is
\[
\mathcal L = \beta \mathcal L_{\mathrm{ETF}} + \mathcal L_{\mathrm{REP}},
\]
with \(\beta\) controlling the relative weight of ETF alignment [2507.04725].

The central design choice is therefore not simply to add an auxiliary NC regularizer, but to unify supervised and unsupervised learning around the same fixed prototype geometry.

## 4. Semantic Consistency Matcher and temporal stabilization

NC-GCD identifies two instability sources in GCD training: **pseudo-label drift across clustering iterations**, where the same semantic category may be assigned different cluster IDs over time, and **supervised-label mismatch**, where known labels and current cluster identities may not align with ETF prototype indices [2507.04725].

SCM addresses the first issue by matching cluster IDs between consecutive clustering iterations. Across iterations \(t-1 \to t\), it finds the permutation
\[
\sigma^{*}
=
\arg\max_{\sigma \in S_K}
\sum_{k=1}^{K}
\sum_{i=1}^{N}
\mathbb I(\hat y_i^{t}=k)\,
\mathbb I(\hat y_i^{t-1}=\sigma(k)),
\]
where \(S_K\) is the permutation group on \(K\) items. The current iteration’s label set is updated by applying this optimal permutation. A similar optimal assignment \(\sigma^l\) is computed to align predicted clusters with the known ground-truth labels for supervised samples, yielding ETF-aligned labels for the supervised loss [2507.04725].

In practice, these permutations can be solved by the Hungarian algorithm applied to cluster–cluster or cluster–label co-occurrence matrices. This is important because the ETF prototypes are fixed: if cluster identities were allowed to swap arbitrarily across epochs, the same semantic class could be alternately attracted to different ETF vectors, defeating the intended geometry. SCM preserves the semantic identity of clusters across time, prevents prototype swapping, and stabilizes the optimization target for both labeled and unlabeled data [2507.04725].

Training proceeds with periodic clustering every \(T\) epochs, where \(T\) is a hyperparameter. After each clustering step, SCM relabels the current clustering consistently with the previous one and aligns known labels to ETF prototypes. At inference, embeddings are assigned to the nearest ETF prototype or cluster by cosine similarity. For GCD evaluation, a one-to-one matching between discovered clusters and ground-truth classes is typically computed by Hungarian assignment to report accuracies on All/Old/New splits. The framework does not require an explicit known/novel reject threshold; it discovers and labels all clusters jointly [2507.04725].

## 5. Relation to the original GCD pipeline

The original GCD framework established the problem setting that NC-GCD inherits and also provided the prototype-based baseline that NC-GCD most directly generalizes. Its representation pipeline used a Vision Transformer ViT-B/16 pretrained with DINO on ImageNet, with features taken from the \([CLS]\) token. Two random augmented views \((x_i, x_i')\) were generated for each image, an MLP projection head \(\phi\) was used only for contrastive training, and clustering at test time operated on the backbone’s \([CLS]\) embedding rather than on projected features [2201.02609].

Original GCD combined an unsupervised InfoNCE-style contrastive loss on all images with a supervised contrastive loss on labeled images. After fine-tuning, it extracted \(z=f(x)\) and applied **semi-supervised \(k\)-means** with squared Euclidean distance. If \(K = |Y_U|\) was known, it maintained \(K\) centroids \(\mu_1,\dots,\mu_K\), tied centroid indices for seen classes to the labeled classes, initialized those centroids as labeled class means,
\[
\mu_c = \frac{1}{|D_L^c|}\sum_{(x,y)\in D_L,\,y=c} f(x),
\]
and initialized the remaining \(K-|Y_L|\) centroids by \(k\)-means++ on \(D_U\). It then optimized
\[
\min_{\mu,\{a_x\}}
\sum_{(x,y)\in D_L}\|f(x)-\mu_y\|_2^2
+
\sum_{x\in D_U}\|f(x)-\mu_{a_x}\|_2^2,
\]
with labeled assignments fixed to ground-truth labels and unlabeled assignments updated by nearest centroid [2201.02609].

This procedure required no explicit threshold to decide whether an unlabeled sample was seen or unseen: assignments to seen-class-tied centroids corresponded to seen classes, and assignments to the remaining centroids corresponded to novel classes. When \(K\) was unknown, the original GCD method estimated it by running \(k\)-means on all features for candidate values of \(K\), evaluating clustering accuracy on the labeled subset only,
\[
ACC_L(K)
=
\max_{p}
\frac{1}{|D_L|}
\sum_{(x,y)\in D_L}\mathbf 1\{y = p(\hat a_x)\},
\]
and choosing the maximizer via Brent’s algorithm over \(K \in [|Y_L|,1000]\) [2201.02609].

The empirical context matters because NC-GCD was introduced after this prototype-based formulation had already demonstrated that DINO-ViT features and non-parametric clustering were strong ingredients for GCD. Original GCD reported All/Old/New accuracies of 73.0/76.2/66.5 on CIFAR-100, 74.1/89.8/66.3 on ImageNet-100, 51.3/56.6/48.7 on CUB, 39.0/57.6/29.9 on Stanford Cars, and 35.4/51.0/27.0 on Herbarium19, substantially outperforming adapted NCD baselines and showing particular strength on fine-grained and long-tailed settings [2201.02609].

A further point of evaluation protocol originates in the original GCD paper. Clustering accuracy is computed with a **single global Hungarian assignment** over all classes in \(Y_U\), after which Old and New subset accuracies are computed post hoc. This is stricter than matching subsets separately and can create an apparent tradeoff between Old and New accuracies at reporting time [2201.02609].

## 6. Empirical behavior, implementation profile, and limitations

NC-GCD was evaluated on generic classification datasets CIFAR-100 and ImageNet-100, and on fine-grained datasets CUB-200, Stanford Cars, FGVC Aircraft, and Herbarium19. Fine-grained datasets use the SSB split, while CIFAR-100 and ImageNet-100 use random splits following prior work. Evaluation reports All/Old/New accuracies [2507.04725].

| Dataset | Ground-truth \(K\) given (All/Old/New) | Without ground-truth \(K\) (All/Old/New) |
|---|---:|---:|
| CUB-200 | 74.8 / 76.8 / 73.8 | 70.3 / 72.1 / 69.4 |
| Stanford Cars | 59.9 / 77.8 / 51.2 | 54.0 / 73.1 / 44.8 |
| FGVC Aircraft | 60.0 / 57.6 / 61.2 | 55.4 / 57.3 / 54.5 |
| Herbarium19 | 46.4 / 58.4 / 40.7 | 42.3 / 56.2 / 34.8 |
| CIFAR-100 | 82.7 / 85.5 / 77.3 | 80.5 / 83.7 / 74.0 |
| ImageNet-100 | 88.4 / 94.1 / 85.5 | 85.7 / 95.9 / 80.6 |

Averaged over all datasets, NC-GCD reports 68.7/75.0/64.9 with ground-truth \(K\) given and 64.7/73.0/59.7 without ground-truth \(K\). The reported improvements over strong state of the art are +3.0 All and +4.2 New on average in the known-\(K\) regime, and +3.1 All and +4.4 New on average when \(K\) is not given [2507.04725].

The ablations isolate three mechanisms. First, **unsupervised ETF alignment alone** yields substantial gains in novel-class accuracy by reducing overlap and sharpening novel clusters. Second, **supervised ETF alignment** stabilizes known classes and prevents forgetting. Third, the combination of both gives the strongest overall performance, with average improvements over the baseline of +5.3 All and +7.4 New. SCM also contributes materially: on CUB-200, All accuracy is 75.7 with SCM versus 70.3 without, and Novel accuracy is 77.8 versus 70.0; on Herbarium19, All is 47.2 versus 42.6 and Novel is 40.3 versus 36.3; on ImageNet-100, All is 87.6 versus 84.3 and Novel is 84.1 versus 82.0 [2507.04725].

The implementation profile reported for NC-GCD uses DINO ViT-B/16 with a projection head MLP of input 768, hidden 2048, and output 768, with GeLU activation. Optimization uses learning rate 0.1, batch size 128, and weight decay \(10^{-4}\). The contrastive temperature is approximately \(0.07\), the number of augmentations is 2, and \(\alpha \approx 0.8\) is reported as a good balance between old and novel class accuracy. The loss weights \(\beta\), \(\gamma\), and \(\lambda\) are tuned, and \(\beta > 0\) is described as crucial for making ETF geometry influential. The clustering period \(T\) is also a tunable hyperparameter [2507.04725].

The main limitations are explicit. NC-GCD depends on knowledge or estimation of \(K\); if \(K\) is estimated inaccurately, ETF construction is affected. Periodic clustering and Hungarian matching add computational overhead, especially for large \(K\). Very large numbers of classes increase the cost of matching and clustering, and scalable approximations may be needed. The method is reported to excel in fine-grained settings, but those same regimes can make matching and clustering more expensive. Future directions mentioned for the framework include extending ETF- and SCM-based ideas to incremental GCD or streaming settings [2507.04725].

Taken together, NC-GCD represents a geometry-driven stage in the development of GCD. The original GCD framework showed that strong ViT representations and non-parametric clustering could organize mixed seen/unseen unlabeled data effectively [2201.02609]. NC-GCD recasts that discovery problem through fixed ETF prototypes, consistent supervised–unsupervised alignment, and temporal label matching, thereby making Neural Collapse an explicit training prior rather than a post hoc geometric observation [2507.04725].

Source: https://www.emergentmind.com/topics/neural-collapse-inspired-generalized-category-discovery-nc-gcd