Multi-Loss Fusion: Angular and Contrastive Integration for Machine-Generated Text Detection

Iqra Zahid, Yue Chang, Tharindu Madusanka, Youcheng Sun, Riza Batista-NavarroEMNLP 2024

Introduction

The rapid advancement of Large Language Models (LLMs) has made distinguishing between human-authored and machine-generated text (MGT) increasingly difficult. This blurring boundary poses risks to academic integrity, digital trust, and the fight against misinformation. Researchers from the University of Manchester address these challenges with DeB-Ang, a detection framework that moves beyond standard classification objectives to leverage the geometric properties of text embeddings.

The DeB-Ang Framework

Current detection methods often struggle with generalizability across different LLMs and fail to capture the intrinsic distribution of high-level features. DeB-Ang addresses this by fine-tuning a DeBERTa model using a "multi-loss fusion" strategy.

The DeB-Ang architecture integrates cross-entropy, angular, and contrastive loss functions to optimize text representation.

The framework combines three distinct loss functions:

  1. Cross-Entropy Loss: The standard objective for penalizing misclassification based on probability distributions.
  2. Angular Loss: A scale-invariant loss that focuses on the angle between feature vectors. This encourages "intra-class compactness," forcing similar examples to cluster more tightly in the embedding space.
  3. Contrastive Loss: An unsupervised technique that explicitly pushes dissimilar instances (e.g., human vs. machine) apart while pulling similar instances together.

By fusing these losses, DeB-Ang learns robust, discriminative representations that are less sensitive to the specific noise of individual datasets.

Experimental Methodology

The researchers evaluated DeB-Ang using established benchmarks and a newly curated dataset:

  • TuringBench: Features 19 NLG models and human-authored text.
  • DAIGT-V2: A large-scale dataset comprising 36 models and 60,000 texts.
  • TuringExtended: A new benchmark created to test against state-of-the-art models including Gemma-7b, GPT4-Turbo, and Flan-T5-Large. Quality was verified using BERTScore and human annotation.

Key Results and Performance

DeB-Ang demonstrated significant performance improvements over baseline models. On the TuringBench dataset, the model achieved accuracy increases of up to 38.04% for specific model subsets.

Performance comparison on TuringBench subsets, showing substantial accuracy and F1-score improvements with DeB-Ang.

On the modern TuringExtended dataset, DeB-Ang achieved near-perfect detection rates, reaching 99.94% accuracy for GPT-4 Turbo and 99.98% for Gemma-7b. Furthermore, in authorship attribution tasks—identifying which of 37 possible models generated a text—DeB-Ang reached 87.80% accuracy, outperforming specialized architectures like Syntax-CNN.

Statistical analysis using McNemar’s test confirmed that the improvements from the angular and contrastive fusion were statistically significant compared to standard fine-tuning.

Insights into Machine Text Geometry

The success of DeB-Ang highlights the importance of geometric feature analysis. By focusing on the angle between embeddings rather than just distance or probability, the model effectively ignores scale and captures fundamental semantic directions. Error analysis revealed that misclassified texts often exhibit "linguistic sporadicity"—higher and more unpredictable feature counts—whereas correctly identified machine text follows more predictable distributions.

Conclusion and Future Directions

DeB-Ang represents a significant step forward in robust MGT detection. However, the authors note several areas for future research, including the detection of "adversarial" text designed to evade filters, the computational cost of multi-loss training, and the need for domain-specific evaluation in fields like law or medicine. As LLMs continue to evolve, detection frameworks must similarly adapt to the shifting linguistic landscape.

Summary updated

BibTeX
@inproceedings{zahid2024multi,
  author = {Iqra Zahid and Yue Chang and Tharindu Madusanka and Youcheng Sun and Riza Batista-Navarro},
  title = {{Multi-Loss Fusion: Angular and Contrastive Integration for Machine-Generated Text Detection}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.421},
}
Figure