Abstract
Aspect-level sentiment classification (ASC) is a fine-grained sentiment analysis task that identifies the sentiment polarity of specific aspects within a sentence. A major bottleneck in ASC is the scarcity of high-quality, aspect-annotated data. We present TransCap (Transfer Capsule Network), a framework designed to transfer high-level semantic knowledge from abundant document-level sentiment classification (DSC) data to the ASC task. TransCap utilizes a capsule network architecture with a novel aspect routing mechanism to filter irrelevant context and focus on aspect-specific sentiment. Our experiments on standard benchmarks show that TransCap significantly outperforms state-of-the-art multi-task and attention-based models.
Introduction
In sentiment analysis, determining the overall sentiment of a document is often insufficient. For instance, a review stating, "The food was excellent, but the service was abysmal," contains conflicting sentiments for different aspects (food vs. service). Aspect-Level Sentiment Classification (ASC) addresses this by predicting sentiment for specific entities. However, creating datasets for ASC is labor-intensive, resulting in small datasets that limit the performance of deep learning models.
In contrast, Document-Level Sentiment Classification (DSC) data is plentiful, often available with user-provided star ratings. Previous attempts to leverage DSC data for ASC have focused on sharing low-level features like word embeddings or LSTM layers. TransCap takes a different approach by transferring high-level semantic "logic"—the way linguistic components combine to express sentiment—using the structural advantages of Capsule Networks.
The TransCap Architecture
TransCap is built upon a four-layer capsule network designed to capture hierarchical relationships in text.
1. Input Layer
The model begins by representing each word in a sentence using pre-trained word embeddings. To incorporate spatial information relative to the target aspect, position embeddings are concatenated with the word embeddings. This helps the model understand the proximity of sentiment-bearing words to the aspect of interest.
2. Feature Capsule Layer
This layer employs convolutional filters of varying window sizes to extract local n-gram features. These features are then encapsulated into "feature capsules," which represent the presence and properties of specific local patterns in the text.
3. Semantic Capsule Layer and Aspect Routing
The core innovation of TransCap is the Semantic Capsule Layer, which introduces an Aspect Routing mechanism. Standard capsule networks use dynamic routing to determine how lower-level capsules contribute to higher-level ones. However, in ASC, the relevance of a context word depends entirely on the aspect being queried.
Aspect Routing acts as a gating mechanism. It uses the aspect's own embedding to calculate weights for each feature capsule. This ensures that only capsules relevant to the target aspect are passed forward, effectively "re-reading" the sentence for each unique aspect. The weighted features are then aggregated using element-wise maximum pooling to form global semantic capsules.
4. Class Capsule Layer
The final layer consists of class capsules representing sentiment polarities (Positive, Neutral, Negative). TransCap uses an extended version of Dynamic Routing to couple the semantic capsules with these class capsules. The length of the resulting class capsule indicates the probability of the corresponding sentiment.
Transfer Learning Framework
TransCap is trained using a multi-task learning approach. The model simultaneously learns the target ASC task and a source DSC task. The Input, Feature Capsule, and Semantic Capsule layers are shared between both tasks. This architecture forces the model to develop a robust, high-level semantic representation of sentiment that is general enough to be useful for both broad document reviews and specific aspect-level sentences.
Experimental Evaluation
The authors evaluated TransCap on the SemEval 2014 Task 4 datasets for the Restaurant and Laptop domains. Large-scale datasets from Yelp, Amazon Electronics, and Twitter served as source tasks for DSC.
Performance and Data Efficiency
TransCap consistently outperformed state-of-the-art baselines, including RAM, IAN, and PRET+MULT. On the Restaurant dataset, it achieved an accuracy of 79.55%. On the Laptop dataset, it reached 73.87%.
As shown in the figure above, the model's performance improves as the percentage of source task data increases, confirming the effectiveness of the transfer learning framework. Interestingly, the choice of source domain matters; while Yelp was ideal for restaurants, the general Twitter dataset provided the best results for the Laptop domain, likely due to its linguistic diversity.
Qualitative Analysis
Ablation studies revealed that the Aspect Routing component is the most critical for performance. Without it, the model loses its ability to distinguish between multiple sentiments in a single sentence. Furthermore, TransCap demonstrated a superior ability to handle euphemisms. For example, it correctly identified the negative sentiment in "The staff should be a bit more friendly," a nuance often missed by attention-based models that fixate on the word "friendly."
Conclusion
TransCap introduces a powerful method for overcoming data scarcity in fine-grained sentiment analysis. By combining the hierarchical modeling of Capsule Networks with a targeted Aspect Routing mechanism, the framework successfully transfers complex semantic knowledge from large-scale document reviews. This approach not only improves accuracy but also enhances the model's ability to handle linguistic nuances like multi-polarity and euphemisms.
Summary updated