TRACE: Your Diffusion Model is Secretly an Instance Edge Detector
Sanghyun Jo (Principal AI Researcher · LG AI Research), Ziseok Lee, Wooyeol Lee, Jonghyun Choi, Jaesik Park, Kyungsu Kim
International Conference on Learning Representations 2026 · Oral
Overview
In a compelling presentation at ICLR, Sanghyun Jo from LG AI Research unveiled TRACE (Temporal Reasoning for Accurate Contextual Edges), a novel framework that leverages pre-trained text-to-image diffusion models for highly accurate, class-agnostic instance edge detection. The core discovery of TRACE is that these powerful generative models, without any explicit training for segmentation, inherently encode a rich understanding of individual object boundaries within their internal self-attention mechanisms, particularly at specific early denoising timesteps. This finding challenges the conventional wisdom in computer vision that strong performance in perception tasks necessitates extensive human supervision.

Key moments
- 0:00 Introduction: TRACE for class-agnostic instance edge detection
- 1:06 Key discovery: Self-attention reveals hidden instance structure
- 2:22 Stage 1: Identifying the Exact Moment for Instance Structures (IEP)
- 3:06 Stage 2: Distilling edges for real-time, connected boundaries
- 4:08 Boundary-Guided Propagation (BGP) for clean instance segmentation
- 5:28 Visual evidence: Diffusion models separate instances with IEP
- 7:49 Broader impact: Scaling perception with generative capabilities
- 8:20 Q&A: TRACE's robustness compared to supervised models
TRACE: Your Diffusion Model is Secretly an Instance Edge Detector
Speakers: Sanghyun Jo (Principal AI Researcher, LG AI Research); Ziseok Lee; Wooyeol Lee; Jonghyun Choi; Jaesik Park; Kyungsu Kim
Conference: ICLR 2026
YouTube: https://slideslive.com/39062095
Overview
In a compelling presentation at ICLR, Sanghyun Jo from LG AI Research unveiled TRACE (Temporal Reasoning for Accurate Contextual Edges), a novel framework that leverages pre-trained text-to-image diffusion models for highly accurate, class-agnostic instance edge detection. The core discovery of TRACE is that these powerful generative models, without any explicit training for segmentation, inherently encode a rich understanding of individual object boundaries within their internal self-attention mechanisms, particularly at specific early denoising timesteps. This finding challenges the conventional wisdom in computer vision that strong performance in perception tasks necessitates extensive human supervision.
The talk addressed a significant challenge in unsupervised or weakly supervised instance segmentation: the precise identification of instance boundaries. While prior efforts with vision encoders like DINO often merge multiple instances of the same semantic class, and methods forcing a fixed number of objects can fragment single objects, TRACE offers a fundamentally different approach. By focusing on extracting instance-aware edges rather than semantic clustering, TRACE provides a universal plugin capable of refining semantically merged masks into clean, separate outputs, dramatically reducing the reliance on costly instance-level labeling.
This research is particularly impactful for the field of computer vision and machine learning systems. It demonstrates a pathway to scaling perception systems by harnessing the latent generative capabilities of diffusion models, moving away from labor-intensive annotation efforts. By revealing the hidden instance-level priors within these models, TRACE not only achieves state-of-the-art performance in instance edge detection but also paves the way for a new paradigm in segmentation, where generative models serve as powerful, low-supervision foundational components for downstream tasks.
Background
▶ Watch: Introduction: TRACE for class-agnostic instance edge detection (0:00)
The landscape of instance segmentation has long been dominated by supervised learning paradigms, requiring meticulous pixel-level annotations for every object instance within an image. This labor-intensive process presents a significant bottleneck for deploying and scaling computer vision systems, particularly in scenarios involving novel classes or large datasets. Consequently, researchers have explored various avenues to reduce this annotation burden, including weakly supervised and unsupervised methods.
Early attempts often revolved around semantic clustering or leveraging features from pre-trained vision encoders. For instance, models like DINO (DINOv2), trained with self-supervised learning on vast image datasets, excel at grouping pixels belonging to the same semantic class. However, a fundamental limitation of these approaches is their tendency to merge distinct instances that share the same semantic label (e.g., two adjacent cats), as their primary objective is semantic coherence, not instance discrimination. This results in "semantic blobs" where individual objects lose their distinct boundaries. Other methods attempting to cluster a fixed number of objects often face the opposite problem, erroneously fragmenting a single object into multiple smaller parts, failing to capture the holistic structure of an instance.
The motivation behind TRACE stems from a simple yet profound observation regarding text-to-image diffusion models. When presented with the same noise but varied text prompts (e.g., "two cats" vs. "three cats"), these models can generate images with different numbers of distinct objects. This phenomenon strongly suggests that the underlying mechanisms of diffusion models already contain an intrinsic signal for differentiating and separating individual instances, irrespective of their semantic class. The challenge, then, was to uncover and extract this latent instance-aware information.
Initial investigations into the internal features of diffusion models revealed a critical distinction: cross-attention layers primarily focus on broad semantic areas, aligning with the overall text prompt (e.g., identifying all "cat pixels"). In contrast, the self-attention mechanisms, particularly at specific early denoising timesteps, were found to secretly encode clear and precise instance structures. This divergence pointed towards the self-attention as the key to unlocking unsupervised instance segmentation, setting the stage for TRACE's two-stage methodology to harness these hidden boundaries.
Key Findings
▶ Watch: Stage 1: Identifying the Exact Moment for Instance Structures (IEP) (2:22)
The TRACE project made several pivotal discoveries and contributions that redefine the approach to instance edge detection and weakly supervised segmentation:
- Hidden Instance Priors in Diffusion Models: The most significant finding is that pre-trained text-to-image diffusion models, despite not being explicitly trained for segmentation, possess a robust, class-agnostic understanding of instance boundaries. This information is encoded within their self-attention mechanisms, specifically emerging at early denoising timesteps. This challenges the long-standing assumption that strong human supervision is indispensable for high-performance perception tasks.
- The Instance Emergence Peak (IEP): TRACE introduces the concept of the Instance Emergence Peak (IEP), a specific timestep during the denoising process where the diffusion model transitions from forming broad semantic blobs to articulating clear, distinct instance structures. This peak can be quantitatively identified using metrics like KL divergence gap, marking the "sweet spot" for extracting instance-level information. Without identifying this peak, the diffusion model's prior tends towards semantic regions, failing to distinguish individual instances.
- Two-Stage Framework for Edge Extraction and Refinement: TRACE proposes a novel two-stage framework:
- Stage 1 (Discovery): Extracts initial, instance-aware boundaries directly from the diffusion model's hidden self-attention using the IEP and a spatial difference metric, without requiring any manual annotations or hyper-parameters.
- Stage 2 (Distillation & Enhancement): Recursively distills and propagates these initial, potentially fragmented edges into a lightweight edge decoder. This fine-tuning process, using Stage 1 edges as pseudo-labels, significantly enhances edge connectivity and enables real-time inference, bypassing the computationally intensive Stage 1 for deployment.
- Universal Plugin for Segmentation Refinement: TRACE's extracted edges act as a "solid barrier" in a process called Boundary-Guided Propagation (BGP). This allows TRACE to serve as a universal plugin that refines initial semantic or fragmented instance masks generated by baseline segmentation models (e.g., those from DINO, FreeSOLO, Grounding DINO, or even SAM). It prevents masks from merging across instance boundaries and helps recover whole, clean individual instances, effectively upgrading tag-supervised models to full instance-level segmentation.
- Superior Performance with Minimal Supervision: TRACE, utilizing only tag supervision, demonstrably outperforms not only open-vocabulary segmentation models like FreeSOLO and Grounding DINO but also closed-set instance point-box-supervised models like Point2Mask and EPLD. Even tiny diffusion models, when integrated with TRACE's IEP, show superior instance separation capabilities compared to much larger non-diffusion backbones (e.g., ViT models), highlighting the essential role of the generative denoising process.
- Focus on Instance Geometry: Unlike traditional edge detection methods that rely on low-level color or texture changes, TRACE focuses entirely on instance geometry, ignoring internal color details. This allows it to double performance and preserve perfect topological connectivity on instance edge ground truth, even when internal textures would ruin traditional outputs.
Technical Deep Dive
▶ Watch: Boundary-Guided Propagation (BGP) for clean instance segmentation (4:08)
The TRACE framework is meticulously designed in two stages to first uncover and then refine the latent instance boundaries within pre-trained text-to-image diffusion models. The underlying principle is to leverage the intrinsic instance-aware signals present in the models' self-attention mechanisms.
Stage 1: Hidden Boundary Extraction
The first stage focuses on extracting initial, class-agnostic instance edge maps without any manual annotations. This involves a clever inversion process and the application of two key metrics.
- Diffusion Model Inversion and Self-Attention Access: The process begins by taking an image input and performing diffusion model inversion. This technique allows access to the internal feature maps and attention scores of the pre-trained diffusion model during its denoising process. Unlike using text prompts, the inversion process here is crucial for directly analyzing the image's structure through the model's latent space. The critical insight is that while cross-attention focuses on broad semantic areas (e.g., "all pixels belonging to a cat"), self-attention secretly reveals more granular, instance-specific structures.
- Identifying the Instance Emergence Peak (IEP): The core of Stage 1 is identifying the Instance Emergence Peak (IEP). This is a specific timestep during the denoising process where instance structures clearly emerge.
- Mechanism: The IEP is located by finding the timestep with the highest KL divergence gap. This metric quantifies the difference in distribution between successive states of the diffusion model's internal representations. A high KL divergence gap indicates a significant shift in the model's focus.
- Significance: This peak represents the "turning point" where the diffusion model transitions from generating or understanding broad semantic blobs (e.g., a generic "cat-like" region) to forming distinct, clear instance structures (e.g., individual cats with defined boundaries). Stopping the analysis at this precise moment is crucial because before this peak, the model's representations are too semantic, and after it, they might become too fine-grained or noisy, losing the instance-level coherence. The speaker explicitly mentions that without the IEP, the diffusion prior cannot discover instance structure as the model tends towards semantic regions.
- Spatial Difference Metric: In conjunction with the IEP, a spatial difference metric is applied to the instance-aware self-attention maps.
- Mechanism: This metric simply scores the spatial difference between a pixel and its neighbors. In the experiments, using four neighbors (up, down, left, right) was found to marginally improve performance compared to eight neighbors, indicating a balance between capturing detail and computational efficiency.
- Output: By combining the IEP-identified timestep and the spatial difference metric, the self-attention maps are converted into initial instance edge maps. These maps serve as pseudo-labels for the subsequent stage.
Stage 2: Recursive Distillation and Edge Refinement
The initial edges from Stage 1 can be fragmented and sometimes unstable. Stage 2 addresses these limitations by distilling the entire process into a more efficient and robust system, enhancing edge connectivity and enabling real-time inference.
- Distillation for Efficiency and Quality: This stage fine-tunes the pre-trained diffusion model alongside a lightweight edge decoder. The initial edges generated in Stage 1 serve as pseudo-labels for this fine-tuning process.
- Loss Functions: The optimization involves two primary loss components:
- Reconstruction Loss: Ensures that the fine-tuned diffusion model preserves the pixel structure and overall image content during its denoising process.
- Edge Loss: Guides the lightweight edge decoder to predict fully connected and accurate instance boundaries based on the Stage 1 pseudo-labels.
- Learning Objective: Through this joint optimization, the model learns to connect fragmented instance boundaries and effectively ignore uncertain noise, leading to more coherent and topologically sound edge predictions.
- Single-Pass Inference: A key benefit of Stage 2's distillation is efficiency. The fine-tuned model and edge decoder can predict fully connected boundaries in a single pass during inference. This bypasses the computationally intensive Stage 1 metrics like IEP calculation and the attention-to-boundary map generation, which involve the full inversion process. This makes TRACE viable for real-time applications.
Boundary-Guided Propagation (BGP)
Once the refined TRACE edges are obtained, they are not merely abstract outputs but are actively used to enhance existing segmentation models through a mechanism called Boundary-Guided Propagation (BGP).
- Role as a Barrier: If a baseline segmentation model (e.g., an open-vocabulary model like Grounding DINO or a semantic segmentation model) generates initial semantic or fragmented instance masks, the TRACE edges act as "solid barriers." This prevents the initial instance masks from merging into neighboring instances, effectively enforcing instance separation.
- Merging Overlapping Instances: In cases where instances genuinely overlap and have a high IoU (Intersection over Union) score, TRACE incorporates a merging mechanism to consolidate them into a single, cohesive instance. This ensures that a single object is not erroneously split by the edges.
- Recovery of Clean Instances: The BGP process, by leveraging TRACE's precise instance edges, recovers whole and clean individual instances. This essentially upgrades tag-supervised segmentation models into full instance-level segmentation models and can also integrate with and improve refinement-based models like SAM (Segment Anything Model), providing better performance with TRACE-refined outputs. The speaker emphasizes that TRACE offers the best balance between labeling cost and segmentation performance.
In essence, TRACE leverages the generative power of diffusion models to extract a fundamental understanding of object geometry. By carefully identifying the "sweet spot" of instance emergence and distilling this knowledge into an efficient decoder, it provides a powerful, low-supervision solution for a critical task in computer vision.
Experimental Setup & Results
▶ Watch: Visual evidence: Diffusion models separate instances with IEP (5:28)
The evaluation of TRACE involved a rigorous experimental setup designed to validate its ability to extract high-quality instance edges and its practical utility in refining segmentation masks.
Datasets and Benchmarking
A critical aspect of evaluating instance edge quality was the need for a suitable benchmark. Standard edge datasets often focus on low-level image features like texture, lighting, and color differences, which are not ideal for assessing instance-level geometric boundaries. To address this, the TRACE team redefined the COCO-Part annotations to specifically extract instance boundaries. This created a fair and relevant benchmark focused purely on instance geometry, rather than incidental color or texture changes.
Baselines and Comparisons
TRACE was benchmarked against a diverse set of models to demonstrate its superiority:
- Traditional Edge Detection Methods: These methods typically rely on low-level color changes (e.g., differences in RGB pixel space). The experiments showed that their outputs are easily "ruined by internal textures," as they cannot distinguish between an object's internal texture and its actual boundary.
- Non-Diffusion Models (Vision Transformers): Larger Vision Transformer (ViT) models, even those pre-trained on extensive datasets, were observed to "collapse into semantic blobs" in PCA visualizations. This indicates their difficulty in separating distinct instances, often grouping them by semantic class rather than individual identity.
- Open-Vocabulary Segmentation Models: TRACE was compared against leading open-vocabulary segmentation models such as FreeSOLO and Grounding DINO. These models typically rely on either tag supervision or bounding box supervision for training.
- Closed-Set Instance Point/Box-Supervised Segmentation Models: The evaluation also included comparisons with models like Point2Mask and EPLD, which are trained with more explicit instance-level supervision (point or bounding box annotations).
Headline Results
The experimental results overwhelmingly supported TRACE's efficacy:
- Superior Instance Edge Quality: TRACE demonstrated a significant leap in instance edge detection. It was shown to double the performance of traditional methods and "preserve perfect topological connectivity" based on the refined instance edge ground truth. This is attributed to TRACE's focus on instance geometry rather than internal color details.
- Outperforming Supervised Models with Minimal Supervision: With only tag supervision (a much lighter form of annotation than point, box, or pixel-level), TRACE consistently outperformed:
- Open-vocabulary segmentation models like FreeSOLO and Grounding DINO.
- Closed-set instance point-box-supervised segmentation models like Point2Mask and EPLD. This is a remarkable achievement, highlighting the efficiency of leveraging pre-trained diffusion priors.
- Generative Denoising is Key: The results confirmed that the generative denoising process inherent in diffusion models is "essential for capturing the instance boundaries." Even a tiny diffusion model, when integrated with TRACE's IEP, was shown to outperform the largest non-diffusion backbones (e.g., large ViT models) in separating distinct instances.
- IEP's Critical Role: PCA visualizations vividly illustrated the importance of the IEP. Without identifying this "sweet spot," the diffusion prior struggled to discover instance structure, tending towards semantic regions. This visual evidence was further confirmed by quantitative results.
- Integration with SAM: When integrated with models like SAM, TRACE-refined masks consistently yielded better performance, showcasing its utility as a universal refinement plugin.
Limitations
Despite its impressive performance, the talk acknowledged certain limitations:
- Tiny Objects: TRACE can struggle with tiny objects in certain datasets. This is primarily attributed to the VAE compression step that often precedes denoising latents in diffusion models, where fine details of very small objects might be lost.
- Out-of-Distribution Data: The nature of image diffusion pre-training (typically on large, general natural image datasets) can lead to misalignment with out-of-distribution types, such as medical datasets. Adapting TRACE for these specialized domains or for handling tiny objects, as well as exploring other video-strategy diffusion baselines, was suggested as a promising direction for future work.
In summary, TRACE's experimental validation underscores its breakthrough in instance edge detection, demonstrating how the hidden priors within diffusion models can be effectively harnessed to achieve superior performance with significantly reduced supervision costs.
Practical Implications
▶ Watch: Q&A: TRACE's robustness compared to supervised models (8:20)
The TRACE framework carries profound practical implications for various stakeholders in the AI/ML ecosystem, from model builders to infrastructure teams and deployers. Its core value proposition lies in significantly reducing the annotation burden while enhancing the capabilities of existing segmentation systems.
- Reduced Labeling Costs for Model Builders: For model builders and researchers, TRACE offers a powerful alternative to expensive and time-consuming instance-level annotation. By enabling high-quality instance edge detection with only tag supervision, it drastically lowers the barrier to entry for developing and deploying instance segmentation models. This is particularly beneficial for niche domains or rapidly evolving applications where extensive pixel-level labeling is impractical or impossible. The work directly challenges the assumption that "stronger performance requires strong human supervision," advocating for a future where "perception system can scale with generative capabilities rather than the extensive labeling effort."
- Universal Plugin for Infrastructure and Deployment Teams: TRACE functions as a universal plugin that can be seamlessly integrated with existing segmentation pipelines. Infrastructure and deployment teams can leverage TRACE edges to refine the outputs of various baseline segmentation models, including those performing semantic segmentation or open-vocabulary instance segmentation (e.g., DINO, Grounding DINO, FreeSOLO). This means that a company's existing investment in supervised or weakly supervised segmentation models can be immediately upgraded to provide more accurate, instance-aware outputs without retraining the entire system from scratch. Its ability to integrate with models like SAM (Segment Anything Model) further enhances its utility, providing a "TRACE-refined facade" for improved performance.
- Enhanced Robustness and Accuracy: By focusing on instance geometry and ignoring low-level color/texture noise, TRACE provides more robust and topologically connected instance boundaries. This translates to more reliable segmentation masks, which are crucial for downstream tasks such as object tracking, robotic manipulation, medical image analysis, and autonomous driving, where precise object delineation is paramount. The "solid barrier" effect of TRACE edges prevents instances from merging, a common failure mode in many segmentation systems.
- Leveraging Existing Pre-trained Models: The framework demonstrates an ingenious way to extract latent knowledge from already pre-trained text-to-image diffusion models. This means organizations can capitalize on the massive computational investment already made in training these large generative models, repurposing them for perception tasks without additional large-scale, task-specific training. This reusability enhances ROI on foundational model development.
- Tradeoffs and Considerations:
- Computational Overhead (Stage 1): While Stage 2 enables real-time inference, Stage 1 (hidden boundary extraction) involves diffusion model inversion and metric calculation, which can be computationally intensive. For pre-computation of pseudo-labels, this is acceptable, but it's a factor to consider in the overall training/distillation pipeline.
- Limitations with Tiny/OOD Objects: As acknowledged, TRACE may struggle with extremely tiny objects due to VAE compression effects or with out-of-distribution datasets (e.g., medical imagery) where the natural image priors of the diffusion model might not align. Practitioners deploying TRACE in such specialized domains would need to consider domain adaptation or fine-tuning strategies.
- Hardware Requirements: While Stage 2 is efficient, the initial fine-tuning of a diffusion model (even with a lightweight decoder) still implies access to GPU/TPU resources.
In summary, TRACE represents a significant step towards more autonomous and less human-dependent AI systems, offering a practical, powerful, and cost-effective method for achieving high-quality instance segmentation by tapping into the hidden capabilities of generative models.
Key Takeaways
- Diffusion Models as Instance Edge Detectors: Pre-trained text-to-image diffusion models secretly encode accurate, class-agnostic instance boundaries within their self-attention mechanisms, particularly at early denoising timesteps.
- Instance Emergence Peak (IEP): A crucial discovery is the IEP, a specific timestep identified by the KL divergence gap, where the diffusion model transitions from semantic blobs to clear instance structures. This "sweet spot" is key to extracting instance-aware information.
- Two-Stage Framework: TRACE employs a two-stage process: first, extracting initial edges using IEP and spatial difference metrics, and second, recursively distilling these edges into a lightweight decoder for enhanced connectivity and real-time inference.
- Boundary-Guided Propagation (BGP): TRACE edges act as "solid barriers" to refine existing segmentation masks, preventing instances from merging and recovering clean individual objects, effectively upgrading tag-supervised models to full instance-level segmentation.
- Reduced Supervision, Superior Performance: TRACE achieves state-of-the-art instance edge detection and outperforms many open-vocabulary and point/box-supervised segmentation models with only tag supervision, showcasing the power of generative priors over extensive human labeling.
- Universal Plugin Potential: The framework serves as a universal plugin, capable of integrating with and improving various baseline segmentation models, including SAM, making it highly valuable for practical deployment and scaling perception systems.
About the Speaker(s)
Sanghyun Jo is a Principal AI Researcher at LG AI Research. His work, as demonstrated by the TRACE project, focuses on pushing the boundaries of what's possible with AI/ML, particularly in leveraging the inherent capabilities of large generative models to solve complex computer vision problems with reduced human supervision. His research contributes to advancing foundational AI models and their practical applications in perception systems. The talk also credits Ziseok Lee, Wooyeol Lee, Jonghyun Choi, Jaesik Park, and Kyungsu Kim as co-authors on the TRACE paper.
Reviews
→ Top-rated talks at International Conference on Learning Representations 2026
All talks from International Conference on Learning Representations 2026