---
title: CrOss-sample Relational Fusion (CORF)
url: https://www.emergentmind.com/topics/cross-sample-relational-fusion-corf
type: topic
---

# CrOss-sample Relational Fusion (CORF)

CrOss-sample Relational Fusion (CORF) is a unified framework for **Cross-Domain Class-Incremental Learning (CDCIL)**, a setting in which a model must both learn new classes over time and generalize across domains, including an unseen domain at inference time. CORF is designed to address the two failure modes that CDCIL brings into direct interaction: **catastrophic forgetting**, which is central in Class-Incremental Learning (CIL), and **domain shift**, which is central in Domain Generalization (DG). The framework combines **Dual-Sensitive Refinement (DSR)**, which performs selective sample refinement using predictive confidence and spatial contribution maps, with **Hierarchical Kernel-Based Distillation (HKD)**, which preserves cross-sample relational structure across multiple feature hierarchies. The method is presented as a plug-and-play augmentation for existing CIL algorithms and is reported to achieve competitive performance across OfficeHome, DomainNet, and PACS [2605.08839].

## 1. CDCIL formulation and learning objective

The paper introduces **CDCIL** as the setting in which a model must simultaneously learn new classes incrementally over a task sequence
\[
\{\mathcal{S}_1,\mathcal{S}_2,\dots,\mathcal{S}_N\},
\]
where each task \(n\) contains domain-partitioned data
\[
\mathcal{S}_n=\{\mathcal{D}_n^1,\mathcal{D}_n^2,\dots,\mathcal{D}_n^K\},\quad
\mathcal{D}_n^k=\{(\mathbf{x}_i,y_i)\}_{i=1}^{n_k}.
\]
The task label spaces are disjoint,
\[
Y_n \cap Y_{n'}=\varnothing\quad (n\neq n'),
\]
and evaluation after task \(n\) is performed on
\[
\mathcal{T}_n=\{\mathcal{T}_n^1,\dots,\mathcal{T}_n^K,\mathcal{T}_n^{K+1}\},
\]
where \(\mathcal{T}_n^{1:K}\) are seen domains and \(\mathcal{T}_n^{K+1}\) is an unseen domain [2605.08839].

This formulation explicitly unifies two literatures that are usually treated separately. The paper states that **CIL methods mainly address catastrophic forgetting but not domain shift**, whereas **DG methods mainly address domain shift but assume a fixed label set, so they do not handle incremental classes**. CORF is introduced precisely to unify **generalization and continual adaptation** under CDCIL.

The model is written as
\[
h_\Psi(\mathbf{x}) = g_\varphi(f_\theta(\mathbf{x})),
\]
with feature extractor \(f_\theta\) and classifier \(g_\varphi\). A generic baseline objective is
\[
\min_{\Psi}\sum_{(\mathbf{x},y)\in\mathcal{S}_n}\mathcal{L}_{cls}(h_\Psi(\mathbf{x}),y)+\mathcal{L}_{reg}.
\]
CORF extends this baseline with data-level refinement and structural distillation, yielding
\[
\min \sum_{(\mathbf{x},y)\in\mathcal{S}_n\cup\mathcal{A}_n} \mathcal{L}_{cls}(h_\Psi(\mathbf{x}),y) +\mathcal{L}_{reg} +\beta \cdot \mathcal{L}_{kernel}.
\]

## 2. CORF architecture: DSR and HKD

CORF consists of two synergistic components. The first is **Dual-Sensitive Refinement (DSR)**, which creates an auxiliary training set \(\mathcal{A}_n\) by selectively fusing samples using **predictive confidence** and **spatial contribution maps**. The second is **Hierarchical Kernel-Based Distillation (HKD)**, which mitigates forgetting by aligning **cross-sample relational structures** between the old and current model at **multiple feature hierarchies** [2605.08839].

The division of labor between the two modules is explicit. DSR is the component that addresses **domain generalization** by constructing synthetic samples that suppress domain-specific bias while preserving semantic content. HKD is the forgetting-mitigation mechanism; it is designed to preserve knowledge under domain shift better than standard logit distillation.

A useful way to interpret the framework is that DSR modifies the *training distribution*, while HKD constrains the *representation dynamics* across tasks. This suggests that CORF is not merely an augmentation policy layered onto CIL, nor merely a distillation variant layered onto DG, but a coupled mechanism in which domain-agnostic sample construction and relational retention are optimized jointly.

## 3. Dual-Sensitive Refinement (DSR)

For a mini-batch \(\{\mathbf{x}_i\}_{i=1}^B\), CORF computes predictive confidence as
\[
p_i = \max_j g_j(f(\mathbf{x}_i)),
\]
where \(g_j(\cdot)\) is the normalized class probability for class \(j\). It then selects high-confidence samples
\[
\mathcal{X}_{\mathrm{high}}=\{\mathbf{x}_i \mid p_i \in \mathrm{Top}_k(p_i)\}
\]
and low-confidence samples
\[
\mathcal{X}_{\mathrm{low}}=\{\mathbf{x}_i \mid p_i \in \mathrm{Bottom}_k(p_i)\},
\]
with \(k=\alpha B\). In experiments, \(\alpha=0.3\). The stated intuition is that high-confidence samples are more reliable semantic anchors, whereas low-confidence samples often contain ambiguity or domain shift noise [2605.08839].

CORF uses **Grad-CAM** on the last convolutional block to obtain a **spatial contribution map**. The map highlights spatial regions that most strongly affect the model’s prediction. The paper distinguishes **high-contribution regions**, interpreted as class-discriminative and semantically informative, from **low-contribution regions**, interpreted as background, spurious context, or domain-specific artifacts. The Grad-CAM heatmap is binarized by setting the top \(\alpha\) proportion of values to 1 and the rest to 0. This yields masks such as \(\mathbf{M}_{\mathrm{H,H}}\) and its complement \(\mathbf{M}_{\mathrm{H,L}}=\mathbf{1}-\mathbf{M}_{\mathrm{H,H}}\), with analogous masks for low-confidence samples. The paper emphasizes that Grad-CAM is used **only for region selection**, not as direct supervision.

For each high-confidence sample \(\mathbf{x}_{\mathrm{H}}\), CORF retrieves a **same-class sample from a different domain** \(\tilde{\mathbf{x}}_{\mathrm{H}}\) and synthesizes
\[
\hat{\mathbf{x}} = \mathbf{M}_{\mathrm{H,H}} \odot \mathbf{x}_{\mathrm{H}} + \frac{\mathbf{M}_{\mathrm{H,L}}}{2}\odot \left(\mathbf{x}_{\mathrm{H}}+\tilde{\mathbf{x}}_{\mathrm{H}}\right).
\]
The intended effect is to preserve the **high-contribution** semantic core while replacing or softly blending the **low-contribution** regions with same-class data from another domain. The fused sample retains the original class label.

For each low-confidence sample \(\mathbf{x}_{\mathrm{L}}\), CORF retrieves a **different-class sample from the same batch** \(\tilde{\mathbf{x}}_{\mathrm{L}}\) and synthesizes
\[
\bar{\mathbf{x}} = \frac{\mathbf{M}_{\mathrm{L,H}}}{2}\odot \left(\mathbf{x}_{\mathrm{L}}+\tilde{\mathbf{x}}_{\mathrm{L}}\right) + \mathbf{M}_{\mathrm{L,L}}\odot \mathbf{x}_{\mathrm{L}}.
\]
These samples are assigned to **auxiliary classes** that are disjoint from the original label space. The paper further states that these auxiliary labels are **temporary placeholders**, are **not enumerated combinatorially over all class pairs**, reuse a **fixed auxiliary label set**, and remain bounded by the bottom-\(k\) budget. This design is intended to avoid corrupting original class boundaries while still learning from ambiguous, mixed examples.

The DSR objective is
\[
\min \sum_{(\mathbf{x},y)\in\mathcal{S}_n\cup\mathcal{A}_n} \mathcal{L}_{cls}(h_\Psi(\mathbf{x}),y) +\mathcal{L}_{reg}.
\]
The paper attributes improved generalization to four mechanisms: isolating semantically meaningful regions, blending out domain-specific background or style cues, using confidence to separate reliable versus ambiguous samples, and creating a more **domain-agnostic representation space**. It explicitly contrasts this design with CutMix: **CutMix is random**, whereas DSR is **contribution-guided**, and DSR uses auxiliary labels for low-confidence mixtures [2605.08839].

## 4. Predictive-confidence routing and hierarchical kernel-based distillation

The confidence mechanism in CORF is described not merely as a selection heuristic but as a **sample weighting/partitioning strategy**. High-confidence samples are treated as class-consistent anchors and routed to **same-class cross-domain fusion**; low-confidence samples are treated as ambiguous and routed to **different-class intra-domain fusion** with auxiliary classification. The paper explicitly notes that this is how CORF “weights samples adaptively” in practice: **not by a scalar loss multiplier, but by routing samples into different fusion-and-supervision paths depending on confidence** [2605.08839].

HKD addresses forgetting by distilling **relational structure** rather than only logits. The paper argues that logit-level distillation assumes distributional consistency between stages, an assumption that often fails under domain shift. Preserving only logits can therefore bias the model toward dominant domains and cause semantic drift.

For a selected layer pair \((l_t,l_s)\in\mathcal{R}\), corresponding to the old and current models, feature maps are flattened as
\[
q^{l_t}(\mathbf{x}_i),\qquad q^{l_s}(\mathbf{x}_i).
\]
CORF then constructs batchwise kernel maps
\[
\mathcal{P}^{l_t}=\{p^{l_t}_{(i,j)}\}_{i,j=1}^B,\qquad \mathcal{P}^{l_s}=\{p^{l_s}_{(i,j)}\}_{i,j=1}^B
\]
with
\[
p_{(i,j)}^{l_t} = \frac{\mathcal{K}(q^{l_t}(\mathbf{x}_i),q^{l_t}(\mathbf{x}_j))}
{\sum_{i=1,\,i\neq j}^{B}\mathcal{K}(q^{l_t}(\mathbf{x}_i),q^{l_t}(\mathbf{x}_j))},
\]
\[
p_{(i,j)}^{l_s} = \frac{\mathcal{K}(q^{l_s}(\mathbf{x}_i),q^{l_s}(\mathbf{x}_j))}
{\sum_{i=1,\,i\neq j}^{B}\mathcal{K}(q^{l_s}(\mathbf{x}_i),q^{l_s}(\mathbf{x}_j))}.
\]
These conditional pairwise similarities describe the **relational topology** of the batch.

Two kernels are used. The cosine kernel is
\[
\mathcal{K}_C(\mathbf{a},\mathbf{b}) = \frac{1}{2}\left( \frac{\mathbf{a}^\top \mathbf{b}}{\|\mathbf{a}\|_2\|\mathbf{b}\|_2} +1 \right),
\]
and the Student-\(t\) kernel is
\[
\mathcal{K}_T(\mathbf{a},\mathbf{b}) = \frac{1}{1+\|\mathbf{a}-\mathbf{b}\|_2}.
\]
The paper’s rationale is that the cosine kernel captures **angular/global semantic orientation**, while the Student-\(t\) kernel captures **local neighborhood structure** and is more robust to outliers. The two are presented as complementary.

Alignment is performed via the symmetric divergence
\[
\mathcal{D}(\mathcal{P}^{l_t}\mid\mathcal{P}^{l_s}) = -\sum_{i=1}^{B}\sum_{\substack{j=1\\j\neq i}}^{B} \left(p_{(i,j)}^{l_t}-p_{(i,j)}^{l_s}\right) \cdot \left(\log p_{(i,j)}^{l_t}-\log p_{(i,j)}^{l_s}\right).
\]
For each layer pair,
\[
\mathcal{L}^{l_t,l_s} = \mathcal{D}(\mathcal{P}^{l_t}_C\|\mathcal{P}^{l_s}_C) + \mathcal{D}(\mathcal{P}^{l_t}_T\|\mathcal{P}^{l_s}_T),
\]
and the full distillation term is
\[
\mathcal{L}_{kernel} = \sum_{(l_t,l_s)\in\mathcal{R}} \mathcal{L}^{l_t,l_s}.
\]
The resulting objective aligns local and global sample relations, early and late feature hierarchies, and the topologies of the old and new models. A plausible implication is that CORF attempts to preserve not only class-level decision behavior but also the geometry of the representation space under incremental domain shift.

## 5. Training procedure, integration, and evaluation protocol

The training procedure has two explicit phases. In the **DSR phase**, each mini-batch is used to compute confidences \(p_i\), split samples into \(\mathcal{X}_{\mathrm{high}}\) and \(\mathcal{X}_{\mathrm{low}}\), synthesize \(\hat{\mathbf{x}}\) for high-confidence samples and \(\bar{\mathbf{x}}\) for low-confidence samples, construct the auxiliary dataset \(\mathcal{A}_n\), and optimize classification loss on \(\mathcal{S}_n \cup \mathcal{A}_n\). In the **HKD phase**, feature maps are extracted from old and new models, relational kernel matrices are computed using \(\mathcal{K}_C\) and \(\mathcal{K}_T\), divergence alignment is evaluated, and the layerwise terms are summed into \(\mathcal{L}_{kernel}\). The final update minimizes
\[
\sum_{(\mathbf{x},y)\in\mathcal{S}_n\cup\mathcal{A}_n} \mathcal{L}_{cls}(h_\Psi(\mathbf{x}),y) +\mathcal{L}_{reg} +\beta\mathcal{L}_{kernel}.
\]

A central claim of the paper is that CORF is **plug-and-play** and can be integrated into existing CIL algorithms. The reported integrations are with **FineTune**, **Replay**, **iCaRL**, **DER**, **MEMO**, **FOSTER**, **DS-AL**, and **TagFex**. The paper states that the same backbone and protocol are used for fairness, and that CORF improves both older baselines and stronger modern methods, with especially notable gains for structure-based methods such as DER [2605.08839].

Experiments are conducted on **OfficeHome**, **DomainNet**, and **PACS**. The task splits are: OfficeHome with **65 classes split into 13 tasks and 5 tasks**, DomainNet with **345 classes split into 5 tasks**, and PACS with **3 base classes, then incremental tasks of 2 classes each**. For replay-based methods, the exemplar budget is **20** on OfficeHome and PACS and **10** on DomainNet. The reported backbone and optimization settings are **ResNet-34 trained from scratch**, **batch size 200**, **200 epochs**, **SGD, momentum 0.9**, **initial lr 0.1 with cosine annealing**, **weight decay \(5\times 10^{-4}\)**, and hyperparameters **\(\alpha=0.3\)** and **\(\beta=0.01\)**.

The metrics are \(A_n\), the top-1 accuracy after task \(n\); \(A_N\), final-stage accuracy; and
\[
\bar{A}=\frac{1}{N}\sum_{n=1}^N A_n,
\]
the average across stages. For CDCIL, final-stage results are reported on **SD** (seen domains), **UD** (unseen domain), and **HM** (harmonic mean of SD and UD). The unseen domain is rotated across all domains and results are averaged.

## 6. Empirical findings, limitations, and interpretive context

The paper reports that CORF consistently improves all tested methods across all datasets. Representative final-stage **HM** gains include **Replay** on OfficeHome 13 tasks from **35.74** to **37.70**, OfficeHome 5 tasks from **35.07** to **38.02**, DomainNet from **30.72** to **35.48**, and PACS from **48.15** to **56.74**. For **iCaRL**, the corresponding gains are **35.95** to **38.95**, **35.90** to **40.55**, **33.22** to **36.99**, and **52.59** to **57.89**. For **DER**, they are **42.41** to **46.17**, **39.53** to **41.65**, **36.37** to **47.24**, and **53.74** to **57.77**. For **FOSTER** on PACS, **HM** improves from **53.12** to **60.97** [2605.08839].

The ablation study on OfficeHome 5 tasks reports that adding **DSR** improves both SD and UD, adding **HKD** alone reduces forgetting, especially on UD, and combining **DSR + HKD** gives the best HM. The paper therefore concludes that the two components are complementary. A similarity analysis visualizing classwise similarity matrices shows **lower inter-class similarity**, **more compact class clusters**, and **better-separated representations**, which the authors use as evidence that DSR improves discriminability. Under an oracle-like setting, CORF narrows the gap to the **“All domains jointly trained” upper bound** and can sometimes outperform the **single-domain continual baseline**, which suggests strong generalization from multiple seen domains.

The kernel analysis states that **cosine and Student-\(t\)** perform best among the tested kernels because they complement one another: cosine for **global angular semantics** and Student-\(t\) for **local topology, robust to outliers**. Hyperparameter sensitivity is reported to be stable over a broad range of \(\alpha\) and \(\beta\), with the best reported setting at **\(\alpha=0.3\)** and **\(\beta=0.01\)**. This suggests that the method is not highly sensitive to tuning.

The reported computational cost is about **1.2× training time** relative to a standard CIL baseline like DER, due to **Grad-CAM computation**, **sample fusion**, and **relational kernel distillation**. The method adds **no trainable parameters**, has **memory overhead that is modest and comparable to baselines**, and computes Grad-CAM **only for selected samples in each batch**. The paper notes a limitation: CORF is primarily suited to **convolutional backbones**, because DSR and HKD rely on intermediate feature maps and trainable backbone optimization. When the backbone is frozen and only prompts or adapters are learned, as in many ViT-based prompt methods, gains are more limited. The paper nonetheless reports compatibility with **L2P** and **DualPrompt** using **ViT-B/16-IN1K**, although the improvements are more modest than in CNN settings [2605.08839].

Several potential misconceptions are explicitly addressed by the design. CORF does not treat Grad-CAM as a supervisory signal; it uses it **only for region selection**. Its confidence mechanism is not a per-sample scalar reweighting scheme; it is a **routing strategy** that changes how samples enter fusion and supervision. Its low-confidence auxiliary labels are not a combinatorial relabeling of all class mixtures; they are **temporary placeholders** drawn from a **fixed auxiliary label set**. Taken together, these clarifications position CORF as a method for jointly controlling sample semantics, domain bias, and inter-sample relational retention within the CDCIL setting.

Source: https://www.emergentmind.com/topics/cross-sample-relational-fusion-corf