Fine-Grained Domain Generalization with Feature Structuralization

Wenlong Yu, Dongyue Chen, Qilong Wang, Qinghua Hu

This paper introduces Feature Structuralized Domain Generalization (FSDG), a novel framework designed to tackle the unique challenges of fine-grained domain generalization. By mimicking human cognitive processes, the authors propose disentangling neural network features into distinct segments—commonality, specificity, and confounding—and aligning them using multi-granularity hierarchical knowledge to improve model robustness against domain shifts.

TL;DR

FSDG improves fine-grained domain generalization by explicitly partitioning feature channels into "common," "specific," and "confounding" segments. By leveraging hierarchical category labels (e.g., Order $\rightarrow$ Family $\rightarrow$ Species), the model learns invariant representations that outperform state-of-the-art methods by an average of 6.2%.

What Problem Does This Paper Address?

Traditional Domain Generalization (DG) aims to train models on source domains (e.g., photos) so they perform well on unseen target domains (e.g., sketches). Fine-Grained Domain Generalization (FGDG) is significantly harder because the differences between classes are tiny (e.g., two similar bird species), while the differences within a class across domains are huge.

Current models often struggle because they "entangle" important object features with "spurious" domain-specific features (like background or artistic style). When the domain changes, these fragile features break down. The authors argue that humans solve this by understanding objects through a hierarchy of knowledge—recognizing what is "common" to all mammals versus what is "specific" to a zebra.

Fig. 1: Instance of multi-granularity knowledge. Four animals are categorized into various classes across three granularity levels according to their commonalities and specificities, as described in the green region. The numbers represent species labels: labels 4, 5, 6, and 7 correspond to the f0 granularity level; 2 and 3 to the c1 level; and 1 to the coarsest c2 level. For commonalities, the number outside parentheses indicates the parent category, while the two inside are its sub-categories.

Methods

The core of the paper is Feature Structuralization (FS). Instead of treating the feature vector as a "black box," FSDG divides the feature channels into three functional segments:

  1. Commonality Segment: Captures features shared across related categories (e.g., "has wings").
  2. Specificity Segment: Captures unique discriminative features for a specific class (e.g., "blue feathers on the crown").
  3. Confounding Segment: Absorbs noise, background, and domain-specific style, preventing them from polluting the other two segments.

The Pipeline

As illustrated in the architecture diagram, the model uses a multi-branch approach during training:

  • Disentanglement & Decorrelation: Features are split by channel indices. A decorrelation loss ($L_{dec}$) ensures these three segments are as mathematically orthogonal as possible.
  • Semantic Alignment: Using a multi-granularity hierarchy, the model applies constraints to "pull" common features together across different levels of the tree and "push" specific features apart to ensure distinctiveness.
  • Prediction Calibration: A loss term ($L_{lf}$) aligns the predictions of the fine-grained branch with the broader coarse-grained branches, ensuring the model's "logic" remains consistent across the hierarchy.
Fig. 2: Illustration of the model exemplified in a three-granularity hierarchy (i.e., G = 3). The FS module is highlighted in the middle box with solid arrows depicting the operation dimensions. ⊕represents the disentanglement operator. Given five input images, FSDG outputs multi-granular results, as indicated in the right section. The box showing Llf illustrates the alignment operation for coarse-fine predicted distributions and shows ε during the training process. Conf. is an abbreviation of confounding and Granu. Trans. means the Granularity Transition Layer. The coarse branches and the FS optimization module are excluded during model inference.

Datasets

The authors evaluated FSDG on three challenging FGDG benchmarks:

  • CUB-Paintings: Real-world bird photos (CUB-200-2011) vs. artistic depictions (watercolors, oil paintings, etc.).
  • CompCars: Car images from web sources vs. surveillance cameras (different angles, lighting, and weather).
  • Birds-31: A union of three bird datasets (CUB, NABirds, and iNaturalist) categorized into a four-level hierarchy (Order, Family, Genus, Species).

Key Insights and Ideas

  • Cognition-Inspired AI: The model succeeds by explicitly structuring the feature space to match human-like hierarchical reasoning.
  • The Power of the "Confounding" Buffer: By giving the model a dedicated space for "junk" or domain-specific features, the invariant features (common/specific) become much more robust.
  • Architecture Agnostic: The FS module is not tied to a specific backbone; the authors demonstrated success using ResNets, Vision Transformers (ViT), and MLPs.
  • Explainability: Using Concept Relevance Propagation (CRP), the authors proved that FSDG actually forces specific semantic concepts (like "beak shape") into the intended channel segments.

Key Results

FSDG consistently outperformed state-of-the-art DG methods (like MIRO, SAGM, and Swad) across all benchmarks.

  • CUB-Paintings: Achieved an average accuracy of 55.65%, a significant jump over the baseline ERM (45.31%) and the previous best DG method MIRO (48.79%).
  • CompCars: Outperformed competitors with a 31.54% average accuracy, showing particular strength in the difficult S $\rightarrow$ W (Surveillance to Web) shift.
  • Birds-31: Reached 82.37% average accuracy, surpassing the second-best method by over 9%.
TABLE I: Classification accuracy (%) on the Cub-Paintings (RN-50) with best results of DG methods highlighted in bold.
TABLE II: Classification accuracy (%) on the CompCars (RN- 50) with best results of DG methods highlighted in bold.

Limitations and Future Work

  • Hierarchy Dependency: FSDG requires a pre-defined multi-granularity hierarchy (like biological taxonomy). For datasets without clear hierarchies, the method might require an automated "hierarchy discovery" step.
  • Channel Allocation: The ratio of channels assigned to common, specific, and confounding segments is currently a hyperparameter. Future work could involve dynamic or learnable channel partitioning.
  • Optimal Transport: The authors suggest that incorporating optimal transport-based objectives could further refine the distance-based alignment of feature centroids.

Summary updated

BibTeX
@article{yu2024fine,
  author = {Wenlong Yu and Dongyue Chen and Qilong Wang and Qinghua Hu},
  title = {{Fine-Grained Domain Generalization with Feature Structuralization}},
  journal = {IEEE Trans. Multimedia},
  year = {2024},
}
Figure