TL;DR
SpongeBob is the first end-to-end audio-visual joint video editing framework that leverages bidirectional cross-modal interaction to simultaneously edit video and synthesize synchronized audio. By reformulating editing as a self-supervised inpainting task, it eliminates the frame-level desynchronization and contextual audio clashes common in traditional decoupled pipelines.
What Problem Does This Paper Address?
When we edit a video—such as replacing a barking dog with a meowing cat or removing a speaker from a conversation—the visual and acoustic changes must be perfectly synchronized to remain believable. However, existing video editing tools typically use decoupled pipelines: they edit the visual frames first and then use separate "expert" models to generate or patch the audio.
This disjointed approach leads to two major issues:
- Audio-Visual Desynchronization: Without real-time feedback between modalities during generation, edited lip movements and sound events drift apart at the frame level (e.g., a door-slam sound playing after the door has already closed).
- Contextual Conflicts: Newly generated sounds often ignore the unedited background environment, causing overlapping dialogue or breaking the natural turn-taking structure of a conversation.
Furthermore, training an end-to-end model historically faced a massive data challenge. It requires triplets of (pre-edit content, post-edit content, and editing instructions), which do not occur naturally at scale and are prohibitively expensive to manually collect.
Methods
SpongeBob overcomes the data scarcity bottleneck by reformulating audio-visual editing as a self-supervised inpainting task. Instead of looking for before-and-after pairs, the authors take ordinary videos, mask the target subject in both video and audio streams, and train the model to reconstruct the original content based on a text description. At inference time, substituting the text description transforms this reconstruction process into targeted editing.
The architecture is built on a dual-stream Diffusion Transformer (DiT) featuring three core components:
- Sync-Aware Editing Mechanism: To enforce frame-level synchronization, the authors introduce a three-way temporal Rotary Positional Embedding (RoPE) alignment that maps audio tokens to continuous virtual positions along the video timeline. It also uses Mask-Guided Asymmetric Spatial Routing, which confines audio-driven visual updates strictly to the masked target region so changes don't leak into the background.
- Context-Aware Module: This module introduces two zero-initialized cross-attention layers—Visual Context Attention and Acoustic Context Attention. These layers allow the target audio stream to perceive the unedited visual background and the remaining ambient audio track in real-time, preventing semantic clashes.
- Sync-Preserving Training and Guidance (SPTG): A multi-task training schedule co-trains the model across four modes (joint editing, audio-driven, video-driven, and context-null). During inference, a two-stage classifier-free guidance (CFG) scheme sequentially resolves context conflicts before sharpening temporal synchronization.
Datasets
To train the model, the authors built an automated, six-stage data pipeline that performs video collection, audio source identification (using Gemini), text-guided audio separation (via SAM-Audio), quality verification, instance segmentation (via Grounding DINO and SAM2), and joint filtering.
Using this pipeline, they curated a large-scale subject-level dataset containing 400K samples (~390 hours) of high-quality audio-visual pairs.
For evaluation, they introduced SpongeBob-Bench, a benchmark consisting of 700 test samples split into three distinct subsets:
- Speech-Video (400 samples): Evaluates speaker editing, lip sync, and non-target speaker preservation.
- Sound-Video (100 samples): Focuses on action-sound temporal alignment.
- Complex Scene (200 samples): Tests multi-source context consistency.
Key Insights and Ideas
- Asymmetric Receptive Fields: The authors realized that cross-modal information flow should be asymmetric. Audio-to-video communication must be spatially localized (confined by the mask) to prevent audio signals from distorting the background. Conversely, video-to-audio communication must be global, because a localized sound source's acoustic signature is inherently shaped by its surrounding environment.
- The Danger of Acoustic-Only Context: In ablation studies, relying solely on acoustic context attention actually degraded performance. Because separated background audio remains a mixed signal, the model couldn't differentiate non-target speech from ambient noise, leading to excessive silence. Combining it with Visual Context Attention provided the necessary cross-modal disambiguation to accurately localize when non-target speakers were talking.
Key Results
SpongeBob significantly outperformed existing cascaded and zero-shot baselines across video quality, audio quality, synchronization, and context consistency metrics.
- Synchronization & Context Boost: On SpongeBob-Bench, the model improved lip-sync confidence (Sync-C) by 30% and context consistency (Ctx-F1) by 12.5% over the strongest baseline (AVI-Edit).
- No Quality Trade-offs: Unlike many joint-modality models that sacrifice single-modality fidelity for alignment, SpongeBob achieved the lowest Fréchet Video Distance (FVD) and highest perceptual audio quality scores.
- Generalization: When tested on the external AvED-Bench (which focuses on non-speech environmental sounds), SpongeBob still led across all metrics, proving its capability extends far beyond human speech.
Limitations and Future Work
The authors note three primary limitations:
- Cross-Category Generalization: Because training relies on a mask-and-reconstruct approach, the model only sees same-category reconstructions. Drastic cross-category edits (e.g., transforming a dog into a cat) rely entirely on the compositional generalization of the underlying text/image embeddings, which can degrade if visual appearances differ too much.
- Inference Overhead: The two-stage SPTG guidance requires 140 total forward passes compared to the standard 100 passes of typical CFG. This ~40% increase in inference time poses a bottleneck for real-time or interactive applications.
- Video Length Constraints: Training clips are limited to 121 frames (~5 seconds). Processing longer videos requires chunking strategies, which can introduce audio-visual discontinuities at segment boundaries.
Summary updated