cs.CLAug 24, 2026

DiFA: Dual Evidence Fusion and Aggregation for Token-Level Text Anomaly Detection

Authors: Yanyu Qian, Pengcheng Weng, Yue Tan, Enguang Zuo, Yu Zheng, Yixin Liu

Organizations: Nanyang Technological University, Singapore · University of Bern, Switzerland · Griffith University, Australia · Xinjiang University, China

Abstract

Text anomaly detection, the task of identifying text instances that deviate from normal language patterns, is crucial for language-driven applications. However, most existing methods can only perform document-level anomaly detection, making it hard to locate harmful phrases or support targeted prevention. Recently, there has been an emerging trend toward token-level text anomaly detection, which aims to address the above limitation by identifying anomalous words or fragments within a document. Nevertheless, one representative method mainly relies on representation-space distance measurement, neglecting the complementary roles of different anomaly cues in capturing diverse abnormal patterns. To bridge the gaps, we propose a Dual-evidence framework with adaptive Fusion and Aggregation (DiFA) for token-level anomaly detection. DiFA derives anomaly scores from form-structural and semantic views to capture visible structural abnormality and contextual inconsistency, respectively, thereby providing complementary evidence for identifying diverse anomalies. To combine these two scores with varying numerical scales, DiFA incorporates a calibration and fusion mechanism to adaptively balance the two views. Moreover, to obtain a discriminative document-level score, a multivariate aggregation method is designed to summarize token-level anomaly scores from multiple perspectives, preventing rare anomalous tokens from being diluted. Extensive experiments across various text anomaly detection benchmarks demonstrate that DiFA consistently achieves top performance while maintaining strong efficiency, robustness, and interpretability. The code and scripts are available at: https://github.com/qyy11-com/DiFA.

Figures & tables

Explore similar work

CardsList
  1. SIM: Subspace Interaction-based Method for Token-Level Text Anomaly Detection

    Sep 8, 2026Kehan Yan, Yue Tan, Qingfeng Chen +3Anomaly LocalizationAnomaly Detection

  2. ProTAGAD: A Foundation Model for TAG Anomaly Detection with Decoupled Topological and Textual Prototypes

    Aug 11, 2026Ziyan Wang, Liwen Wu, Cheng Xie +3Prototype LearningText-Attributed Graph Learning

  3. Node-to-Neighborhood Semantic Consistency: Text-Topology Alignment for TAGs Anomaly Detection

    Jun 29, 2026Bochen Lin, Jianxiang Yu, Jiayi Wu +3Text-Attributed Graph LearningAnomaly Detection