Adversarial Multi-task Learning for Text Classification

Pengfei Liu, Xipeng Qiu, Xuanjing Huang

Abstract

Multi-task learning (MTL) aims to improve performance by sharing knowledge across related tasks. However, standard shared-private architectures often suffer from "feature contamination," where shared and task-specific spaces overlap. This paper presents ASP-MTL (Adversarial Shared-Private Multi-Task Learning), a framework that employs adversarial training and orthogonality constraints to enforce a strict separation between these spaces. Evaluated on 16 text classification tasks, ASP-MTL achieves state-of-the-art results and demonstrates superior feature transferability.

Introduction

In natural language processing, multi-task learning leverages data from multiple domains to enhance a model's generalization. The typical architecture partitions features into a "shared" space for common linguistic patterns and "private" spaces for task-specific nuances. While conceptually sound, this approach often fails to prevent task-specific noise from leaking into the shared representation, a phenomenon known as feature contamination.

The Challenge of Feature Contamination

Without explicit constraints, a shared feature extractor may capture information that is only relevant to a subset of tasks. For instance, the word "infantile" serves as a strong negative sentiment marker in movie reviews but is a neutral descriptor in baby product reviews. A standard MTL model might struggle to categorize such features, leading to interference and inefficient use of model capacity.

Methodology: The ASP-MTL Framework

To address contamination, the authors propose the ASP-MTL architecture, built upon Long Short-Term Memory (LSTM) networks. The framework introduces two primary mechanisms:

  1. Adversarial Training: A Task Discriminator is introduced to predict the source task of an input based solely on its shared features. The shared LSTM is trained to "mislead" this discriminator through a min-max game, ensuring that the shared space contains only task-invariant information.
  2. Orthogonality Constraints: To prevent overlap between shared and private spaces, the authors apply a difference loss ($L_{diff}$) that penalizes correlation between shared and private feature vectors. This forces the representations to be mathematically orthogonal.

The final objective function balances classification accuracy, adversarial robustness, and feature independence.

Experimental Evaluation

The model was benchmarked against 16 datasets, including 14 Amazon product review domains (e.g., Electronics, Books, Toys) and two movie review datasets (IMDB and MR). These datasets provide a diverse range of sentence lengths and vocabularies, testing the model's ability to generalize across varying contexts.

Key Results and Insights

ASP-MTL demonstrated significant performance gains over baselines:

  • Superior Accuracy: The model achieved an average error rate of 13.9%, outperforming standard Shared-Private MTL (14.9%) and single-task LSTMs (18.2%).
  • Enhanced Transferability: Shared features learned via adversarial training proved highly effective when transferred to new, unseen tasks, significantly outperforming features from non-adversarial models.
  • Feature Purity: Qualitative analysis confirmed that the adversarial shared layer successfully ignored task-specific keywords, focusing instead on universal sentiment markers like "excellent" or "disappointing."

Conclusion

By treating shared and private feature extraction as a constrained optimization problem, ASP-MTL effectively eliminates feature contamination. This leads to more robust, interpretable, and transferable representations for text classification. Future work may extend this adversarial approach to more complex tasks such as machine translation or cross-lingual learning.

Summary updated

BibTeX
@inproceedings{liu2017adversarial,
  author = {Pengfei Liu and Xipeng Qiu and Xuanjing Huang},
  title = {{Adversarial Multi-task Learning for Text Classification}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2017},
  doi = {10.18653/v1/p17-1001},
}
Figure