TextSleuth: Towards Explainable Tampered Text Detection

Chenfan Qu

TL;DR

This paper introduces "explainable tampered text detection," a new task that aims to not only identify manipulated text in images but also explain why it's considered tampered using natural language. They've created the ETTD dataset and a novel model, TextSleuth, which leverages large multimodal models to achieve state-of-the-art performance in this challenging domain.

What Problem Does This Paper Address?

In today's digital world, text in images is a crucial information carrier, but it's also increasingly vulnerable to manipulation for malicious purposes like fraud. While existing methods can detect where text has been tampered with, they often act as "black boxes," failing to provide a clear, interpretable explanation for their judgments. This lack of transparency makes their predictions unreliable and hinders trust. The authors aim to bridge this gap by developing methods that can not only pinpoint tampered text but also articulate the specific visual and linguistic anomalies that led to that conclusion, using natural language.

Methods

The core of this work revolves around leveraging large multimodal models (LMMs) for explainable tampered text detection.

  • Dataset Creation (ETTD): To address the lack of suitable data, they created the ETTD (Explainable Tampered Text Detection) dataset. This dataset includes pixel-level annotations for tampered text regions and, crucially, natural language descriptions of the anomalies. They used GPT-4o with carefully crafted prompts to generate these descriptions, employing techniques like a "fused mask prompt" (combining the image with a binary mask) to improve GPT-4o's understanding of the tampered region and reduce confusion. They also implemented an automatic filtering mechanism based on OCR accuracy to ensure annotation quality.
  • Model Architecture (TextSleuth): They propose TextSleuth, a novel model designed for this task. It employs a two-stage approach:
  • Tampered Region Detection: An initial detection module (Swin-Transformer based) identifies potential tampered text regions.
  • Explainable Analysis: The predicted bounding box is converted into a "grounding prompt" and fed into an LMM along with the image. This auxiliary prompt helps the LMM focus on the suspected region, leading to more accurate anomaly descriptions. This approach aims to improve fine-grained perception and cross-domain generalization.

Datasets

  • ETTD (Explainable Tampered Text Detection) Dataset: This is a newly introduced, large-scale, comprehensive dataset specifically designed for explainable tampered text detection. It contains:
  • Training Data (ETTD-Train): 20,000 images (12,000 tampered, 10,500 authentic).
  • Test Data (ETTD-Test): 1,000 tampered images (in-domain).
  • Cross-Domain Test Data (ETTD-CD): 1,500 images (with different distributions from ETTD-Train). The dataset includes multilingual document, card, and scene text images, with tampering methods like copy-move, splicing, and DiffUTE.

  • Public Datasets:

    • Tampered IC-13: Used for evaluating cross-domain performance and robustness.

Key Insights and Ideas

  • The Need for Explainability: Simply detecting tampered text isn't enough. The lack of interpretability in current methods makes them unreliable. Providing natural language explanations is crucial for building trust and enabling effective security measures.
  • LMMs as Powerful Annotators: Large multimodal models like GPT-4o can be effectively used to generate high-quality, natural language anomaly descriptions, but they require careful prompting and data preparation to avoid confusion.
  • Fused Mask Prompting: Directly feeding a binary mask to LMMs for text detection can be confusing. Combining the image with the mask (fused mask prompt) significantly improves the model's ability to pinpoint the tampered region and generate better descriptions.
  • Two-Stage Detection + Auxiliary Prompting: A two-stage approach, where an initial detector guides an LMM with a specific prompt, is highly effective. This helps the LMM focus its attention, leading to improved accuracy and generalization.
  • Scaling Laws Apply: Larger LMMs generally perform better, confirming the importance of model scale in this task.
  • High Input Resolution is Key (but with caveats): While higher resolution aids in detecting subtle anomalies, it can sometimes hinder cross-domain generalization.

Key Results

  • ETTD Dataset: The paper introduces the ETTD dataset, which is claimed to be the first large-scale, comprehensive dataset for explainable tampered text detection.
  • TextSleuth Performance: TextSleuth achieved state-of-the-art performance on both the proposed ETTD dataset and the public Tampered IC-13 dataset.
  • On ETTD-Test (in-domain), TextSleuth achieved a final score of 97.2.
  • On ETTD-CD (cross-domain), TextSleuth achieved a final score of 97.9.
  • It significantly outperformed existing methods, demonstrating strong in-domain and cross-domain generalization.
  • Anomaly Description Quality: The fused mask prompt improved the OCR accuracy of anomaly descriptions from 47.3% (binary mask) to 84.2%.
  • Detection Performance: TextSleuth achieved high precision, recall, and F1-scores on ETTD-Test (0.990 F1) and ETTD-CD (0.989 F1).

Limitations and Future Work

  • Limitations:
    • The paper notes that high input resolution, while beneficial for in-domain performance, can sometimes weaken model generalization to unfamiliar scenarios.
  • The performance of TextSleuth can be further improved with better tampered region detectors.
  • Future Work:
    • The authors suggest that incorporating more advanced tampered text region detectors could enhance TextSleuth's performance.
  • The insights and dataset provided are intended to inspire further research in the field of explainable tampered text detection.

Summary updated

BibTeX
@misc{qu2024textsleuth,
  author = {Chenfan Qu},
  title = {{TextSleuth: Towards Explainable Tampered Text Detection}},
  year = {2024},
  eprint = {2412.14816},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.14816},
}
Figure