M7-078M7: Retrieval, Ranking & RecSysMulti-Objective Ranking & OptimizationMedium
⚡Flashcard Drill➔Mastery:

Explain Negative Transfer in Multi-Task Learning and Architectural Remediation (MMoE, PLE, Gradient Surgery)

🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
Next: M7-079 →
📐 Mathematical Definition
negative transfer: shared layers hurt some tasks;fix: soft sharing, gradient surgery\text{negative transfer}:\ \text{shared layers hurt some tasks};\qquad \text{fix}:\ \text{soft sharing},\ \text{gradient surgery}
⚡ One-Sentence Core Answer
Negative transfer occurs when sharing representations across conflicting tasks causes parameter updates for one task to degrade another; architectures like MMoE and PLE, alongside gradient surgery techniques (PCGrad), resolve this conflict.

📌 Key Takeaways

  • •
    Root causes of negative transfer: Gradient direction conflict (negative cosine similarity), task capacity competition, and severe task label imbalance.
  • •
    The seesaw phenomenon: Improving performance on Task A causes a corresponding drop on Task B in hard parameter sharing networks.
  • •
    Architectural mitigation: Progressive Layered Extraction (PLE) completely isolates task-specific expert sub-networks from shared expert routing.
  • •
    Optimization mitigation (PCGrad): Projects conflicting task gradient vectors onto the normal plane of each other to eliminate destructive gradient cancellation.

📐 Mathematical Derivations

Mathematical & Optimization Formulation: Negative Transfer & Gradient Conflict.

(1) The Geometry of Gradient Conflict:
Let WW be shared network parameters. For two tasks T1T_1 and T2T_2, backpropagation yields task-specific gradient vectors g1=∇WL1g_1 = \nabla_W \mathcal{L}_1 and g2=∇WL2g_2 = \nabla_W \mathcal{L}_2.
The joint gradient update is g=g1+g2g = g_1 + g_2. The inner product reveals conflict:
⟨g1,g2⟩=∥g1∥∥g2∥cos⁡ϕ\langle g_1, g_2 \rangle = \|g_1\| \|g_2\| \cos \phi
- If cos⁡ϕ<0\cos \phi < 0 (angle ϕ>90∘\phi > 90^\circ): Gradients point in conflicting directions. Updating along g1g_1 directly increases loss L2\mathcal{L}_2, and vice versa. Shared parameters oscillate or settle into an inferior saddle point where both tasks underperform.

(2) Gradient Surgery via PCGrad (Projecting Conflicting Gradients, Yu et al., 2020):
If ⟨gi,gj⟩<0\langle g_i, g_j \rangle < 0, project gig_i onto the normal plane of gjg_j to eliminate the conflicting component:
giproj=gi−giTgj∥gj∥22gjg_i^{\text{proj}} = g_i - \frac{g_i^T g_j}{\|g_j\|_2^2} g_j
This guarantees ⟨giproj,gj⟩=0\langle g_i^{\text{proj}}, g_j \rangle = 0, ensuring parameter updates never degrade task jj's objective.

(3) Progressive Layered Extraction (PLE, Tang et al., Tencent, 2020):
Resolves the limitation of MMoE where all experts are shared. PLE separates experts into:
- Task-specific experts E(k)E_{(k)} dedicated strictly to task kk.
- Shared experts E(s)E_{(s)} shared across all tasks.
- Multi-level extraction routing: Routing gates dynamically combine task-specific and shared representations across multiple extraction layers, providing complete architectural isolation against negative transfer.

🏭 Production Trade-offs

In-Depth Analysis & Engineering Trade-offs: ① Shared-Bottom vs. MMoE vs. PLE progression—Shared-Bottom suffers severe negative transfer; MMoE mitigates conflict by weighting shared experts per task, but still suffers the 'seesaw phenomenon' when task correlations are low; PLE achieves near-zero negative transfer by physically separating task-specific parameters from shared parameters, becoming the modern industrial benchmark. ② Computational overhead of gradient surgery—PCGrad requires computing pairwise inner products and projections across all TT task gradient vectors at every backpropagation step (O(T2⋅∣W∣)O(T^2 \cdot |W|) operations); while feasible for small models, for billion-parameter recommendation models PCGrad increases training latency by 40%–80%; architectural separation (PLE) is computationally cheaper during training. ③ Task capacity competition—when Task 1 has 100M click examples and Task 2 has only 100k conversion examples, Task 1's gradient magnitude completely overwhelms shared weights; gradient normalization (GradNorm) or loss scale calibration is essential. ④ Task grouping heuristics—in platforms with 15+ tasks (like, comment, share, download, follow, hide, report), routing all 15 tasks into a single giant model triggers catastrophic negative transfer; clustering tasks into affinity groups (e.g., Group 1: Positive Engagement, Group 2: Commercial Value, Group 3: Negative Signals) with separate multi-task heads stabilizes learning. ⑤ Inference latency of PLE—because PLE structures experts into deep extraction layers, model depth increases; pruning expert widths or using knowledge distillation preserves serving SLAs. ⑥ Interview takeaway—define negative transfer mathematically via ⟨g1,g2⟩<0\langle g_1, g_2 \rangle < 0, explain PCGrad orthogonal gradient projection, contrast Shared-Bottom, MMoE, and PLE, and discuss task capacity competition.
⚠️ Common Interview Pitfalls
  • ✕
    Deploying Shared-Bottom architectures across negatively correlated tasks (e.g., CTR vs. Report Rate), locking the model into a severe negative transfer trap.
  • ✕
    Assuming MMoE completely eliminates task conflict; MMoE still allows all experts to be shared, allowing the 'seesaw phenomenon' to persist.
  • ✕
    Training multi-task models with unbalanced label frequencies without gradient normalization, allowing high-frequency tasks to wash out rare task signals.
🎯 Interviewer Follow-up Inquiries
  • ?
    How does PCGrad project conflicting gradient vectors onto normal hyperplanes to prevent negative transfer during backpropagation?
  • ?
    What structural differences allow Progressive Layered Extraction (PLE) to outperform MMoE on loosely correlated tasks?
  • ?
    How does GradNorm balance gradient update magnitudes dynamically across tasks with vastly different loss scales?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
📚

Associated Knowledge Base Guides & Mindmaps

← PreviousM7-077: Explain Why Optimizing Exclusively for Short-Term Clicks Leads to Platform Degradation📋 Back to BankNext →M7-079: Explain the Implementation of Business Rules and Operational Constraints in Search and Recommendation