Generalized Category Discovery with Large Language Models in the Loop
Paper · 2024 · Wenbin An, Wenkai Shi, Feng Tian et al.
Summary
When a service groups incoming messages by what users want to do, some requests will fit its existing categories and others will express needs it has never labeled. Generalized category discovery asks a system to recover both kinds of categories from the same collection. It starts with some labeled examples from familiar categories and a larger pool in which any example could belong to a familiar or unfamiliar one. The authors propose Loop, a way to use large language models to help train a text clustering system when the initial labels give little guidance about the unfamiliar categories.
Loop starts by grouping sentences according to their numerical representations. It looks for sentences whose nearby examples frequently belong to different provisional groups and whose own group assignments are uncertain. For each sentence selected this way, Loop presents a language model with candidate neighbors from competing groups and asks which candidate best matches the sentence’s intent or category. The chosen pair becomes a training signal. As the sentence encoder learns to place such pairs closer together, the geometry used for subsequent clustering can change. After clustering, a separate query asks for a short name for each group judged to represent a novel category, using sentences close to the group’s center as evidence.
In the reported test comparisons, Loop achieved the highest known-category accuracy, novel-category accuracy and H-score on BANKING, StackOverflow and CLINC. H-score rewards a balance between the known and novel sides of the task. Loop’s test H-scores were 74.60% on BANKING, 91.57% on StackOverflow and 90.74% on CLINC. The gains over the strongest reported baseline were larger for novel-category accuracy than for known-category accuracy on each dataset. The authors also show examples of useful generated names, including a precise name for a group about pending cash withdrawals and a narrower name for a group whose benchmark label covers topping up by cash or check.
The main benchmark comparison supplied the total number of categories. The authors separately examined how well Loop estimates that number and how sensitive its test results are to overestimating it. On BANKING, offering the language model more candidate neighbors raised the H-score and increased query cost. The method still starts from labeled examples of known categories, and the reported implementation sends selected sentences to an external API during training and cluster naming. The authors make the Loop code and data available.
Deep dive: Generalized Category Discovery with Large Language Models in the Loop
Loop uses large language models to guide text clustering and name newly discovered categories when labeled examples cover only known categories. · about 36 minutes to read
The problem and its context
When the category list is incomplete
In ordinary text classification, the training examples and the intended predictions share a category list. A system trained to recognize a set of user intents can learn which patterns distinguish those intents and use the same distinctions on future messages. The authors call this the closed-world setting. In the open-world setting, incoming messages can express intents for which the training set supplies neither examples with labels nor a category name. A fixed classifier can still make a prediction for each message, but its output choices were defined before those intents appeared.
Generalized category discovery, or GCD, changes what the system has to return. It asks for a grouping that includes the categories already represented in the labeled data and the categories that become visible through patterns in the unlabeled data. Merely finding unfamiliar examples would leave a substantial part of the job unfinished. The unfamiliar examples may express several distinct intents, and the unlabeled pool also contains examples of known intents. The system therefore has to decide which requests can be grouped with familiar ones and which requests belong together in newly discovered groups.
The paper uses user intent as a concrete instance of the problem. An intent concerns what a person is trying to accomplish or find out. Two sentences can look different while asking for the same thing, and closely related requests can require distinct categories. In the paper’s BANKING examples, questions about a cash withdrawal that still shows as pending form a coherent group because they concern the same transaction state. A broader grouping around the words for cash withdrawals would lose that distinction. The representation of each sentence has to preserve the distinctions relevant to the category system, even when the only explicit examples of that system come from known categories.
The difficulty extends beyond assigning examples to groups. A group identifier lets a system distinguish one cluster from another, but it gives a reader no direct account of what those members have in common. The paper treats finding a cluster and describing it as related tasks. The first asks whether the examples belong together according to the benchmark’s categories. The second asks whether representative examples support a name that a person can understand. A cluster can be useful for one purpose and weaker for the other. A recognizable name can describe a cluster’s central theme while missing part of the intended category, as some of the paper’s examples illustrate.
What earlier discovery methods learned from unlabeled data
The authors place their work in a line of GCD research spanning language and computer vision. They describe a common approach in which a system first learns representations from both the labeled and unlabeled pools. On the labeled side, a supervised objective teaches the system to distinguish known categories. On the unlabeled side, a self-supervised objective can learn from structure in the examples themselves. A clustering procedure such as K-means then groups the resulting representations.
Some earlier work used provisional cluster assignments as pseudo-labels. A pseudo-label is a category identifier assigned by the system itself, which can then be used as a training signal. The advantage is that the unlabeled pool can contribute more directly to learning. The difficulty motivating Loop is that an incorrect assignment can also become a training signal. This matters when several categories meet in the same region of the representation space and the available labeled examples provide no direct basis for settling the distinction.
Other approaches relied on contrastive learning, which trains representations by deciding which examples should be close to one another. A sentence and another sentence treated as its neighbor can form a positive pair. The training objective makes that pair more similar relative to alternatives. In this family of methods, the choice of a positive example carries much of the supervision. If an apparent neighbor belongs to a different intent, treating the pair as positive can obscure a boundary that the clustering procedure needs to recover.
The paper also describes work that separates known and novel groups using category prototypes, and work that attempts to transfer what is learned about known categories to the unfamiliar side of the task. These methods address a consequence of pretraining on a partial category list. Labeled examples provide comparatively clear evidence about the distinctions among known categories. The distinctions among novel categories must emerge from the unlabeled pool, even though the representation used to examine that pool has already been shaped by known-category supervision.
Loop enters at the point where a representation already exists and provides useful but imperfect neighborhoods. It adds targeted comparisons to the training process. The setting makes the content of those comparisons important. The initial clusters have provisional identifiers, and there is no list of novel-category names that can serve as a menu for annotation. Returning a free-form name for every queried example would create a further problem of aligning those names with one another and with the existing groups. A choice among actual examples can supply usable information before any novel category has a name.
Where active learning fits
The authors describe active learning as a way of spending annotation effort on examples expected to be particularly informative. Earlier methods selected examples using quantities such as prediction entropy, confidence or the margin between competing predictions. Other methods considered information about the examples and their relationships. The paper also cites recent work using language-model feedback in place of human feedback for selected judgments, including ClusterLLM, which uses such judgments to guide text clustering.
There are two separate questions in bringing active learning to Loop’s setting. One is which example to ask about. An uncertain example may be informative, but the system also has evidence from the provisional groups of its nearby sentences. The other is what question to ask. A person or service asked for the example’s class would ordinarily work from a defined label set. When the class may be novel, a question about whether two examples express the same kind of request is easier to connect to the system’s present state.
The distinction matters for scale as well. The paper motivates selective queries by pointing to cost, latency and privacy concerns with sending a large collection of texts to a language-model service. A locally trained encoder can handle the full pool, while a service supplies judgments on a selected set of comparisons. That arrangement makes each query valuable only to the extent that its answer can affect later training. Loop incorporates the answers into a common objective for the whole pool, so the queried examples help shape representations that are also used for unqueried examples.
The method, step by step
What Loop receives and what it returns
Loop receives a small labeled pool for known categories and an unlabeled pool containing examples of both known and novel categories. The labels for the unlabeled pool exist as a matter of experimental design, but the discovery procedure does not receive them. A separate test set is used to evaluate whether the trained system recovers the category structure on held-out data. The distinction between the training pools and the test set matters because the paper evaluates discovery inductively. The system learns from the training pools before it is assessed on the test examples.
Dₗ = { (xᵢ, yᵢ) | yᵢ ∈ Yₖ }
Here Dₗ is the labeled pool. The index i identifies an example, xᵢ is its sentence, and yᵢ is its category. Yₖ is the set of known categories. The membership symbol ∈ specifies which categories are eligible for the pool, and the vertical bar reads as “such that.”
Dᵤ = { xᵢ | yᵢ ∈ Yₖ ∪ Yₙ }
Dᵤ is the unlabeled training pool. Its entries are sentences xᵢ. The category yᵢ is used in the expression to describe the origin of the sentence. It remains hidden during training. Yₖ is the known category set, Yₙ is the novel category set, and ∪ denotes the union of those sets. Here too, the vertical bar introduces the condition on membership.
D_all = Dₗ ∪ Dᵤ
D_all is the combined training collection. Dₗ contributes its sentences and their available labels, and Dᵤ contributes its sentences. The union sign ∪ indicates that both pools supply examples for learning and clustering. Only objectives that require a class label are restricted to Dₗ.
Dₜ = { (xᵢ, yᵢ) | yᵢ ∈ Yₖ ∪ Yₙ }
Dₜ is the test set. The notation xᵢ and yᵢ again denotes an indexed sentence and its category. The category may belong to either Yₖ or Yₙ, as indicated by their union. These labels allow the evaluators to measure how the discovered groups relate to the benchmark categories.
How Loop trains the encoder and names novel clusters
The steps in order.
The architecture has a training stage and an interpretation stage. In training, Loop uses the language model to judge relationships between examples. In interpretation, it uses the language model to propose words for a discovered group. Neither call asks the service to take the entire dataset and partition it. The groups come from the locally learned representation. The service contributes judgments that can improve that representation and descriptions that can make the resulting groups easier to read.
Warm up the encoder
The local encoder is BERT. It turns each input sentence into a vector of features. Loop uses these vectors to decide which sentences are nearby and to estimate where the provisional cluster centers lie. The warm-up gives the vectors some task-specific organization before any of those relationships are used to select queries.
zᵢ = Fθ(xᵢ)
The sentence at index i is xᵢ, and its representation is zᵢ. The function Fθ is the encoder. The symbol θ stands for its trainable parameters. Applying Fθ to the sentence gives the vector used in subsequent clustering and neighbor retrieval.
The warm-up teaches the encoder from two sources. The classification part uses cross-entropy on the labeled examples. Cross-entropy makes it costly to assign a low probability to the known category recorded for an example. The masked language modeling part hides tokens and trains the encoder to predict them from context. Since this part uses the original text to supply its targets, it can draw on the whole training collection, including examples from novel categories.
L_pre = L_ce(Dₗ) + L_mlm(D_all)
L_pre is the warm-up loss, and the plus sign indicates that the two losses are added. L_ce is the cross-entropy objective applied to the labeled pool Dₗ. L_mlm is the masked language modeling objective applied to the combined training collection D_all. The subscripts identify the roles of the objectives and their training stage.
The two terms supply different kinds of information. Category labels tell the encoder how to separate the familiar intents represented in the labeled pool. The masked-token task helps the encoder adapt to language in both pools without requiring a category decision about each sentence. That combination gives Loop a starting representation from which it can retrieve candidate neighbors. The representation still has to be refined to handle distinctions the known labels never taught it directly.
Create provisional clusters and retrieve neighbors
Loop applies K-means to the representations in the combined training collection. K-means organizes the vectors around cluster centers, and each example receives a provisional label corresponding to the cluster it was assigned to. These pseudo-labels are useful even though their assignments may change later. They give Loop an initial account of what the current representation regards as a group.
K = |Yₖ| + |Yₙ|
K is the total number of clusters used in the main setup. The vertical bars give the number of members of a set. |Yₖ| counts known categories and |Yₙ| counts novel categories. The main comparison assumes their total is known, matching the setup the authors use for comparison with earlier systems. The paper separately tests estimation of this quantity.
N = |D_all|
N is the number of examples available in the combined training collection D_all. The vertical bars again denote the size of the set. N determines the range of sample indices over which the method looks for neighbors and computes its example-level scores.
The paper denotes the cluster centers by μ, with a separate index for each center, and the provisional category of an example by ŷ with that example’s index. These are different objects. The center is a vector that summarizes a group, while the pseudo-label is an identifier attached to an example. Loop uses the centers to estimate uncertainty and the identifiers to count disagreement.
For each example, Loop retrieves the k closest neighbors according to cosine similarity. This is a comparison of vector direction. Taking the dot product after normalizing for vector length lets the system rank candidate neighbors by the orientation of their vectors in the representation space.
sim(zᵢ, zⱼ) = (zᵢᵀzⱼ) / (‖zᵢ‖ · ‖zⱼ‖)
The function sim measures cosine similarity between zᵢ and zⱼ, the vectors for examples i and j. The superscript ᵀ transposes zᵢ so that zᵢᵀzⱼ gives the dot product. The double bars denote vector norms, and the centered dot in the denominator indicates multiplication. Dividing by the product of the norms normalizes the comparison for the lengths of the vectors.
Nᵢ = argtopₖ { sim(zᵢ, zⱼ) | j ranges over the N examples }
Nᵢ is the set of indices retrieved for example i. The operation argtopₖ returns the indices associated with the k highest similarities, where lower-case k is the neighborhood size. Within the braces, zᵢ is the query vector, zⱼ is the vector at candidate index j, and N is the size of the training collection being searched. The vertical bar introduces the range for j. Upper-case K, which fixes how many clusters the system forms, serves a different purpose.
A neighborhood can include examples with several pseudo-labels. This is possible because the neighbor search uses the pairwise similarity between example vectors, while a K-means assignment depends on the position of a vector relative to the cluster centers. A sentence can sit near other sentences on either side of a provisional boundary. That kind of neighborhood gives Loop something to investigate.
Select examples using disagreement and uncertainty
Local Inconsistent Sampling, or LIS, looks for examples with evidence of difficulty from two sources. The first is whether nearby examples often have assignments different from the query example. The authors expect such cases to be informative because the clustering assumption ordinarily calls for similar examples to share an assignment. A query whose neighborhood crosses provisional boundaries gives the language model a chance to resolve a concrete disagreement.
Cᵢ = ∑ⱼ₌₁ᵏ 𝟙[ŷᵢ ≠ ŷₙ] , with n = Nᵢʲ
Cᵢ is the local inconsistency count for example i. The summation runs over the k retrieved neighbors, and j is the position of a neighbor in that collection. Nᵢʲ denotes the index stored at that position, written as n for use inside the indicator. The pseudo-labels of the query and the neighbor are ŷᵢ and ŷₙ. The symbol ≠ tests whether they differ. The indicator 𝟙 makes each disagreement contribute one count and each agreement contribute none.
The count measures disagreement with the query’s assignment. For example, a query near many examples from the same competing cluster can have a high count, even though those competing examples agree with one another. A query surrounded by neighbors from several competing clusters can also have a high count. LIS uses both patterns as reasons to inspect the query, without requiring them to have the same distribution of neighbor labels.
The second signal is how evenly the query’s provisional membership is spread across cluster centers. Loop uses a Student’s t-based assignment rule from the clustering literature discussed in the paper. A center close to the example receives more weight. Normalizing those weights over the available centers gives a distribution that reflects how strongly the distances favor one cluster over the others. The paper connects this part of the method to Deep Embedded Clustering.
qᵢⱼ = (1 + ‖zᵢ − μⱼ‖² / α)^(−(α + 1)/2) / ∑ⱼ′ (1 + ‖zᵢ − μⱼ′‖² / α)^(−(α + 1)/2)
The quantity qᵢⱼ is the soft assignment weight for instance i and cluster j after normalization. The vector zᵢ represents the example, μⱼ is the center of cluster j, and ‖zᵢ − μⱼ‖² is their squared distance. The parameter α is the degrees-of-freedom setting for the Student’s t rule. The inner addition and the negative exponent define a weight that decreases as the distance increases. The denominator sums the same expression over all cluster centers, indexed by j′. Using a separate index for that sum distinguishes the specific center being scored from the full set of centers used for normalization.
The paper turns each resulting distribution into a single entropy score. Entropy is high when the assignments are spread relatively evenly, so no one center is strongly favored. It is low when most of the weight goes to one center. Because the weights are normalized across centers, the score concerns their relative support for an example.
Hᵢ = −∑ⱼ qᵢⱼ log(qᵢⱼ)
Hᵢ is the assignment entropy for example i. The index j ranges over the clusters, qᵢⱼ is the normalized assignment weight, and log denotes the logarithm. The summation combines the contribution from every cluster, and the minus sign gives the usual entropy convention. This Hᵢ is a training-time quantity for an individual example. The H-score used in evaluation is a separate measure.
LIS ranks the examples by each signal and keeps those that qualify under both rankings. The procedure can thus treat a locally disputed assignment differently from one that looks uncertain only in relation to the centers. Conversely, disagreement alone can arise around an example whose own assignment is relatively clear under the distance rule. Requiring both signals focuses the queries on cases for which the two views of uncertainty point in the same direction.
S = { zᵢ | Cᵢ ∈ topₘ(C) ∧ Hᵢ ∈ topₘ(H) }
S is the set of selected representations, and zᵢ is included when its example passes both tests. C denotes the collection of local inconsistency counts Cᵢ across the training examples. H denotes the collection of assignment entropies Hᵢ. The operation topₘ retains the highest-ranked scores up to the setting m in each collection. The membership signs ∈ express the two tests, the vertical bar introduces the condition for inclusion, and ∧ requires both tests to hold. Since the ranked sets can overlap only partially, m governs the selection without fixing the size of the intersection by itself.
The motivating geometry is that a sentence near a category boundary may have several plausible centers and nearby examples with conflicting assignments. The two scores give Loop an operational way to look for such cases. Neither score has access to the sentence’s true category. The authors later use benchmark labels to check how frequently the selected examples were provisionally assigned to an incorrect cluster.
Ask for a neighbor from competing groups
The Scalable Query strategy turns each selected example into a comparison. Loop examines the distribution of provisional cluster labels among its retrieved neighbors and favors the clusters that contribute the most neighbors. It assembles candidate sentences from the leading clusters and sends the selected sentence and those candidates to the language model. This design uses the competing clusters to determine which alternatives are worth comparing.
The prompt asks the language model to select the candidate that best corresponds to the query by intent or category. The requested answer is the identifier of a candidate, without an explanation. That format lets Loop connect the response directly to an existing sentence and its representation. It also lets the task remain the same when none of the candidates’ categories has a known name. The comparison can be expressed through examples alone.
The setting |q| is the number of options in a query. With more options, the list can include candidates from more of the clusters represented in the neighborhood. This can improve the chance of including a sentence from the query’s actual category. It also lengthens the prompt. The paper’s use of “scalable” refers to this adjustable number of options and the resulting tradeoff between the breadth and cost of each query.
A response supplies a preferred relationship between two sentences. The language model does not need to produce the category that explains the relationship. Once the answer is associated with the chosen candidate, Loop can use that candidate as a positive example in training. A candidate from the same category gives the intended signal. The authors also argue that a semantically similar candidate may convey useful information even when it is not an exact category match. This possibility does not establish the correctness of any particular response.
Candidate construction puts a boundary around what the service can recover. The question is grounded in the neighbors that the encoder already finds plausible. A true match can be selected only if the candidate list contains one, and an expanded list can still leave out the right category. This is a reason to distinguish coverage of the candidate list from quality of the language model’s judgment. Both contribute to whether the selected neighbor ends up being useful.
Train on the refined neighborhoods
Refined Neighborhood Contrastive Learning, or RNCL, makes the chosen relationships part of the encoder’s training objective. For a selected example, Loop uses the neighbor chosen through the query. For an unselected example, it picks a neighbor at random from the retrieved set. The unselected examples can therefore see different positive pairs over training. The authors intend this variation to let them learn from a range of nearby examples.
The contrastive objective compares the similarity of the anchor sentence to its chosen neighbor with similarities to examples in the current batch. Training raises the score of the chosen pair relative to the batch alternatives. Since the anchor and neighbor change across the training examples, each example contributes a local relationship to the learning of the shared encoder.
L = −(1/N) ∑ᵢ₌₁ᴺ log[ exp(A(zᵢ)ᵀA(zₙ) / τ) / ∑zⱼ∈B exp(A(zᵢ)ᵀA(zⱼ) / τ) ] , with n = Nᵢˢ
L is the neighborhood contrastive loss, and N is the number of examples over which the loss is written as an average. The outer sum indexes anchor examples by i. The representation of the anchor is zᵢ, and Nᵢˢ is the index of the selected neighbor, written as n inside the formula. Its representation is zₙ. A denotes the augmentation procedure in the paper’s notation. The superscript ᵀ allows the augmented representations to be compared by dot product. The temperature τ scales the scores before exp takes their exponentials. The numerator scores the anchor’s positive pair. In the denominator, B is the current batch and the sum runs over the representations zⱼ in that batch, with ∈ denoting membership. The logarithm log converts the relative score into a loss contribution after the minus sign is applied.
Cross-entropy on the labeled pool is also used during this training stage. It gives the known categories a source of direct supervision alongside the local relationships learned from queried and unqueried examples. The pairwise signal can reach novel categories because it requires only sentences and their proposed neighbors. The cross-entropy signal can anchor known-category decisions because it has access to their actual labels.
The feedback changes where examples are represented, which can in turn change which examples count as near neighbors. Loop recomputes neighborhood information and issues queries at intervals. The authors use an update interval of 5 epochs, on the reasoning that the neighborhoods need not be refreshed at every pass through training. They also maintain stored query results so that repeated queries can reuse an earlier answer. The interval reduces how often the system searches and asks, while the stored results reduce duplicated calls when a query recurs.
This is the loop in the framework’s name. The encoder provides a provisional view of the data. Loop uses that view to identify difficult examples and construct the choices put to the language model. The answers then affect the training of the encoder that will supply a later view. The effect of an answer is expressed through a training constraint on a pair, instead of a guarantee that a specific sentence will acquire a specific cluster identifier on the next pass.
Turn a novel cluster into a short name
The naming stage starts after the discovered groups have been formed. Loop uses the “Alignment and Decoupling” procedure from earlier work cited by the authors to identify the groups associated with novel categories. This addresses the mixed nature of the clustering output. Both known and novel groups emerge from the same collection, and the goal of naming is to give a readable description to the novel ones.
For each such group, the paper takes three sentences closest to its center. Center proximity is used as a practical criterion for choosing examples that are characteristic of the group. The naming prompt asks the language model to express their common intent or category in a word or short phrase. The resulting text is an interpretation of the examples. The group membership was established by clustering before the name was proposed.
The paper’s examples show why a compact name can help. A group centered on questions about changing a PIN receives the benchmark name Change PIN. A group of weather questions receives Weather forecast for a benchmark category called Weather. The latter group contains requests about what the weather will be like, so the proposed name expresses a recognizable common intent even with different wording. The experiments treat such examples as evidence about the readability and relevance of names, alongside a separate numerical evaluation of category recovery.
Experiments and results
The datasets and what the system could see
The evaluation covers two intent datasets and a collection of questions grouped by category. BANKING concerns intents in banking, drawing on the dataset described in Efficient Intent Detection with Dual Sentence Encoders. StackOverflow is used for question classification and is linked by the paper to Short Text Clustering via Convolutional Neural Networks. CLINC contains intents from multiple domains. The collection gives Loop different kinds of grouping problems, from distinctions within one domain to distinctions across a wider range of subjects.
For each dataset the authors randomly designate 25% of the categories as novel. Within each known category they select 10% of the data as labeled examples. The remaining training examples populate the unlabeled pool. This pool therefore contains both known-category examples whose labels were withheld and examples from categories for which the system sees no labeled training example. The held-out test sets contain examples of both kinds.
| Dataset | Known categories | Novel categories | Labeled training | Unlabeled training | Test examples |
|---|---|---|---|---|---|
| BANKING | 58 | 19 | 673 | 8,330 | 3,080 |
| StackOverflow | 15 | 5 | 1,350 | 16,650 | 1,000 |
| CLINC | 113 | 37 | 1,344 | 16,656 | 2,250 |
The counts illustrate how the benchmark tasks differ even under the same selection rule. StackOverflow pairs a relatively small set of categories with a large unlabeled pool. CLINC presents many more categories in an unlabeled pool of similar size. BANKING has fewer unlabeled examples than either of the other datasets and still contains distinct intents that the procedure must resolve within a shared domain. These differences matter for the meaning of a neighborhood. A retrieved set can cover a different fraction of a category’s examples depending on the dataset.
Implementation and comparisons
The local encoder is bert-base-uncased, and GPT-3.5 Turbo supplies the comparison and naming responses through its API. BANKING and CLINC each use a retrieval neighborhood of 50 examples, while StackOverflow uses 500. The authors set the Student’s t parameter α to 1, the selection setting m to 500 and the query menu |q| to 2 in the main configuration. The contrastive temperature τ is 0.07. These settings govern different decisions. The retrieval size determines the evidence used to assess the local neighborhood, the selection setting limits which examples merit a query, and the menu size governs how many choices actually appear in one prompt.
The warm-up lasts 100 epochs and the subsequent training lasts 50 epochs. For masked language modeling, the token mask probability is 0.15. Training uses Random Token Replace for augmentation. The experiments run on a single NVIDIA 3090 GPU for local computation. Those details describe the tested implementation. The framework’s distinction between local training and query feedback also allows the authors to describe the service component independently of the encoder.
The paper compares three broad groups of systems through its main and component experiments. The main unsupervised comparisons include DeepCluster, DCN and DEC. A second set of unsupervised comparisons is KM-BERT, AG-GloVe and SAE. They establish what can be achieved by grouping examples without drawing on the benchmark’s known-category labels in the same way as the semisupervised approaches.
The semisupervised comparisons include Simple, Semi-DC, Self-Labeling and CDAC+. The table also covers DTC, Semi-KM, DAC and GCD. PTJN, DPN and MTP supply several of the closest headline comparisons. This range matters because the labeled pool can already give a discovery system a substantial advantage. The strongest comparison for Loop is how it fares against systems designed to use that partial supervision, many of which also use unlabeled data to improve their representations. ClusterLLM is compared separately in the BANKING component study.
Some entries in the main comparison are drawn from an earlier study, and the main table presents test-set results averaged over 3 runs. The paper evaluates the systems on the cluster assignments. Cluster identifiers have no inherent correspondence to benchmark labels, so the evaluators use the Hungarian algorithm to align them. The alignment assigns cluster identifiers to reference categories to maximize agreement. It uses the reference labels for scoring after predictions have been made.
The paper reports accuracy separately on known and novel test examples. Known accuracy measures recovery of categories that had labeled training examples, including how the system finds those categories in held-out data. Novel accuracy measures recovery of the categories for which it had no labeled training examples. The H-score is the harmonic mean of these two accuracies. It is particularly sensitive to the weaker side, which makes it possible to see whether an apparently strong system has recovered only the categories with direct supervision.
Results across the test sets
BANKING provides the clearest view of the gap between recognition of known intents and discovery of novel ones. Loop reaches 83.99% known accuracy and 67.10% novel accuracy on the test set. Among the comparison systems, DPN reaches 80.93% known accuracy and MTP reaches 50.04% novel accuracy. Those are the strongest reported baseline values for their respective splits. The best known score and the best novel score are worth checking separately because a competing system can lead on one side without giving the best balance.
BANKING test H-score across selected discovery systems
Loop leads the selected baselines on the measure that balances known and novel accuracy.
The numbers
| System or setting | H-score % |
|---|---|
| DAC | 54.98 |
| GCD | 55.78 |
| PTJN | 60.69 |
| DPN | 60.73 |
| MTP | 61.59 |
| Loop (this paper) | 74.60 |
The H-score comparison places Loop ahead of MTP on BANKING. Read together with the split accuracies, it shows why the balance improved. The known side already had a relatively strong baseline, and Loop raises its score. On the novel side, the baseline accuracies leave more room for improvement, and Loop obtains a much higher value. The test outcome therefore supports the paper’s interest in providing supervision where there are no known-category labels to draw on directly.
The StackOverflow comparison starts from a stronger set of baseline results. Loop obtains an H-score of 91.57% and known-category accuracy of 87.56% on the test set. DPN has the strongest baseline H-score, 83.13%, and the strongest baseline known accuracy, 85.29%. PTJN has the strongest baseline novel accuracy, 82.80%. These separate baselines show that the system with the highest combined score need not lead on every split.
On CLINC, Loop reaches 90.74% H-score and 94.45% known-category accuracy on the test set, against DPN’s 84.56% H-score and 92.97% known accuracy. The CLINC results again show a larger change on the novel side than on the known side. That pattern is consistent with the intended role of the neighbor comparisons, which supply information to examples whose categories may be entirely absent from the labeled pool.
Novel-category test accuracy across the three datasets
Loop achieves higher novel-category accuracy than the strongest baseline on each dataset.
The numbers
| System or setting | accuracy % |
|---|---|
| BANKING, MTP | 50.04 |
| BANKING, Loop (this paper) | 67.10 |
| StackOverflow, PTJN | 82.80 |
| StackOverflow, Loop | 90.53 |
| CLINC, DPN | 77.54 |
| CLINC, Loop | 87.31 |
Across the three datasets, the authors report an average improvement of 9.21% in test H-score over the strongest reported comparisons. They report average improvements of 2.27% for known-category test accuracy and 11.52% for novel-category test accuracy. Their overall figure across the reported metrics is an average improvement of 7.67%. These are improvements as reported by the authors. The test accuracies above describe the level reached by each system and let readers see how the pattern varies across the datasets.
The benchmark comparison concerns the partition of the test data. Hungarian alignment allows a correct cluster to earn credit regardless of what identifier it was given. It also makes clear why the reported test accuracy cannot establish the quality of the generated names. The alignment is based on membership in the reference categories, not on whether the text of a generated name matches a benchmark label. The paper evaluates the naming step through examples.
The names that came out of the clusters
The qualitative results range from exact matches to plausible descriptions at a different level of specificity. The BANKING group about pending cash withdrawals receives the label Pending cash withdrawal, matching the benchmark wording. Its selected examples are variations on the same problem, which makes the center of the cluster easy to describe. The example about topping up illustrates a subtler outcome. Loop proposes Top up with a check, while the benchmark category is Top up by cash or check. The selected sentences all concern checks. The generated name is faithful to those examples and narrower than the benchmark category as a whole.
CLINC offers examples in which names preserve the common meaning and add specificity. A group of questions asking about the calories in foods is labeled Calorie information for food, for the benchmark category Calories. For a group combining questions about the amount of state or federal taxes, the proposed name is Tax amount, for the benchmark category Taxes. On StackOverflow, examples involving spreadsheet operations receive Excel functionalities and operations for Excel, while a WordPress group receives WordPress Customization. The differences show how the phrasing of the central examples can influence both the subject and the scope of a proposed label.
These examples provide evidence about what a person might see when inspecting the discovered groups. Some names can be used as short descriptions with little interpretation. Others are accounts of the common theme in the central sample and may call for a closer look at the wider group. The paper’s results on cluster recovery and its examples of cluster naming answer different questions, and both are relevant to whether the output is useful for understanding an unlabeled collection.
What the ablations show
Feedback and known-category supervision
The main ablation study is on BANKING. The full Loop configuration has a test H-score of 74.60%, known accuracy of 83.99% and novel accuracy of 67.10%. Removing the known-category cross-entropy term from the refinement training lowers those values to 72.77%, 82.43% and 65.13%, respectively. The known labels continue to be useful as an explicit training signal during refinement. The lower novel accuracy in this variant also shows that changing this term affects the shared representation used for both sides of the task.
Removing language-model feedback yields 70.02% H-score on the BANKING test set. The known and novel test accuracies are 78.15% and 63.42%. The local learning procedure still provides a substantial basis for clustering, while the comparison with full Loop shows that the queried relationships add measurable information under this configuration. The degradation on known examples is also relevant. A known category supplies some labeled training examples, but there are still many unlabeled examples from known categories whose local relations can matter during training.
ClusterLLM reaches 71.96% H-score, 78.66% known accuracy and 66.32% novel accuracy on the BANKING test set in this comparison. The authors attribute Loop’s stronger outcome to its sample selection and its construction of candidate choices. This comparison changes how the system uses language-model guidance across more than one design decision. The more targeted sampling comparisons and the tests that vary the number of candidates offer a closer view of those decisions individually.
Whether the selected examples are actually difficult
One study replaces LIS with a different way of selecting examples while retaining the rest of the BANKING procedure. Entropy alone reaches 74.06% test H-score and 66.18% novel accuracy. Margin-based selection reaches 72.88% test H-score and 65.13% novel accuracy. Random selection gives 72.33% test H-score and 64.56% novel accuracy, while confidence-based selection gives 72.08% and 64.03%, respectively. LIS has the highest H-score and novel accuracy among these versions, while entropy alone gives 84.07% known accuracy, compared with 83.99% for LIS. The combined criterion’s advantage appears in the balance and on the novel side. The known split shows that the ordering is metric-dependent.
The authors additionally look at a question closer to the purpose of sample selection. Of the selected 200 examples in the diagnostic, what proportion actually fell into the wrong provisional cluster? This assessment uses the benchmark categories to check the selections. It evaluates the examples that the sampling methods choose, independently of whether the language model goes on to choose a useful neighbor for each one.
BANKING share of the selected 200 examples in wrong clusters
LIS selects the highest proportion of wrongly clustered examples among the compared strategies.
The numbers
| System or setting | selected examples in wrong clusters % |
|---|---|
| Random | 33.00 |
| Margin | 77.00 |
| Entropy | 80.00 |
| Confidence | 81.00 |
| LIS (this paper) | 88.48 |
The same diagnostic favors LIS on the other datasets. On StackOverflow, 90.97% of the selected examples fall into wrong clusters under LIS. The best alternative in that comparison is entropy at 84.50%. On CLINC, LIS reaches 72.25%, and the best alternative is margin at 68.50%. These comparisons support the interpretation that the combination of disagreement and uncertainty targets provisional errors across all three training collections.
A high proportion of wrongly clustered examples is different from a high rate of successful corrections. An example can be assigned to the wrong cluster and still be difficult to repair if all the retrieved candidates belong to other categories. The representation has to make an appropriate candidate available, and the service has to choose it or offer a useful approximation. This is why the diagnostic and the BANKING training comparison are complementary. The first asks whether LIS locates the intended kind of example. The second checks whether training with those selections and the rest of the procedure improves held-out assignments.
What changes when a prompt offers more choices
The query menu experiment on BANKING varies |q|. The main setting of 2 options gives a test H-score of 74.60% and novel accuracy of 67.10%. With 3 options, H-score reaches 75.91% and novel accuracy reaches 69.08%. With 4 options, H-score reaches 77.30% and novel accuracy reaches 71.71%. Known-category test accuracy is 83.99%, 84.25% and 83.84% across those settings, respectively. The steady gain in the balance measure accompanies steady gains on the novel split, while known accuracy changes comparatively little.
The corresponding query costs reported for the option settings are $0.39, $0.47 and $0.55. The larger prompt buys access to a broader set of competing candidates, and it also sends more tokens. The paper retains the smaller menu for the main comparisons. The separate option experiment shows what can be gained in this setting when that budget is increased. A diagnostic of neighborhood retrieval also shows more corrections with query feedback than without it, and more corrections as the candidate menu expands.
The number of queried examples is a separate decision from the number of options per example. When the authors increase the number of examples queried, performance rises with diminishing gains. Their explanation is that the selection procedure has an easier time identifying informative cases near the top of the rankings. As the queried set grows, additional examples are less likely to offer the same value. The analysis concerns how performance changes as the query budget is allocated more widely. It does not identify a universal budget across the datasets.
Sensitivity to neighborhood size and category information
The BANKING neighborhood study varies the number of retrieved neighbors over 25, 50, 100, 150 and 200. The authors describe similar performance for the tested settings below 100 and a clear deterioration when the neighborhood becomes substantially larger. They point out that BANKING has roughly 110 examples per category on average. A neighborhood much larger than the typical category puts more examples of other categories within reach of the random positive-pair selection used for unqueried sentences. Such a pair tells the encoder to bring together examples whose categories the evaluation expects to remain separate.
This finding concerns retrieval size, not just the number of options sent to the language model. The retrieval set is used to assess local disagreement and to choose positives even when the service is never called. Widening it can alter a much larger part of the training signal than widening a single prompt menu. In the reported experiments, expanding the tested prompt menu helps BANKING’s novel accuracy, while making the initial neighborhood very broad can hurt. The two settings control different stages and have different costs.
For the case where the total count of categories is unknown, the authors apply a filtering strategy from earlier work to estimate it. They report that their estimates are closer to the ground truth than those of the comparison methods. They also test inference with the true count overestimated by a factor of 1.2. In the BANKING ablation table this over-clustering setting yields 74.07% test H-score, 80.54% known accuracy and 68.56% novel accuracy. The corresponding full Loop configuration yields 74.60%, 83.99% and 67.10%. Thus the H-score stays close in this trial, with a lower known score and a higher novel score. The intervention tests an upward error of a specified size at inference.
Another BANKING study varies how many categories are treated as known. The authors examine known-category ratios of 25%, 50% and 75%. They report that Loop leads the compared systems across these ratios and their evaluation metrics, with particularly clear advantages on novel accuracy and H-score. This tests a change in the amount of category coverage available as supervision. It complements the test of an inaccurate total, which changes how many clusters the system is asked to form.
Finally, the authors use t-SNE to display learned representations on StackOverflow. t-SNE projects the higher-dimensional vectors into a view in which local relationships can be inspected visually. The figures show more separated groups for Loop than for the displayed MTP and DPN comparisons. The view for Loop without language-model feedback shows some novel groups mixed together. The figures illustrate the effect the authors seek from the training procedure. Test accuracy and the ablation metrics provide the quantitative evidence about whether the groups match the reference categories.
Limitations
Limits identified by the authors
The authors identify diminishing gains from larger query sets as a limit of the method. LIS pursues examples whose local assignments disagree and whose center-based predictions are uncertain. Those conditions can identify many provisional errors. They leave open whether the selected example has an available correction, and the value of lower-ranked selections declines as the system queries more examples. The authors treat improving the selection of informative examples as an open problem.
They also describe the supervision from the query as weaker than the category supervision used in conventional active learning. A chosen candidate supplies a relationship. A verified category label would tell the learner which category the example belongs to directly. The distinction is especially important when the candidate menu contains several semantically related examples whose benchmark categories differ. Pulling the chosen pair closer can be useful while leaving the relevant category boundary unresolved. The authors identify stronger query supervision as a question for future work.
The reliance on an external API is another limit the authors state. They describe limited control over the feedback returned by the service, and they point out the risks of uploading text from sensitive settings. Keeping the encoder and routine local computation under the operator’s control reduces the amount of data sent to the service. The queries still contain the selected sentence and its candidate neighbors, and naming a novel cluster also involves sending its representative sentences. The paper mentions that a locally deployed language model could fill this role. The experiments use the external API.
Limits of the evidence
The main comparison is a controlled version of category discovery in which the true total number of categories is available. This is valuable for comparing how systems recover a partition under the same category-count assumption. The count is frequently part of the uncertainty that motivates discovery in the first place. The filtering study addresses estimation, and the over-clustering trial addresses one controlled inference error. Those tests leave open how performance would change under larger mistakes, underestimation or a different interaction between count errors and the formation of training neighborhoods.
The datasets are established text collections in which the benchmark labels define the categories to be recovered. Novelty is created by withholding labels from a chosen subset of those categories. The resulting evaluation tests whether Loop recovers held-out classes from mixed data under that protocol. In a changing collection, an emerging group may have no settled definition, and useful categories may depend on how fine a distinction the application needs. The reported accuracy measures agreement with the benchmark partition. The paper does not evaluate those additional sources of ambiguity.
The naming evidence consists of illustrative examples. A name based on three central sentences can describe the center of a group more narrowly than the group’s full membership, as the example involving checks shows. An appealing name can also be given to a group that contains some misplaced examples. The paper does not report a dataset-wide naming score or a reader study that would quantify how consistently the names convey the full intended categories. Its numerical cluster results and its qualitative naming results support different claims about the output.
The dependence on candidate neighborhoods also limits what can be concluded about the source of each improvement. The BANKING component comparisons support the value of feedback, and the wrong-cluster diagnostic supports the sample selection strategy. Final performance reflects their combination with candidate construction, warm-up and contrastive training. The detailed ablations concentrate on BANKING, while the comparisons across the three datasets establish that the full tested configuration improves results more broadly. The option and retrieval sweeps show how those choices behaved in BANKING under the reported protocol.
The cost figures capture query spending in the tested setup. The authors give an average of $0.4 for each dataset, and the option experiment shows how the cost changes with a longer choice list. These figures are specific to the query procedure and service used in the experiments. They give a concrete sense of the price of the feedback calls for those runs, while local training, other providers and the handling of sensitive inputs involve separate deployment considerations.
What came after
Later papers cite Loop in work on representation learning, active discovery and evaluation. Their titles identify the directions in which they take up the problem. The citation relationship establishes that Loop is part of that conversation. The titles establish the later papers’ stated subjects, while the details of reuse and the outcomes of their experiments remain unspecified.
TLSA links generalized category discovery to contrastive alignment between text and label spaces under language-model guidance. The shared subject with Loop is the use of language-model information to shape representations for discovery. Loop obtains its training signal by comparing sentences and generates names after clustering. TLSA’s stated focus is the alignment of text and labels as part of contrastive learning. This puts the role of labels in the learned representation at the center of the later work. TLSA: LLM-Guided Text-Label Space Alignment with Contrastive Learning for Generalized Category Discovery
BOLT takes up evaluation through a benchmark for open-world text classification. That direction places the problem addressed by Loop inside a broader question about how learning systems are tested when the category inventory is incomplete. Loop illustrates why that scope matters. It reports known and novel performance separately, uses their harmonic mean to measure balance, and tests the effect of information about the total count of categories. BOLT’s title establishes its benchmarking focus. It does not specify which of Loop’s systems or settings it evaluates. BOLT: Benchmarking Open-World Learning for Text Classification
Active Generalized Category Discovery with Diverse LLM Feedback returns to the part of Loop where selected examples receive external judgments. Its title puts diversity of feedback at the center of active discovery. Loop’s tested approach uses a constrained neighbor-choice response, so the relationship between the papers can be understood through what information the active learner receives when it asks for help. The title leaves the particular forms of diverse feedback and their measured effects open. Active Generalized Category Discovery with Diverse LLM Feedback
Cite
Cite as Wenbin An, Wenkai Shi, Feng Tian, Haonan Lin, QianYing Wang, Yaqiang Wu, Mingxiang Cai, Luyan Wang, Yan Chen, Haiping Zhu and Ping Chen. 2024. Generalized Category Discovery with Large Language Models in the Loop. Findings of the Association for Computational Linguistics: ACL 2024.
@inproceedings{an2024generalized,
title = {{Generalized Category Discovery with Large Language Models in the Loop}},
author = {Wenbin An, Wenkai Shi, Feng Tian, Haonan Lin, QianYing Wang, Yaqiang Wu, Mingxiang Cai, Luyan Wang, Yan Chen, Haiping Zhu and Ping Chen},
booktitle = {Findings of the Association for Computational Linguistics: ACL 2024},
year = {2024},
doi = {10.18653/v1/2024.findings-acl.512},
url = {https://doi.org/10.18653/v1/2024.findings-acl.512}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/an-2024-generalized-category-discovery-large-language/