Papers
Topics
Authors
Recent
Search
2000 character limit reached

GradVac: Gradient Alignment in HSI Transfer

Updated 15 December 2025
  • GradVac is a gradient alignment technique that mitigates conflicting gradients in multi-task and cross-domain HSI transfer using an EMA-adaptive cosine similarity threshold.
  • It adjusts source gradients by injecting a fraction of the target gradient when alignment falls below a preset threshold, ensuring cooperative parameter updates.
  • Empirical results demonstrate significant overall accuracy improvements in high-conflict scenarios, establishing GradVac as a crucial component in the ADGKT framework.

GradVac is a gradient alignment technique designed to mitigate optimization conflicts in multi-task and cross-domain learning, specifically within the context of cross-scene hyperspectral imaging (HSI) transfer. Incorporated into the Agreement–Disagreement Guided Knowledge Transfer (ADGKT) framework, GradVac systematically aligns source and target gradients in the shared encoder, reducing destructive interference and enabling more effective joint training across heterogeneous data distributions (Huo et al., 8 Dec 2025).

1. Formalization of the GradVac Gradient Alignment Objective

Given source and target gradients, gsg_s and gtg_t, of shared encoder parameters respective to source loss Ls\mathcal{L}_s and target loss Lt\mathcal{L}_t, GradVac operates by assessing their cosine similarity:

φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}

A running threshold α\alpha is maintained via exponential moving average (EMA):

α(t)=(1β)α(t1)+βφ(t1)withα(0)=0\alpha^{(t)} = (1 - \beta)\alpha^{(t-1)} + \beta\varphi^{(t-1)} \quad\text{with}\quad \alpha^{(0)} = 0

When φ<α\varphi < \alpha, indicating unacceptable gradient conflict, GradVac perturbs the source gradient by injecting a fraction η\eta of the target gradient, calculated so the angle between gsg_s' and gtg_t0 after adjustment reaches a pre-set target cosine similarity gtg_t1:

gtg_t2

where

gtg_t3

This is equivalent to solving for the closest adjustment gtg_t4 to gtg_t5 under the constraint gtg_t6 and then substituting gtg_t7. This closed-form adjustment targets minimization of destructive interference in shared parameter updates.

2. Intuitive Rationale and Role in Optimization Dynamics

The underlying intuition is that conflicting gradients (i.e., low gtg_t8, nearly orthogonal or opposed directions) can degrade learning, as parameter updates compete rather than cooperatively advance generalization across tasks. GradVac detects these conditions using an adaptive, scenario-sensitive threshold gtg_t9 via EMA, then reorients the source gradient toward the target direction just enough to achieve a configurable minimal alignment (Ls\mathcal{L}_s0). This gradient “vaccination” modulates learning stochastically across optimization trajectories, rather than enforcing constant coupling.

In practical terms, standard joint updates for shared parameters Ls\mathcal{L}_s1 follow:

Ls\mathcal{L}_s2

With GradVac, the update replaces Ls\mathcal{L}_s3 by Ls\mathcal{L}_s4 when Ls\mathcal{L}_s5, actively suppressing destructive interactions. The EMA-driven Ls\mathcal{L}_s6 reflects how much gradient divergence is natural for the current task/domain pair, adapting the intervention frequency.

3. Procedure and Algorithmic Integration

The GradVac mechanism is implemented per training step according to the following procedure:

Step Description Key Operations
1 Compute Gradients Ls\mathcal{L}_s7, Ls\mathcal{L}_s8
2 Calculate Cosine Similarity Ls\mathcal{L}_s9
3 Update Threshold Lt\mathcal{L}_t0
4 Check and Adjust If Lt\mathcal{L}_t1: compute Lt\mathcal{L}_t2, set Lt\mathcal{L}_t3; else, Lt\mathcal{L}_t4
5 Update Parameters Lt\mathcal{L}_t5

Editor's term: “EMA-adaptive gradient thresholding” denotes the adaptive management of Lt\mathcal{L}_t6 via stepwise exponential averaging.

4. Hyperparameter Choices and Ablation Outcomes

GradVac’s performance is sensitive to its hyperparameters:

  • Lt\mathcal{L}_t7: EMA momentum for threshold Lt\mathcal{L}_t8 (e.g., Lt\mathcal{L}_t9 for I→P; φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}0 for H→P)
  • φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}1: Post-adjustment cosine similarity, set to a high value (e.g., φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}2), not extensively varied in experiments.

Empirical ablation (see Table 6 from (Huo et al., 8 Dec 2025)) demonstrates:

Scenario OA Change OA (Before → After)
I→P φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}3 φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}4
H→P φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}5 φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}6
P→H φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}7 φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}8
I→H φ=cosθ=gsgtgsgt\varphi = \cos \theta = \frac{g_s \cdot g_t}{\|g_s\|\|g_t\|}9 α\alpha0

These results indicate that GradVac yields substantial improvement where cross-scene gradients are highly discordant, but may degrade performance if domain shifts are moderate or structured differently. This highlights the necessity of robust α\alpha1 updating and complementary mechanisms.

5. Empirical Impact and Interaction With Companion Methods

Within ADGKT, GradVac constitutes one part of the “agreement” block, and is coupled immediately with LogitNorm. LogitNorm normalizes pre-softmax logits, reducing the risk of magnitude-based domination by either the source or target branch. Ablation reveals:

  • GradVac alone (✓ – – –): Immediate OA gains in high-conflict scenarios.
  • GradVac + LogitNorm (✓ ✓ – –): Further improvement (e.g., α\alpha2 OA on I→P, α\alpha3 on H→P).
  • Full Agreement–Disagreement Block (✓ ✓ ✓ ✓): Optimal overall accuracy (α\alpha4 OA on I→P).

Without agreement mechanisms, naïve joint training often underfits small-target domains or results in poor compromise solutions. GradVac produces immediate OA improvements when severe gradient conflicts exist. LogitNorm prevents the source network (typically with more abundant data) from overwhelming optimization via large logits and commensurately larger gradient magnitudes. Together, these mechanisms form the prerequisite for the “disagreement” block’s ensemble feature extraction, which targets diversity in target scene representation.

6. Contextual Role within Cross-Scene HSI Transfer

GradVac was developed to address a core limitation of prior cross-domain HSI transfer methods—specifically, the prevalence of gradient conflicts between source and target tasks in the optimization of shared encoder parameters. By enabling adaptive gradient realignment, GradVac facilitates balanced knowledge transfer, allowing more complete exploitation of scene diversity in joint learning setups. Its empirical efficacy is scene-pair dependent, excelling in large domain shift situations, but its corrective actions can become counterproductive in low-conflict or tightly coupled domains. Thus, GradVac is best deployed in concert with dynamic thresholding and complementary mechanisms such as LogitNorm for robust performance across varied cross-scene transfer settings (Huo et al., 8 Dec 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to GradVac.