Abstract
As AI-human collaborative writing becomes commonplace, traditional binary AI detectors struggle to identify specific AI-generated spans within mixed-authorship documents, especially under adversarial conditions. We present DAMASHA, a novel framework that utilizes stylometric features and a soft-masking mechanism called Info-Mask to perform fine-grained segmentation. DAMASHA achieves state-of-the-art performance in boundary detection and remains robust against syntactic adversarial attacks.
Introduction
Most current AI text detectors are designed for document-level classification, failing to address the "mixed-authorship" reality where humans and LLMs co-author text. Furthermore, adversarial attacks—such as intentional misspellings or invisible Unicode characters—easily bypass standard semantic-based classifiers. DAMASHA addresses these challenges by focusing on fine-grained segmentation and adversarial robustness, identifying exactly where transitions between human and AI text occur.
Methodology: The Info-Mask Architecture
The DAMASHA framework integrates stylometric analysis with deep learning to create a robust segmentation model.
The architecture consists of three primary components:
- Style Feature Extractor: Extracts cues such as perplexity, POS density, punctuation density, lexical diversity, and readability scores.
- Info-Mask (Soft-Attribution): Uses Multi-head Attention to project stylistic features into a soft gating mask, modulating token representations to highlight AI-like structural patterns.
- CRF Tagging Layer: A Conditional Random Fields layer ensures label consistency across the sequence, preventing erratic transitions in the predicted spans.
Experimental Setup
The authors introduced the Mixed-text Adversarial setting for Segmentation (MAS) benchmark, comprising over 671,000 instances. This dataset incorporates text from GPT-4o and DeepSeek-V3 and subjects them to six types of syntactic adversarial attacks, including character substitutions and invisible character injections.
Results and Discussion
The proposed RMC (RoBERTa + ModernBERT + CRF) configuration significantly outperforms existing baselines in both boundary accuracy and token-level precision.
Key findings include:
- Superior Segmentation: DAMASHA achieved a Segment-wise Boundary Detection Accuracy (SBDA) of 45.7% at a 0.3 threshold, nearly 15% higher than the best prior baseline, SeqXGPT.
- Adversarial Robustness: Unlike zero-shot detectors like Binoculars or GPTZero, which fail under syntactic noise, DAMASHA maintains high performance across all attack types.
- Interpretability: The Human-Interpretable Attribution (HIA) feature significantly reduced human review time in user studies, making the tool more practical for real-world moderation.
Conclusion
DAMASHA represents a significant step forward in transparent and robust AI detection. By prioritizing stylometry over pure semantics and employing a soft-masking attribution mechanism, the model effectively unmasks AI spans in complex, adversarial, mixed-authorship contexts. Future work will explore multi-modal extensions and adaptation to low-resource languages.
Summary updated