Soft-Masked SDS Loss: Localized 3D Editing
- Soft-masked SDS Loss is a loss formulation that utilizes view-consistent soft segmentation masks to enable precise part-level edits in 3D Gaussian splatting representations.
- It integrates additional regularization terms, including an L1 anchor loss and Gaussian prior removal, to ensure stability and restrict gradient flow to targeted regions.
- Implemented in the RoMaP framework, this approach overcomes the global editing bias of vanilla SDS by confining modifications to specific semantic parts.
Soft-masked Score Distillation Sampling (SDS) loss is a loss formulation designed for localized 3D editing within the framework of 3D Gaussian Splatting, with applications in precise part-level modifications of 3D scene representations. It integrates a soft part-based mask into the SDS loss, restricts gradient flow to specific semantic regions, employs additional regularization terms, and leverages a robust, view-consistent soft segmentation mask generated by a geometry-aware module. This approach addresses the instability and global-editing bias typical of vanilla SDS when applied to complex 3D objects, enabling robust, controlled, and visually consistent edits to targeted parts while preserving context. The primary implementation is found in the RoMaP framework, which demonstrates state-of-the-art local 3D editing on reconstructed and generated Gaussian scenes and objects (Kim et al., 15 Jul 2025).
1. Standard Score Distillation Sampling (SDS) Loss
Score Distillation Sampling (SDS) is a text-driven loss first introduced in 3D generative modeling to propagate semantic feedback from pretrained 2D diffusion models (such as Stable Diffusion) into 3D representations. Let denote a differentiable 3D renderer parameterized by Gaussian splat representation . For a diffusion model's noise-prediction network , where is the conditioning prompt, the forward noising process for an image is written as: The conventional SDS loss is
where is a timestep-dependent weight (often unity). The loss provides a gradient signal that is back-propagated via the differentiable renderer into the parameters governing the 3D scene.
A direct application of standard SDS to 3D Gaussians leads to global modifications, as the loss is computed uniformly across all pixels, causing undesirable global appearance changes instead of focused, controllable semantic part edits (Kim et al., 15 Jul 2025).
2. View-Consistent Soft 3D Mask Generation via 3D-GALP
To enable precise part-level editing, RoMaP introduces 3D-Geometry Aware Label Prediction (3D-GALP), which generates view-consistent soft segmentation masks for target parts. Each 3D Gaussian is augmented with a spherical harmonics (SH) color parameter . For any viewing direction , the SH parameter produces the per-Gaussian, view-dependent “segmentation-SH” image via
with as the splatting rasterizer. The parameters are fit by matching aggregated SH-projected images against multi-view attention maps for the target part, minimizing the norm.
Averaging over all views produces a mean feature vector , which—in combination with cosine similarity against label embeddings —yields the soft-label probability distribution for each Gaussian: For a target label , the 3D mask value is . Projecting this 3D mask into each rendered 2D view produces a soft mask: where is the contribution of Gaussian to pixel . This soft mask modulates the SDS-induced gradient flow so that optimization is spatially localized to the part of interest.
3. Regularized Soft-masked SDS Loss Formulation
RoMaP’s soft-masked SDS loss combines three main terms: (1) a mask-restricted SDS term, (2) an “anchor” loss employing a part-edited image as target, and (3) a Gaussian prior removal term for local context control: where and are masked by , is the edit prompt, and is the 2D rendering after prior removal.
The masked SDS term evaluates
Over pixels, only those within the soft mask contribute, yielding strictly localized semantic guidance. Gradient steps are only taken for Gaussians with mask values above a set threshold, freezing the remainder and confining change to the target region.
4. Auxiliary Regularization: Anchor Loss and Gaussian Prior Removal
Two additional regularizers are integrated to maintain edit locality and improve edit stability:
- Anchor loss (masked ):
This term enforces that Gaussians inside the mask produce part-edited renderings consistent with those generated by Scheduled Latent Mixing and Part (SLaMP) editing, thus anchoring part modifications.
- Gaussian prior removal:
The 2D color in the edited region is mixed with a neutral color (e.g., gray/white) outside the mask:
Gaussians with negligible mask activation () are frozen, prohibiting their update—a hard barrier preventing error propagation or drift outside the intended region.
This combination of soft masking, anchor, and prior-removal regularization explicitly stabilizes edits and constrains transformations to the spatial target provided by the 3D-GALP-generated mask (Kim et al., 15 Jul 2025).
5. Scheduled Latent Mixing and Part (SLaMP) Editing
SLaMP is an auxiliary procedure for generating high-quality, part-modified anchor images, which form the reference for the anchor loss. At each diffusion timestep , SLaMP interpolates latent codes such that only the target region changes: where is a sharp schedule (low for , high for ) that allows the non-target region to remain unedited after a warmup period. Decoding the final latent yields .
Through anchor loss, SLaMP ensures drift is prevented outside of the part; only the part is edited, and background consistency is preserved, mitigating artifacts common in unrestricted SDS adaptations.
6. Operational Workflow and Empirical Comparison to Vanilla SDS
The practical optimization workflow per iteration and view is as follows:
- Render using the current Gaussian parameters.
- Apply Gaussian prior removal to yield .
- Generate the soft mask via 3D-GALP.
- Sample and form noised input .
- Compute diffusion model prediction .
- Formulate and back-propagate the masked SDS residual .
- Generate the part-edited anchor image via SLaMP, compute masked loss to , back-propagate.
- Freeze gradients for Gaussians where .
In contrast, vanilla SDS would transmit semantic gradients indiscriminately, leading to unintended edits and drift throughout the entire model, eroding local geometry and appearance. The soft-masked approach, modulating both SDS and anchor loss terms, ensures edit locality and prevents interference with non-targeted regions (Kim et al., 15 Jul 2025).
7. Context, Significance and Implications
Soft-masked SDS loss as formalized in RoMaP resolves a fundamental challenge in 3D generative editing: the ability to control, confine, and stabilize semantic edits to arbitrary object parts within Gaussian Splatting-based 3D representations. By introducing a robust, view-consistent soft mask via 3D-GALP, augmenting the SDS loss with prior-removal and anchor-based regularization, and leveraging SLaMP for faithful anchor supervision, this approach avoids both the ambiguity and global artifacts inherent in prior unconstrained SDS workflows. The methodology provides a direct and practical means to achieve local, high-fidelity part editing and is extendable to a variety of instance-level 3D generative and editing applications (Kim et al., 15 Jul 2025).