Cross-Sample Relational Fusion: Unifying Domain Generalization and Class-Incremental Learning

Zhen-Hao Xie, Yan Wang, Hao Sun, Han-Jia Ye, De-Chuan Zhan, Da-Wei ZhouarXiv 2026

TL;DR

The paper introduces CrOss-sample Relational Fusion (CORF), a unified framework designed for Cross-Domain Class-Incremental Learning (CDCIL). CORF simultaneously tackles catastrophic forgetting and domain shift by using a dual-sensitive sample refinement mechanism to learn domain-agnostic features and a hierarchical kernel-based distillation strategy to preserve structural knowledge across tasks.

What Problem Does This Paper Address?

In real-world deployment, machine learning models face two major challenges: learning new categories over time (Class-Incremental Learning, or CIL) and adapting to new environments (Domain Generalization, or DG). For instance, an autonomous driving system trained to recognize vehicles on sunny urban roads must incrementally learn to identify novel transport modes while generalizing to rainy highways or rural environments.

Standard CIL methods prevent the model from forgetting old classes but fail under domain shifts. Conversely, DG methods handle domain shifts but assume a static, fully known set of classes. This paper addresses the intersection of both fields—Cross-Domain Class-Incremental Learning (CDCIL)—where a model must sequentially learn new classes from diverse seen domains and successfully generalize to entirely unseen domains during inference.

Fig. 1: Illustration of CDCIL. During training, novel classes are introduced incrementally, with samples drawn from mul- tiple seen domains. During inference, the model is evaluated on all previously seen classes across both seen and unseen domains. For example, in task 2, although only horse and ele- phant are observed during training (from seen domains shown in blue, yellow, and green), inference covers all encountered classes (e.g., snake, eagle, horse, and elephant) across both seen and unseen domains (shown in grey).

Methods

CORF consists of two main components that work at the data and structural levels:

  1. Dual-Sensitive Refinement (DSR): This data-augmentation strategy selectively blends training samples based on model confidence and spatial importance (derived via Grad-CAM):
  2. High-Confidence Blending: Samples with high predictive certainty are paired with same-class images from different domains. Their low-contribution regions (background noise) are blended, forcing the model to focus on domain-invariant core semantics.
  3. Low-Confidence Blending: Ambiguous or distorted samples are fused with different-class instances from the same domain within high-contribution regions to encourage feature disentanglement. These are assigned to temporary auxiliary classes to prevent decision-boundary corruption.
  4. Hierarchical Kernel-Based Distillation (HKD): To prevent catastrophic forgetting without relying on rigid logit matching (which fails when domains shift), HKD treats knowledge distillation as a geometry-aware relational alignment task. It extracts feature maps across multiple network depths and constructs sample-to-sample similarity matrices. It uses a hybrid kernel combining a Cosine kernel (for global angular alignment) and a Student-t kernel (for local neighborhood robustness) to enforce topological consistency between the old and current models.
Fig. 2: Overview of CORF. Left: Dual-Sensitive Refinement. Given a task-specific dataset Sn, we first select Xhigh and Xlow based on confidence scores, and generate corresponding spatial contribution maps. These maps guide the synthesis of an auxiliary dataset An through confidence- and contribution-sensitive blending. Right: Hierarchical Kernel-Based Distillation. Given the combined dataset Sn ∪An, feature maps are extracted from both the old and current networks at multiple layers. These maps are then used to construct kernel maps that capture inter-sample structural relations. The HKD between the old and current kernel matrices is computed at each layer and aggregated to form the final distillation loss.

Datasets

The authors evaluated CORF on three widely recognized domain generalization benchmarks using a class-split incremental protocol:

  • OfficeHome: 65 classes split into 5-task and 13-task configurations across 4 domains (Art, Clipart, Product, Real).
  • DomainNet: 345 classes divided into 5 tasks across multiple highly distinct domains.
  • PACS: 7 classes starting with 3 base classes and adding 2 classes per incremental task across 4 domains (Photo, Art, Cartoon, Sketch).

Evaluation follows a domain-rotation protocol where one domain is completely hidden during training to serve as the Unseen Domain (UD), while the others act as Seen Domains (SD).

Fig. 3: Evaluation protocol for CDCIL on OfficeHome. Each domain is treated once as the unseen domain (UD), while the others serve as seen domains (SD). Final-stage SD, UD, and HM are computed and averaged over all domain rotations.

Key Insights and Ideas

  • Confidence-Guided Blending Matters: Instead of uniform mixing (like CutMix), isolating high-confidence and low-confidence samples allows the model to treat stable semantic anchors differently from noisy, domain-distorted images.
  • Relational Over Individual Distillation: Under domain shift, individual sample activations drift significantly. Distilling the geometric relationships (topology) between samples across multiple layers provides a much more stable supervisory signal for retaining old knowledge.
  • The Hybrid Kernel Advantage: Combining Cosine and Student-t kernels allows the model to simultaneously preserve global semantic directions and local neighborhood structures, making it robust against abrupt representation shifts.

Key Results

CORF was integrated into several classic and state-of-the-art CIL baselines (e.g., Replay, iCaRL, DER, FOSTER) and consistently boosted performance:

  • Substantial Gains on Baselines: On the DomainNet dataset (5 tasks), CORF improved the final accuracy of the MEMO baseline by 10.95% and the DER baseline by 8.26%.
  • Balanced Performance: CORF significantly raised the Harmonic Mean (HM) between seen and unseen domains, proving that it doesn't just memorize training domains at the expense of generalization.
  • Transformer Compatibility: The authors demonstrated that CORF can be plugged into prompt-based Vision Transformer (ViT) frameworks like L2P and DualPrompt, maintaining stable performance without causing prompt-space collapse.

Limitations and Future Work

  • Backbone Dependency: CORF is primarily optimized for convolutional backbones where the entire feature extractor is trainable. Its performance gains are less pronounced on ViT frameworks that freeze the backbone and only tune lightweight prompts, as the representation space cannot be dynamically reshaped.
  • Computational Overhead: Generating Grad-CAM masks and computing hierarchical kernel matrices increases training time by approximately 1.2× compared to standard baselines.

Future work will focus on extending CORF to more diverse incremental learning scenarios and handling more complex, real-world domain shifts.

Summary updated

Abstract

Class-Incremental Learning (CIL) requires a learning system to learn new classes while retaining previously learned knowledge. However, in real-world scenarios such as autonomous driving, a system trained on urban roads in sunny weather may later need to operate in rural or highway environments with different traffic patterns and weather conditions. This requires the model not only to overcome catastrophic forgetting, but also to effectively handle domain shifts. In this paper, we propose CrOss-sample Relational Fusion (CORF), a unified framework to address domain shift and catastrophic forgetting simultaneously. To enhance generalizability, we perform selective refinement of training samples by leveraging spatial contribution maps to highlight semantically informative regions. Furthermore, we incorporate predictive confidence to adaptively weigh samples, thereby facilitating the learning of domain-agnostic representations. To alleviate forgetting, we propose a cascaded distillation framework that captures cross-sample relational dependencies across multiple feature hierarchies, enabling multi-grained knowledge transfer from previous tasks. CORF can be seamlessly integrated into existing CIL algorithms to enhance their generalizability, achieving competitive performance across various benchmark datasets. Code is available at https://github.com/LAMDA-CL/TMM26-CORF .
BibTeX
@misc{xie2026cross,
  author = {Zhen-Hao Xie and Yan Wang and Hao Sun and Han-Jia Ye and De-Chuan Zhan and Da-Wei Zhou},
  title = {{Cross-Sample Relational Fusion: Unifying Domain Generalization and Class-Incremental Learning}},
  year = {2026},
  eprint = {2605.08839},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.08839},
}

Loading related content...

Figure