arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.01514cs.LG
收藏

标签取证:解读黑盒文本分类器中的硬标签

Label Forensics: Interpreting Hard Labels in Black-Box Text Classifier

National University of Defense Technology(国防科技大学);National University of Singapore(新加坡国立大学)

Mengyao Du, Gang Yang, Han Fang, Quanjun Yin, Ee-chien Chang

AI总结:

本文提出标签取证框架,通过语义邻域采样和迭代优化,推断黑盒文本分类器中标签的语义意义,实现高一致性标签解释和负责任的AI审计。

摘要:

自然语言处理技术的广泛应用导致现代网络上文本分类器数量急剧增长。然而,许多这些模型在内部语义上缺乏文档说明,甚至可能故意隐瞒。这种不透明的分类器,可能只暴露硬标签输出,可以在不受监管的网络环境中运行,或被重新用于未知意图,引发合法的取证和审计问题。在本文中,我们以调查员的身份,致力于推断未记录的黑盒分类器中每个标签所编码的语义概念。具体而言,我们引入了标签取证,一种黑盒框架,用于重建标签的语义意义。具体来说,我们通过句子嵌入分布来表示标签,其中任何样本都能可靠地反映分类器为该标签隐含学习的概念。我们相信这种分布应具备两个关键属性:精确性,样本一致地被分类到目标标签,以及广泛性,涵盖标签的广义语义空间。为此,我们设计了一个语义邻域采样器和一个迭代优化过程,以选择代表性的种子句子,共同最大化标签一致性和分布覆盖。最终输出,一个优化后的种子句子集与采样器结合,构成了代表标签语义的经验分布。在多个黑盒分类器上的实验实现了约92.24%的平均标签一致性,证明嵌入区域准确捕捉了每个分类器的标签语义。我们进一步在未记录的HuggingFace分类器上验证了我们的框架,实现了细粒度的标签解释,并支持负责任的AI审计。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑