Trajectory-Guided Diffusion for Foreground-Preserving Background Generation in Multi-Layer Documents
Taewon Kang
TL;DR
This work reframes diffusion-based document background generation as trajectory design in a structured latent space to preserve foreground content while maintaining cross-page stylistic consistency. It introduces a Style Bank of persistent latent directions and a Diffusion State-Space Control (SSC) mechanism that attenuates updates in foreground regions via a time-gated, energy-based approach, all without explicit masking or retraining. By coupling global style directions with a thermodynamic interpretation of latent stabilization, the method achieves foreground preservation and multi-page coherence across diverse document layouts, demonstrated through curated datasets, qualitative examples, and robust user studies. The approach is backbone-agnostic and training-free, offering a principled framework for reliable, structured generative modeling in multi-layer documents with practical impact for document editing and visual design workflows.
Abstract
We present a diffusion-based framework for document-centric background generation that achieves foreground preservation and multi-page stylistic consistency through latent-space design rather than explicit constraints. Instead of suppressing diffusion updates or applying masking heuristics, our approach reinterprets diffusion as the evolution of stochastic trajectories through a structured latent space. By shaping the initial noise and its geometric alignment, background generation naturally avoids designated foreground regions, allowing readable content to remain intact without auxiliary mechanisms. To address the long-standing issue of stylistic drift across pages, we decouple style control from text conditioning and introduce cached style directions as persistent vectors in latent space. Once selected, these directions constrain diffusion trajectories to a shared stylistic subspace, ensuring consistent appearance across pages and editing iterations. This formulation eliminates the need for repeated prompt-based style specification and provides a more stable foundation for multi-page generation. Our framework admits a geometric and physical interpretation, where diffusion paths evolve on a latent manifold shaped by preferred directions, and foreground regions are rarely traversed as a consequence of trajectory initialization rather than explicit exclusion. The proposed method is training-free, compatible with existing diffusion backbones, and produces visually coherent, foreground-preserving results across complex documents. By reframing diffusion as trajectory design in latent space, we offer a principled approach to consistent and structured generative modeling.
