CLEAR: Context-Aware Learning with End-to-End Mask-Free Inference for Adaptive Video Subtitle Removal

Qingdong He, Chaoyi Wang, Peng Tang, Yifan Yang, Xiaobin Hu

International Conference on Machine Learning 2026 · Oral

Overview

Video subtitle removal is the task of cleanly stripping away burnt-in hardcoded subtitles from video sequences—such as those found in movies—while perfectly restoring the obscured background areas, maintaining strict temporal continuity, and avoiding visual artifacts like flickering. Despite its apparent simplicity, the machine learning and systems community has lacked dedicated published works targeting this specific problem. While researchers have historically relied on general-purpose video inpainting or video editing pipelines, these mainstream diffusion-based architectures suffer from a critical dependency: they require explicit, pixel-level binary masks to indicate subtitle locations. Generating these masks demands tedious manual annotation during training and error-prone external detection modules during inference, which frequently introduce flickering and spatial artifacts.

Watch on SlidesLive

Visual summary for CLEAR: Context-Aware Learning with End-to-End Mask-Free Inference for Adaptive Video Subtitle Removal by Qingdong He, Chaoyi Wang, Peng Tang, Yifan Yang, Xiaobin Hu
Visual summary for CLEAR: Context-Aware Learning with End-to-End Mask-Free Inference for Adaptive Video Subtitle Removal by Qingdong He, Chaoyi Wang, Peng Tang, Yifan Yang, Xiaobin Hu

Key moments

  1. 0:00 Introduction to CLEAR and subtitle removal challenges
  2. 2:00 Stage one: Self-supervised prior learning and dual-encoder architecture
  3. 2:46 Stage two: Adaptive weighting learning and LoRA parameters
  4. 4:00 Loss functions and inference process
  5. 4:32 Experimental results and zero-shot multilingual capabilities
  6. 5:30 Q&A and discussion on failure cases

CLEAR: Context-Aware Learning with End-to-End Mask-Free Inference for Adaptive Video Subtitle Removal

Speakers: Qingdong He; Chaoyi Wang; Peng Tang; Yifan Yang; Xiaobin Hu

Conference: ICML

YouTube: https://slideslive.com/39083517

Overview

Video subtitle removal is the task of cleanly stripping away burnt-in hardcoded subtitles from video sequences—such as those found in movies—while perfectly restoring the obscured background areas, maintaining strict temporal continuity, and avoiding visual artifacts like flickering. Despite its apparent simplicity, the machine learning and systems community has lacked dedicated published works targeting this specific problem. While researchers have historically relied on general-purpose video inpainting or video editing pipelines, these mainstream diffusion-based architectures suffer from a critical dependency: they require explicit, pixel-level binary masks to indicate subtitle locations. Generating these masks demands tedious manual annotation during training and error-prone external detection modules during inference, which frequently introduce flickering and spatial artifacts.

To overcome these fundamental limitations, the authors introduce CLEAR (Context-Aware Learning with End-to-End Mask-Free Inference for Adaptive Video Subtitle Removal), a novel two-stage framework that bypasses the need for explicit masks during both training and inference. Presented at ICML, CLEAR learns a direct mapping from subtitle-laden videos to clean background sequences by leveraging a self-supervised prior learning phase followed by adaptive weighting learning via LoRA (Low-Rank Adaptation) on top of a pre-trained video diffusion model. This approach achieves true end-to-end mask-free execution, offering superior visual quality and quantitative metrics while exhibiting powerful zero-shot cross-lingual generalization across diverse natural languages and font styles.

Background

▶ Watch: Introduction to CLEAR and subtitle removal challenges (0:00)

The problem of removing burnt-in video text and subtitles sits at the intersection of generative video modeling, computer vision, and systems efficiency. Prior work in this domain has primarily leaned on general video inpainting frameworks. In these traditional pipelines, a pipeline consists of two decoupled steps: first, an external text or subtitle detection module localizes the burned-in characters frame-by-frame to generate binary masks; second, a generative model (often built on UNet backbones or diffusion architectures) inpaints the masked regions using spatial and temporal priors.

However, this decoupled paradigm introduces severe systems and algorithmic bottlenecks. External detectors are notoriously brittle when confronted with complex backgrounds, low-contrast text, stylized fonts, or rapid motion blur. Inaccuracies in the detection mask propagate directly into the generative model, causing catastrophic failure modes such as boundary bleeding, temporal jitter, and visible flickering across consecutive frames. Furthermore, requiring manual pixel-level annotations for training data scaling is economically and computationally prohibitive. CLEAR addresses this gap by reformulating subtitle removal as an end-to-end, mask-free learning problem, eliminating the external dependency on bounding-box or segmentation detectors entirely.

Key Findings

▶ Watch: Stage two: Adaptive weighting learning and LoRA parameters (2:46)

The primary breakthrough of CLEAR is its ability to perform high-fidelity video subtitle removal in a single forward pass without requiring any external masks during inference. Key findings and capabilities include:

  • Mask-Free End-to-End Execution: By internalizing subtitle localization directly into the generative weights, CLEAR removes the pipeline latency and error propagation associated with external detection modules.
  • Superior Performance: On benchmark evaluations using Chinese subtitle datasets, CLEAR significantly outperforms existing video inpainting-based methods in both standard pixel/perceptual metrics and human-evaluated visual quality.
  • Zero-Shot Cross-Lingual Generalization: Although the framework is trained solely on Chinese subtitle data, it demonstrates robust zero-shot inference capabilities across six additional languages: English, Korean, French, Japanese, Russian, and German. This proves that the model learns universal, font-invariant subtitle patterns rather than memorizing specific character sets.
  • Parameter-Efficient Adaptation: By applying LoRA to the underlying diffusion model, CLEAR achieves these performance gains while training a mere 0.77% of the original model's parameters.

Technical Deep Dive

▶ Watch: Loss functions and inference process (4:00)

CLEAR implements a carefully orchestrated two-stage training and inference pipeline designed to decouple subtitle features from background content without explicit spatial supervision.

Stage 1: Self-Supervised Prior Learning

To bypass the need for manually annotated masks, the first stage derives rough, noisy pseudo-masks automatically calculated via pixel differences between paired video caption data and clean reference videos. To isolate subtitle features from complex moving backgrounds, the framework employs a dual-encoder architecture:

  • Subtitle Encoder: Dedicated to learning universal representations of text artifacts.
  • Background Content Encoder: Dedicated to learning underlying scene dynamics.

The system enforces complete separation between these two feature spaces using explicit orthogonality constraints and adversarial learning. This forces the subtitle encoder to acquire robust, language-invariant, and font-agnostic prior knowledge regarding subtitle regions.

Stage 2: Adaptive Weighting Learning and Losses

The second stage translates the acquired priors into an adaptive generation mechanism using a pre-trained video diffusion model. Instead of full fine-tuning, the authors apply LoRA to the UNet backbone, updating only 0.77% of the original model parameters.

A lightweight occlusion head is introduced to dynamically predict a weighted map based on the internal encoding features of the diffusion model. Crucially, this map consists of continuous values rather than a binary mask, operating on two dimensions:

  1. Spatial Location: Assigns higher weights to identified subtitle regions.
  2. Inpainting Difficulty: Allocates greater weight to areas that are mathematically harder to restore, focusing the network's capacity on the most challenging visual contexts.

To optimize this adaptive mechanism, the training process incorporates three distinct loss functions:

  • Context-Determination Loss: Aligns the dynamic weighted maps with the universal prior knowledge acquired during Stage 1.
  • Context-Aware Generation Loss: Feeds the quality of the generated output back via gradients to guide the weighted maps in self-correction.
  • Context-Consistency Loss: Prevents the weighted maps from degenerating into a uniform, uninformative field.

Through this joint optimization, the model internalizes the adaptive inpainting strategy directly inside the LoRA parameters. Consequently, the Stage 1 prior models are discarded during deployment, allowing the network to perform clean restoration in a single forward pass.

Experimental Setup & Results

▶ Watch: Experimental results and zero-shot multilingual capabilities (4:32)

Evaluations conducted on Chinese subtitle datasets demonstrate that CLEAR achieves superior quantitative metrics and qualitative visual fidelity compared to existing video inpainting baselines. While specific numerical benchmark tables (such as PSNR, SSIM, or FVD scores) are omitted in the transcript, the qualitative superiority is underscored by the elimination of boundary flicker and ghosting artifacts commonly introduced by imperfect mask detectors.

In zero-shot evaluations, the model successfully generalized to English, Korean, French, Japanese, Russian, and German datasets without any task-specific fine-tuning. However, failure case analysis reveals specific operational boundaries: the framework struggles when subtitles occupy oversized regions covering the entire image, or when dealing with complex embedded video watermarks that do not conform to standard subtitle spatial-temporal dynamics.

Practical Implications

▶ Watch: Q&A and discussion on failure cases (5:30)

For infrastructure teams, model builders, and video processing pipelines, CLEAR offers a streamlined paradigm for generative video cleanup. By removing the dependency on external detection modules, engineering teams can eliminate multi-stage pipeline orchestration, reducing system latency and points of failure.

The parameter-efficient nature of the architecture—training only 0.77% of the base UNet via LoRA—makes downstream adaptation computationally lightweight and cost-effective. Deployers can leverage the zero-shot cross-lingual capabilities to build universal localization-cleaning services without maintaining language-specific detection models. However, production deployments must account for edge cases: input videos featuring full-screen text overlays or complex watermarks may require supplementary routing or fallbacks, as these push the limits of the model's spatial attention mechanism.

Key Takeaways

  • End-to-End Mask-Free Design: CLEAR eliminates the need for manual mask annotations and external detection modules during both training and inference.
  • Two-Stage Decoupled Learning: Combines a self-supervised prior learning phase (using dual encoders with orthogonality constraints) with adaptive weighting learning.
  • Parameter Efficiency via LoRA: Fine-tunes just 0.77% of a pre-trained video diffusion model's UNet parameters, maintaining high fidelity while minimizing training overhead.
  • Continuous Occlusion Mapping: Replaces binary masks with a continuous weighted map that dynamically adapts to spatial subtitle locations and inpainting difficulty.
  • Robust Zero-Shot Generalization: Successfully generalizes across seven distinct languages (Chinese, English, Korean, French, Japanese, Russian, German) despite being trained exclusively on Chinese data.
  • Identified Failure Modes: The method exhibits limitations when handling oversized, full-screen text or complex graphical watermarks.

About the Speaker(s)

  • Qingdong He: Presenter of the CLEAR paper on context-aware learning for adaptive video subtitle removal.

Co-authors: Chaoyi Wang, Peng Tang, Yifan Yang, Xiaobin Hu.

Reviews

→ Top-rated talks at International Conference on Machine Learning 2026

All talks from International Conference on Machine Learning 2026