Abstract
Multi-task learning (MTL) aims to improve model generalization by sharing knowledge across related tasks. However, traditional architectures often suffer from task interference, where irrelevant features from one task degrade the performance of another. This paper introduces MCapsNet, a framework that utilizes Capsule Networks and a novel "Task Routing" algorithm to intelligently distribute features. By replacing scalar neurons and pooling with vector-based capsules and routing-by-agreement, MCapsNet effectively clusters task-relevant features while filtering out noise. Experimental results across six text classification benchmarks demonstrate that MCapsNet achieves state-of-the-art performance, effectively mitigating the dilemma of feature contamination in MTL.
Introduction
Multi-task learning is a powerful paradigm in natural language processing, allowing a single model to perform multiple related tasks simultaneously, such as sentiment analysis and subjectivity detection. The primary challenge in MTL is task interference. In standard deep learning models like shared CNNs or LSTMs, features are shared "blindly." A feature critical for one task might be considered noise for another. Without a mechanism to manage this sharing, the feature space can become contaminated, leading to a performance drop compared to single-task models.
Methodology
The authors propose a solution leveraging the unique properties of Capsule Networks (CapsNets). Unlike traditional neural networks that use scalar outputs and max-pooling, CapsNets use vectors (capsules) to represent features and an iterative "routing-by-agreement" mechanism to connect layers.
Architecture Components
The framework consists of three primary architectural variations:
- CapsNet-1: A baseline single-task architecture for text.
- CapsNet-2: An improved single-task model that utilizes multiple convolutional kernel sizes to capture n-grams of varying lengths.
- MCapsNet: The multi-task extension incorporating the Task Routing algorithm.
Task Routing and the Orphan Category
The core of MCapsNet is the Task Routing Algorithm. Instead of routing features solely to specific classes, the model uses an iterative process to determine which capsules should be assigned to which task. This allows the network to dynamically cluster features relevant to a specific domain.
To further minimize interference, the authors introduced an Orphan Category in the output layer. This acts as a "trash bin" for background noise, such as stop words or punctuation, that does not contribute to any specific task. By isolating these irrelevant features, the model prevents them from misleading the primary task predictions.
Experiments and Results
The models were evaluated on six diverse text classification benchmarks, including MR, SST-1, SST-2, Subj, TREC, and AG’s News.
Performance Comparison
MCapsNet consistently outperformed both single-task baselines and existing state-of-the-art multi-task models. Key findings include:
- Average Improvement: MCapsNet achieved an average accuracy improvement of 4.6% over a standard BiLSTM baseline.
- MTL Effectiveness: The multi-task MCapsNet outperformed its single-task counterpart (CapsNet-2) on every dataset, validating the effectiveness of the Task Routing algorithm in leveraging cross-task knowledge without interference.
- State-of-the-Art Results: On the MR dataset, MCapsNet reached 83.5% accuracy, and on Subj, it reached 94.5%, surpassing other architectures like MT-CNN and MT-DNN.
Key Insights: Visualizing Feature Selection
The dynamic routing mechanism functions as an advanced feature selection tool. By visualizing the coupling coefficients through word clouds, the authors demonstrated that the model learns to route "sentiment-heavy" words (e.g., enjoyable) to sentiment tasks and "fact-heavy" words to subjectivity tasks.
The "Orphan Category" also proved vital, improving primary task accuracy by approximately 0.4% by effectively filtering background information.
Conclusion
MCapsNet demonstrates that the routing-by-agreement mechanism of Capsule Networks is highly effective for multi-task learning in text classification. By providing a "managed" sharing process, it overcomes the limitations of traditional architectures. Future work may explore more complex task relationships and address the computational complexity inherent in iterative routing algorithms.
Summary updated