Bootstrapping Text Anomaly Detection with LLM-Generated Weak Supervision

Fabio Masaracchia Maia, Anna Helena Reali Costa


Abstract
Text anomaly detection is challenging because anomalous instances often share vocabulary and surface form with normal data, making them hard to distinguish without semantic understanding. Semi-supervised methods can significantly outperform unsupervised baselines, but rely on labeled anomalies that are rarely available in practice. LLMs encode rich semantic knowledge that can approximate human judgments, yet using them directly as detectors is costly at inference time and sensitive to prompt design, while generating synthetic outliers risks distribution mismatch with real anomalies. We propose a different strategy: treating a compact, locally deployed LLM as a noisy annotator over real data. The LLM scores a small subset of unlabeled documents once at training time, producing weak labels that refine a sentence encoder via contrastive fine-tuning and train a lightweight downstream detector — without cloud APIs, human annotation, or curated anomaly datasets. Across four datasets spanning two languages and two tasks, the approach recovers up to 79% of the gap to oracle upper bounds while using 14–91× fewer labeled anomalies. We further identify three failure modes that explain when LLM-generated weak supervision succeeds or breaks down.
Anthology ID:
2026.stil-1.20
Volume:
Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology
Month:
October
Year:
2026
Address:
Cuiabá, Mato Grosso, Brazil
Editors:
Bryan Khelven da Silva Barbosa, Aline Paes, Ariani Di Felippo
Venue:
STIL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
231–244
Language:
URL:
https://aclanthology.org/2026.stil-1.20/
DOI:
10.5753/stil.2026.26601
Bibkey:
Cite (ACL):
Fabio Masaracchia Maia and Anna Helena Reali Costa. 2026. Bootstrapping Text Anomaly Detection with LLM-Generated Weak Supervision. In Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology, pages 231–244, Cuiabá, Mato Grosso, Brazil. Association for Computational Linguistics.
Cite (Informal):
Bootstrapping Text Anomaly Detection with LLM-Generated Weak Supervision (Maia & Costa, STIL 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.stil-1.20.pdf