Style Evolving along Chain-of-Thought for Unknown-Domain Object Detection

Zihao Zhang, Aming Wu, Yahong Han

TL;DR

This paper introduces Style Evolving along Chain-of-Thought, a novel approach for Single-Domain Generalized Object Detection (Single-DGOD). Instead of using a single, static text prompt to simulate target domains, the method progressively builds complex environmental styles (like "rainy night") through a multi-tiered chain of thought, significantly improving an object detector's ability to generalize to unseen, adverse real-world environments.

What Problem Does This Paper Address?

Imagine training an autonomous driving object detector exclusively on data collected during clear, sunny days. When deployed, this model must reliably detect pedestrians and vehicles during a foggy afternoon or a torrential downpour at night. This challenge is known as Single-Domain Generalized Object Detection (Single-DGOD): training a model on a single source domain so it can generalize to multiple completely unknown target domains without ever seeing target-domain data during training.

Recent state-of-the-art methods leverage vision-language models (like CLIP) to bridge this gap by using a single text prompt (e.g., "driving on a rainy night") to simulate target domain styles. However, the authors observe that these "one-step prompt" methods struggle with complex, multi-attribute scenes. Real-world domain shifts are rarely simple; they combine multiple environmental factors. A single prompt often yields overly simplistic style simulations that fail to capture the nuanced data distributions of complex real-world scenarios.

Methods

To better simulate complex target domains, the authors propose a three-pronged framework:

  1. Chain of Thought-Guided Style Evolution (CGSE): Instead of generating a complex style all at once, this module progressively refines text prompts across three tiers:
  2. Tier 1 (Basic Keywords): e.g., "Night, Rainy"
  3. Tier 2 (Phrases): e.g., "Driving down the road on a rainy night"
  4. Tier 3 (Detailed Sentences): e.g., "Driving on a rainy night, heavy rain poured down, with some pedestrians and vehicles on the road."

Features are extracted at each step using CLIP and accumulated. These evolving text features are used to train learnable style transfer parameters ($\mu_t$ and $\sigma_t$) via an AdaIN-based consistency loss, allowing the model to smoothly transition from simple to highly complex style distributions.

  1. Style Disentangled Module (SDM): Altering styles at the shallow layers of a network risks destroying object identities and semantic information. The SDM decouples the network's first-layer features into distinct style ($F_s$) and content ($F_c$) streams using contrastive and consistency losses, ensuring style evolution only impacts the style features.
  2. Class-Specific Prototype Clustering Module (CPCM): To ensure the content stream retains robust, domain-invariant semantic structures, this module clusters high-level features to create class prototypes. These prototypes act as a supervisory anchor, preserving object identity during style transfer.
Figure 2. The overall architecture of the model. Leveraging contrastive loss and two consistency losses, we disentangle the first- layer features into content and style features. For style features, the CGSE module is employed to obtain style transfer parameters for style migration. Regarding content features, semantic enhancement is performed through class-specific prototypes. Ultimately, these two features are fused and input into the backbone network to generate features from layers 2 to 4. The output is then fed into the Region Proposal Network (RPN) for subsequent target localization and classification tasks.

Datasets

The framework was evaluated on two distinct domain generalization benchmarks:

  • Diverse Driving Weather Scenarios: Trained exclusively on daytime sunny images (19,395 images). Evaluated on four unseen target domains: clear night (26,158 images), rainy dusk (3,501 images), rainy night (2,494 images), and foggy daytime (3,775 images).
  • Generalization from Reality to Art: Trained on real-world images from the Pascal VOC2007 and VOC2012 trainval sets. Evaluated on three distinct artistic target domains: Clipart1k, Watercolor2k, and Comic2k.

Key Insights and Ideas

  • Progressive Style Layering: Just as large language models reason better step-by-step, vision-language models guide style simulation more effectively when text prompts scale progressively from coarse to fine. This gradual evolution helps the model learn subtle, intermediate style variations.
  • The Complexity Bottleneck: More text isn't always better. The authors discovered a strict performance ceiling at a 3-tiered hierarchy. Pushing the chain of thought to Level 4 or 5 (adding excessive details or rigid sentence templates) actually degraded object detection performance, likely due to the encoding limitations of current vision-language text encoders.

Key Results

Using a standard Faster R-CNN baseline, the proposed method achieved state-of-the-art performance across both benchmarks:

  • Adverse Weather: Under the most challenging "Night Rainy" condition using a ResNet101 backbone, the method achieved 24.5% mAP, outperforming the popular one-step prompt method C-Gap (18.7% mAP) and the previous SOTA method UFR (19.2% mAP).
  • Reality to Art: On the substantial domain shift from Pascal VOC to artistic styles, the model achieved significant performance leaps over C-Gap, improving mAP by 18% on Comic, 13% on Watercolor, and 9% on Clipart.

Feature heatmap visualizations demonstrate that as the chain-of-thought level increases, the model successfully filters out background environmental noise and focuses much more accurately on foreground objects.

Limitations and Future Work

The primary limitation highlighted in the paper is the performance drop when extending the chain-of-thought hierarchy beyond three levels. The authors attribute this to the representation capacity of the frozen CLIP text encoder, which struggles to digest overly verbose or complex sentence structures without introducing noise.

Future research directions could explore integrating more advanced, large-scale language models or developing adaptive prompting strategies that dynamically adjust the chain-of-thought depth based on the complexity of the source image.

Summary updated

Abstract

Recently, a task of Single-Domain Generalized Object Detection (Single-DGOD) is proposed, aiming to generalize a detector to multiple unknown domains never seen before during training. Due to the unavailability of target-domain data, some methods leverage the multimodal capabilities of vision-language models, using textual prompts to estimate cross-domain information, enhancing the model's generalization capability. These methods typically use a single textual prompt, often referred to as the one-step prompt method. However, when dealing with complex styles such as the combination of rain and night, we observe that the performance of the one-step prompt method tends to be relatively weak. The reason may be that many scenes incorporate not just a single style but a combination of multiple styles. The one-step prompt method may not effectively synthesize combined information involving various styles. To address this limitation, we propose a new method, i.e., Style Evolving along Chain-of-Thought, which aims to progressively integrate and expand style information along the chain of thought, enabling the continual evolution of styles. Specifically, by progressively refining style descriptions and guiding the diverse evolution of styles, this approach enables more accurate simulation of various style characteristics and helps the model gradually learn and adapt to subtle differences between styles. Additionally, it exposes the model to a broader range of style features with different data distributions, thereby enhancing its generalization capability in unseen domains. The significant performance gains over five adverse-weather scenarios and the Real to Art benchmark demonstrate the superiorities of our method.
BibTeX
@inproceedings{zhang2025style,
  author = {Zihao Zhang and Aming Wu and Yahong Han},
  title = {{Style Evolving along Chain-of-Thought for Unknown-Domain Object Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01327},
}
Figure