SkillNet-X: A Multilingual Multitask Model with Sparsely Activated Skills

Zhangyin Feng, Yong Dai, Fan Zhang, Duyu Tang, Xiaocheng Feng, Shuangzhi Wu, Bing Qin, Yunbo Cao, Shuming Shi

TL;DR

SkillNet-X is a multilingual, multitask model that uses "sparse activation" to share knowledge across different tasks and languages simultaneously. By modularizing specific capabilities (like "understanding sentiment" or "processing Spanish") into reusable skill modules, it outperforms traditional dense models and adapts significantly faster to entirely new tasks.

What Problem Does This Paper Address?

In the world of Natural Language Processing (NLP), Multitask Learning (MTL) usually goes one of two ways:

  1. Task-wise: Learning different tasks (e.g., sentiment analysis and question answering) in a single language.
  2. Language-wise: Learning the same task across multiple languages.

The gap is that these models rarely do both at once. A model trained on English Question Answering (QA) might not easily share its reasoning logic with a Chinese QA task. Traditional "dense" models (where every parameter is used for every input) often suffer from "optimization conflicts" when trying to cram too many disparate tasks and languages into the same set of weights. SkillNet-X addresses this by creating a "knowledge transit hub" where specific skills can be activated only when needed.

Methods

SkillNet-X is built on the Transformer architecture but introduces a modular, sparse approach to its internal layers:

  • Skill Modules: The authors define two types of skills: Task Skills (e.g., "get semantic meaning of a sentence") and Language Skills (e.g., "understand German texts").
  • Sparse Activation: Instead of using the entire model for every request, SkillNet-X only "wakes up" the modules relevant to the current input. For example, to solve sentiment analysis in English, it activates the "sentiment" task skill and the "English" language skill.
  • Architectural Tweaks: They propose two variants:
  • SkillNet-X$_{FFN}$: Modifies the Feed-Forward Network layers to contain parallel skill-specific blocks.
  • SkillNet-X$_{FFN-MHA}$: Modifies both the FFN and the Multi-Head Attention layers, allowing the model to have language-specific attention mechanisms.
  • Skill Pre-training: Before the main training, the skill modules are pre-trained using standard objectives like Masked Language Modeling (MLM) to give them a "head start" on their specific roles.

Datasets

The model was trained and evaluated on 11 NLU datasets across 4 languages:

  • English: MNLI, QNLI, SST-2 (GLUE benchmarks), SQuAD 1.1, and CoNLL03.
  • Chinese: OCNLI and TNEWS (CLUE benchmarks).
  • German: MARC-de and Wikiann-de.
  • Spanish: MARC-es and SQuAD-es.

To test generalization to new tasks, they used:

  • MRPC (English paraphrase detection).
  • Wikiann-es (Spanish Named Entity Recognition).

Key Insights and Ideas

  • Skills are Reusable Bricks: The most powerful idea here is that a new task isn't a brand-new problem; it's a new combination of existing skills. When the model encountered Spanish NER (a task it hadn't seen), it simply combined its "token semantics" skill with its "Spanish language" skill to achieve high performance immediately.
  • Sparsity Reduces Interference: By isolating tasks into modules, the model avoids the "catastrophic forgetting" or "gradient interference" common in dense multitask models. One task's learning doesn't necessarily overwrite another's.
  • Validation through Perturbation: The authors proved the modules actually learned what they were supposed to. When they intentionally activated the "wrong" skill (e.g., using the German language skill for an English task), performance plummeted, confirming that the modules are specialized.

Key Results

  • Superior Performance: SkillNet-X$_{FFN-MHA}$ achieved an average score of 80.0 across all 11 tasks, outperforming task-specific fine-tuning (78.5) and standard Mixture-of-Experts (MoE) models (79.0).
  • Better Generalization: On the "unseen" MRPC task, SkillNet-X achieved an F1 score of 92.69, significantly higher than the task-specific baseline of 90.62.
  • Efficiency in Adaptation: The model reached peak performance on new tasks with far fewer fine-tuning steps than baselines, suggesting that the "skills" provide a much better starting point for transfer learning.

Limitations and Future Work

  • Manual Mapping: Currently, the "task-skill matrix" (which tells the model which skills to use for which task) is manually defined based on human intuition. The authors suggest that automatically learning this mapping would be a significant next step.
  • Scaling: While 4 languages and 11 tasks are a great proof of concept, the real test will be scaling this to dozens of languages and hundreds of tasks to see if the modularity holds up.
  • Computational Overhead: While sparse in activation, the model still contains many parameters in storage. Optimizing the memory footprint of these parallel modules is a likely area for future engineering.

Summary updated

BibTeX
@inproceedings{feng2024skillnet,
  author = {Zhangyin Feng and Yong Dai and Fan Zhang and Duyu Tang and Xiaocheng Feng and Shuangzhi Wu and Bing Qin and Yunbo Cao and Shuming Shi},
  title = {{SkillNet-X: A Multilingual Multitask Model with Sparsely Activated Skills}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10447915},
}
Figure