Isolating Unknown Categories from Unlabeled Data Mixtures

15 concepts13 papers1 proposal

Standard machine learning models operate under a closed-world assumption: they expect the categories encountered during deployment to perfectly match the categories seen during training. In the real world, this assumption routinely breaks down. Models are frequently bombarded with unlabeled mixtures of data containing "unknown" categories—whether they are private outlier classes in a new target domain, novel out-of-distribution (OOD) inputs in the wild, or hallucinated facts generated by a large language model (LLM).

Forcing a model to treat these unknown instances as part of its familiar distribution leads to catastrophic misalignment, a phenomenon known as "negative transfer." The core challenge across these scenarios is clear: How do we isolate and detect unknown categories when we have absolutely no labeled examples of them?

The emerging consensus across domain adaptation, novelty detection, and factuality verification is that unknown distributions leave distinct structural footprints. By designing objectives that exploit these footprints, we can build robust open-world systems entirely without manual labels.


The Friction of the Unlabeled Mixture

To understand why isolating unknown categories is difficult, consider the problem of Partial Domain Adaptation (PDA). Here, we possess a large, fully labeled source dataset (e.g., hundreds of animal classes), but our target domain only contains a small subset of those classes (e.g., only cats and dogs). Because the target domain is completely unlabeled, the model does not know which source classes to keep and which to throw away.

As Zhangjie Cao et al. demonstrate in Partial Adversarial Domain Adaptation, if a model blindly attempts to align the global feature distributions of both domains, the irrelevant source classes act as severe background noise. This forces valid target samples to map to incorrect source categories. Jing Zhang et al. highlight this fundamental bottleneck in Importance Weighted Adversarial Nets for Partial Domain Adaptation: without target labels, standard feature alignment cannot determine which source data should be emphasized or ignored.

Standard Alignment:   [Source Outliers + Shared]  <--->  [Target Shared Only]  --> Negative Transfer!
Selective Alignment:  [Source Shared Only]        <--->  [Target Shared Only]  --> Clean Adaptation

This exact same friction occurs when models are deployed in the "wild" amidst unlabeled mixtures of in-distribution and out-of-distribution data. As explored by Julian Katz-Samuels et al. in Training OOD Detectors in their Natural Habitats, distinguishing novel outliers within these mixtures is exceptionally difficult because the exact ratio and mathematical nature of the outliers are completely unknown at the outset.


Exploiting Structural Footprints to Filter Outliers

If we cannot rely on human annotations to flag these unknown categories, we must force the model's architecture to reveal them automatically. Researchers achieve this by looking for structural anomalies during feature transformation.

Cycle Inconsistency

One intuitive mechanism is the concept of a "round-trip" verification. In Adversarial Partial Domain Adaptation by Cycle Inconsistency, Kun-Yu Lin et al. map source features into the target domain and then project them back to the source. If a sample belongs to a shared category, its round-trip projection remains stable. However, if a sample belongs to an outlier class that does not exist in the target domain, the mapping breaks down, creating a massive "cycle inconsistency" that flags the sample as an outlier.

Partial Optimal Transport

Instead of geometric projections, Renjun Xu et al. utilize mathematical transport theory in Joint Partial Optimal Transport for Open Set Domain Adaptation. By modeling the alignment as a partial optimal transport problem, the authors dynamically estimate the probability distribution of unknown target classes, allowing the system to naturally drop unaligned target samples rather than forcing them into known source categories.

Attention and Prototypical Matching

Other approaches exploit the internal representations of modern architectures:


Ensemble Disagreement and Statistical Guarantees

When a source domain is not available to anchor the alignment, how can we detect novel categories within a completely unlabeled mixture? The solution lies in forcing models to reveal their uncertainty through disagreement.

If you train a single model on a mixture of known and unknown data, it may confidently overfit to the outliers. However, if you train an ensemble of models with a specific constraint, you can break this confidence. Alexandru Tifrea et al. develop this intuition in Novelty detection using ensembles with regularized disagreement. The authors force the ensemble members to maximize their agreement on known, in-distribution data, while explicitly regularizing them to diverge on unlabeled data.

Known Input  --> [Model A: Class 1] [Model B: Class 1] [Model C: Class 1] --> High Agreement (In-Distribution)
Novel Input  --> [Model A: Class 2] [Model B: Class 4] [Model C: Class 1] --> High Disagreement (Outlier!)

Because the models are never forced to agree on the out-of-distribution data, they naturally output highly divergent predictions when encountering a novel category. The variance in their disagreement serves as an unsupervised beacon for novelty.

Providing rigorous boundaries for these unsupervised detectors is notoriously difficult, but it is mathematically possible. Si Liu et al. establish the theoretical foundation for this setup in Open Category Detection with PAC Guarantees. By mathematically comparing a clean training set against a contaminated unlabeled mixture, the authors prove that a system can achieve Probably Approximately Correct (PAC) guarantees—ensuring a user-specified alien detection rate while strictly minimizing false alarms.


Synthesizing the Unknown via Reference-Based Pseudo-Labeling

The challenge of isolating unknown categories extends directly to Large Language Models (LLMs). When an LLM generates text, a "hallucination" represents a sudden departure from the factual distribution into an unaligned, non-factual category space. Much like domain adaptation, manually annotating these errors is prohibitively slow and expensive.

Instead of waiting for human labels, researchers realize they can synthesize the unknown category by forcing the model to deviate from a known reference.

Reference Corpus: "The capital of France is Paris, which is known for the Eiffel Tower."
Truncated Prompt: "The capital of France is..."
LLM Completion:   "...Lyon, a city famous for food."  <-- Divergence detected! Automatically pseudo-labeled as "Hallucination".

Weihang Su et al. operationalize this intuition in Unsupervised Real-Time Hallucination Detection based on the Internal States of Large Language Models. By truncating factual sentences from a reference corpus and observing the model's completions, any text that diverges from the original ground truth is automatically pseudo-labeled as a hallucination.

Crucially, this automated labeling allows the authors to look under the hood. By pairing these synthetic labels with the LLM's internal activation patterns during generation, a separate classifier learns to recognize the hidden "brain states" of a hallucination in real time.

This strategy of automated reference comparison drastically lowers the barrier to building intelligent systems. Jia Zhu et al. leverage this unsupervised generation strategy in RaDIO: Real-Time Hallucination Detection with Contextual Index Optimized Query Formulation for Dynamic Retrieval Augmented Generation, using it to dynamically determine exactly when a Retrieval-Augmented Generation (RAG) system needs to query external knowledge bases. Furthermore, Ze Chen et al. demonstrate in OPDAI at SemEval-2024 Task 6: Small LLMs can Accelerate Hallucination Detection with Weakly Supervised Data that when paired with prompt engineering and weak supervision, even lightweight, small language models can successfully learn to categorize these complex factual anomalies without human intervention.

Whether tracking down an outlier image class, an out-of-distribution sensor reading, or a subtle factual error in a sentence, the underlying principle remains identical: we do not need to see the unknown beforehand to isolate it. We only need to measure how violently it disrupts the structure of what we already know.

Key Foundational Work

Joint Partial Optimal Transport for Open Set Domain Adaptation (2020) — contributed 1 concept elements to this direction.
Open Category Detection with PAC Guarantees (2018) — contributed 1 concept elements to this direction.
Partial Adversarial Domain Adaptation (2018) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_unsupervised_hallucination_detection_30de363c,
  title = {unsupervised hallucination detection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/unsupervised-hallucination-detection/rdr_30de363cecab40f098f1418b6f9f6b08},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_unsupervised_hallucination_detection_30de363c_v1,
  title = {unsupervised hallucination detection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/unsupervised-hallucination-detection/rdr_30de363cecab40f098f1418b6f9f6b08/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake