Label Forensics: Interpreting Hard Labels in Black-Box Text Classifier
Not on the map. Why?
Abstract (arXiv)
The widespread adoption of natural language processing techniques has led to an unprecedented growth of text classifiers across the modern web. Yet many of these models circulate with their internal semantics undocumented or even intentionally withheld. Such opaque classifiers, which may expose only hard-label outputs, can operate in unregulated web environments or be repurposed for unknown intents, raising legitimate forensic and auditing concerns. In this paper, we position ourselves as investigators and work to infer the semantic concept each label encodes in an undocumented black-box classifier. Specifically, we introduce label forensics, a black-box framework that reconstructs a label's semantic meaning. Concretely, we represent a label by a sentence embedding distribution from which any sample reliably reflects the concept the classifier has implicitly learned for that label. We believe this distribution should maintain two key properties: precise, with samples consistently classified into the target label, and general, covering the label's broad semantic space. To realize this, we design a semantic neighborhood sampler and an iterative optimization procedure to select representative seed sentences that jointly maximize label consistency and distributional coverage. The final output, an optimized seed sentence set combined with the sampler, constitutes the empirical distribution representing the label's semantics. Experiments on multiple black-box classifiers achieve an average label consistency of around 92.24 percent, demonstrating that the embedding regions accurately capture each classifier's label semantics. We further validate our framework on an undocumented HuggingFace classifier, enabling fine-grained label interpretation and supporting responsible AI auditing.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 24 of its 51 references that are in the map. First posted on arXiv 1 Dec 2025.
Builds on
24 of 51 references.
References · 24
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
- 2020Label-Only Membership Inference Attackscited by 371
- 2023Causal Reasoning and Large Language Models: Opening a New Frontier for Causalitycited by 348
- 2024Stealing Part of a Production Language Modelcited by 152
- 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
- 2024Attacks, Defenses and Evaluations for LLM Conversation Safety: A Surveycited by 124
- 2023Decomposing Uncertainty for Large Language Models through Input Clarification Ensemblingcited by 113
- 2023Sentence Embedding Leaks More Information than You Expect: Generative Embedding Inversion Attack to Recover the Whole Sentencecited by 81
12 more
- 2025Auditing language models for hidden objectivescited by 68
- 2023Explaining black box text modules in natural language with language modelscited by 61
- 2024SoK: Membership Inference Attacks on LLMs are Rushing Nowhere (and How to Fix It)cited by 54
- 2024Text Embedding Inversion Security for Multilingual Language Modelscited by 26
- 2025Enhancing Semantic Consistency of Large Language Models through Model Editing: An Interpretability-Oriented Approachcited by 14
- 2024AuditLLM: A Tool for Auditing Large Language Models Using Multiprobe Approachcited by 11
- 2025Internal Causal Mechanisms Robustly Predict Language Model Out-of-Distribution Behaviorscited by 11
- 2022Designing Word Filter Tools for Creator-led Comment Moderationcited by 7
- 2023Deconstructing Classifiers: Towards A Data Reconstruction Attack Against Text Classification Modelscited by 6
- 2024Language Model Meets Prototypes: Towards Interpretable Text Classification Models through Prototypical Networkscited by 5
- 2024System Safety Monitoring of Learned Components Using Temporal Metric Forecastingcited by 4
- 2024Reconstructing training data from document understanding modelscited by 3
Built on by
Not cited yet.