NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep Multi-Task Learning with Shared Memory for Text Classification

Pengfei Liu, Xipeng Qiu, Xuanjing Huang

Introduction

Deep learning models typically require vast amounts of labeled data to achieve high performance. In many Natural Language Processing (NLP) domains, such data is scarce. Multi-task learning (MTL) offers a solution by training a model on several related tasks simultaneously, allowing it to learn more robust features. However, traditional MTL approaches often rely on "hard-sharing" of lower layers, which can be too rigid to capture complex, task-specific nuances and long-term dependencies.

This paper introduces a novel MTL framework that equips task-specific LSTMs with a shared external memory. By allowing different tasks to read from and write to a common "knowledge base," the proposed architectures enable more flexible communication and information retrieval across tasks.

Proposed Architectures

The core innovation is the Memory Enhanced LSTM (ME-LSTM). Unlike a standard LSTM, the ME-LSTM is augmented with an external memory matrix.

The ME-LSTM Cell and Deep Fusion

A critical component of the ME-LSTM is the Deep Fusion strategy. A dedicated "fusion gate" ($g_t$) dynamically controls the integration of information from the external memory into the LSTM's hidden state. This mechanism ensures that the internal task-specific state and the external shared knowledge are combined effectively without causing interference or "noise" from unrelated tasks.

The ME-LSTM cell structure featuring the external memory and the fusion gate $g_t$.

Multi-Task Frameworks: ARC-I and ARC-II

The authors propose two primary architectures for multi-tasking:

  1. ARC-I (Global Shared Memory): Multiple task-specific LSTMs share a single, global external memory. This memory serves as a collective bulletin board where all tasks can store and retrieve useful patterns.
  2. ARC-II (Local-Global Hybrid Memory): This hierarchical model provides each task with its own local external memory for task-specific nuances, which then interacts with a global shared memory. This separation allows the model to better distinguish between idiosyncratic task features and generalizable knowledge.
Comparison of the Global Memory Architecture (ARC-I) and the Local-Global Hybrid Architecture (ARC-II).

Experimental Evaluation

The models were evaluated on two major groups of text classification datasets:

  • Movie Reviews: SST-1, SST-2, SUBJ, and IMDB.
  • Product Reviews: Amazon reviews covering Books, DVDs, Electronics, and Kitchen appliances.

Key Results

  • Performance Gains: Both ARC-I and ARC-II consistently outperformed single-task LSTMs. On movie review datasets, ARC-II achieved an average accuracy improvement of 2.9%. On product reviews, the improvement reached 3.7%.
  • Competitive Baselines: The proposed models surpassed other popular MTL architectures, including MT-CNN and MT-DNN, demonstrating the superiority of the memory-sharing approach.
  • Qualitative Analysis: Case studies revealed that the ME-LSTM correctly identifies sentiment in complex linguistic structures (e.g., "cookie-cutter" or conditional "if...were not..." phrases) where standard LSTMs fail. The fusion gate was observed to "light up" or increase its activation when encountering these highly informative, shared-knowledge words.

Conclusion and Future Work

By integrating external memory and a gated fusion mechanism, the ME-LSTM provides a powerful framework for multi-task learning in NLP. While the ARC-II architecture is more computationally intensive—taking roughly twice as long to train as a standard LSTM—the performance gains, particularly in data-scarce scenarios, are significant. Future research may explore scaling these memory mechanisms to other sequence-based tasks such as machine translation or sequence labeling.

Summary updated

BibTeX
@inproceedings{liu2016deep,
  author = {Pengfei Liu and Xipeng Qiu and Xuanjing Huang},
  title = {{Deep Multi-Task Learning with Shared Memory for Text Classification}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  doi = {10.18653/v1/d16-1012},
}
Figure