LOCAL PREVIEW View on GitHub

Multi-Task Learning Scenarios - MangaAssist

Multi-task learning trains one shared model to predict several related outputs. For MangaAssist, the natural shared tasks are intent, sentiment, entities, risk, and sometimes multi-intent labels.

When This Topic Matters

Use multi-task learning when separate models duplicate work and miss useful shared signals.

Example:

"I still have not received my manga box set and I want a refund."

Useful outputs:

  • intent: order_tracking and return_request,
  • sentiment: frustrated,
  • entity: order/item reference,
  • risk: possible escalation,
  • action: support workflow with refund policy grounding.

Scenario 1 - Shared Encoder For Routing Signals

Architecture:

shared text encoder
  -> intent head
  -> multi-intent head
  -> sentiment/frustration head
  -> entity tagger
  -> business-risk head

Training data:

Task Labels
intent 55,000
multi-intent 8,000
sentiment/frustration 20,000
entities 12,000
business risk 6,000

Loss:

total_loss = w1 * intent_loss
           + w2 * multi_intent_bce
           + w3 * sentiment_loss
           + w4 * entity_loss
           + w5 * risk_loss

Promotion gate:

Metric Gate
intent accuracy no worse than champion by 0.3 points
frustration recall >= 90%
entity F1 >= 88%
high-risk miss rate <= champion
P95 latency <= combined model budget

Scenario 2 - Gradient Conflict Management

Tasks can fight. Intent classification may prefer concise routing features, while sentiment needs emotional wording.

Detect conflict:

cosine(gradient_intent, gradient_sentiment) < 0

Fix options:

  • tune loss weights,
  • use GradNorm,
  • use gradient surgery,
  • split heads later in the network,
  • keep separate models if conflict persists.

Scenario 3 - Business-Risk Head

The risk head predicts whether an error would be expensive:

  • missed escalation,
  • checkout failure,
  • refund dispute,
  • age-sensitive recommendation,
  • policy-sensitive answer.

This supports cost-sensitive routing from the business-weighted error score document.

Failure Modes

Failure Detection Fix
one task dominates other metrics drop dynamic task weights
labels misaligned same example has conflicting annotations data audit
latency not actually lower shared model too large distill or quantize
risk head overfires too many escalations calibrate thresholds

Production Log

{
  "event": "multitask_route",
  "intent": "return_request",
  "multi_intents": ["return_request", "order_tracking"],
  "frustration": 0.81,
  "business_risk": 0.74,
  "decision": "support_flow_with_escalation_option"
}

Final Decision

For MangaAssist, multi-task learning is attractive when the same text features support several routing decisions. Ship it only if the shared model preserves intent quality while improving risk, sentiment, or entity handling enough to simplify production.