Table of Contents
Fetching ...

TextShield-R1: Reinforced Reasoning for Tampered Text Detection

Chenfan Qu, Yiwu Zhong, Jian Liu, Xuekang Zhu, Bohan Yu, Lianwen Jin

TL;DR

Tampered text detection requires micro-level artifact understanding, robust localization, and reduced annotation dependence. TextShield-R1 delivers a reinforcement-learning-based framework with Forensic Continual Pre-training, Group Relative Policy Optimization-based fine-tuning, and OCR Rectification to boost detection accuracy, localization, and interpretability. It also introduces the Text Forensics Reasoning (TFR) benchmark, providing diverse, cross-domain, cross-language data with rich reasoning annotations to enable thorough evaluation. Across extensive experiments, TextShield-R1 achieves state-of-the-art performance on image-level, text recognition, localization, and reasoning tasks, signaling practical potential for reliable forensic AI systems.

Abstract

The growing prevalence of tampered images poses serious security threats, highlighting the urgent need for reliable detection methods. Multimodal large language models (MLLMs) demonstrate strong potential in analyzing tampered images and generating interpretations. However, they still struggle with identifying micro-level artifacts, exhibit low accuracy in localizing tampered text regions, and heavily rely on expensive annotations for forgery interpretation. To this end, we introduce TextShield-R1, the first reinforcement learning based MLLM solution for tampered text detection and reasoning. Specifically, our approach introduces Forensic Continual Pre-training, an easy-to-hard curriculum that well prepares the MLLM for tampered text detection by harnessing the large-scale cheap data from natural image forensic and OCR tasks. During fine-tuning, we perform Group Relative Policy Optimization with novel reward functions to reduce annotation dependency and improve reasoning capabilities. At inference time, we enhance localization accuracy via OCR Rectification, a method that leverages the MLLM's strong text recognition abilities to refine its predictions. Furthermore, to support rigorous evaluation, we introduce the Text Forensics Reasoning (TFR) benchmark, comprising over 45k real and tampered images across 16 languages, 10 tampering techniques, and diverse domains. Rich reasoning-style annotations are included, allowing for comprehensive assessment. Our TFR benchmark simultaneously addresses seven major limitations of existing benchmarks and enables robust evaluation under cross-style, cross-method, and cross-language conditions. Extensive experiments demonstrate that TextShield-R1 significantly advances the state of the art in interpretable tampered text detection.

TextShield-R1: Reinforced Reasoning for Tampered Text Detection

TL;DR

Tampered text detection requires micro-level artifact understanding, robust localization, and reduced annotation dependence. TextShield-R1 delivers a reinforcement-learning-based framework with Forensic Continual Pre-training, Group Relative Policy Optimization-based fine-tuning, and OCR Rectification to boost detection accuracy, localization, and interpretability. It also introduces the Text Forensics Reasoning (TFR) benchmark, providing diverse, cross-domain, cross-language data with rich reasoning annotations to enable thorough evaluation. Across extensive experiments, TextShield-R1 achieves state-of-the-art performance on image-level, text recognition, localization, and reasoning tasks, signaling practical potential for reliable forensic AI systems.

Abstract

The growing prevalence of tampered images poses serious security threats, highlighting the urgent need for reliable detection methods. Multimodal large language models (MLLMs) demonstrate strong potential in analyzing tampered images and generating interpretations. However, they still struggle with identifying micro-level artifacts, exhibit low accuracy in localizing tampered text regions, and heavily rely on expensive annotations for forgery interpretation. To this end, we introduce TextShield-R1, the first reinforcement learning based MLLM solution for tampered text detection and reasoning. Specifically, our approach introduces Forensic Continual Pre-training, an easy-to-hard curriculum that well prepares the MLLM for tampered text detection by harnessing the large-scale cheap data from natural image forensic and OCR tasks. During fine-tuning, we perform Group Relative Policy Optimization with novel reward functions to reduce annotation dependency and improve reasoning capabilities. At inference time, we enhance localization accuracy via OCR Rectification, a method that leverages the MLLM's strong text recognition abilities to refine its predictions. Furthermore, to support rigorous evaluation, we introduce the Text Forensics Reasoning (TFR) benchmark, comprising over 45k real and tampered images across 16 languages, 10 tampering techniques, and diverse domains. Rich reasoning-style annotations are included, allowing for comprehensive assessment. Our TFR benchmark simultaneously addresses seven major limitations of existing benchmarks and enables robust evaluation under cross-style, cross-method, and cross-language conditions. Extensive experiments demonstrate that TextShield-R1 significantly advances the state of the art in interpretable tampered text detection.
Paper Structure (18 sections, 6 figures, 4 tables)

This paper contains 18 sections, 6 figures, 4 tables.

Figures (6)

  • Figure 1: We introduce the Text Forensics Reasoning benchmark, which features a wide range of image domains, diverse and up-to-date tampering methods, rich annotations, various languages and comprehensive out-of-distribution evaluation settings. We also propose TextShield-R1, the first reinforcement learning based model for tampered text detection.
  • Figure 2: Representative samples (left) and data statistics (right) of the proposed Text Forensics Reasoning benchmark.
  • Figure 3: The overall pipeline of our TextShield-R1
  • Figure 4: The Forensic Continual Pre-training pipeline. The MLLM is trained to distinguish between real, entirely generated, and locally tampered images. For locally tampered images, we introduce 3D Forensic Learning, which enhances supervision through three complementary dimensions. Additionally, we incorporate an OCR reference grounding task to prevent the forgetting of OCR-related knowledge.
  • Figure 5: Under the GRPO framework, we optimize the model through five carefully designed reward functions.
  • ...and 1 more figures