Introduction
Target-Based Sentiment Analysis (TBSA) is a critical task in natural language processing that involves two subtasks: Opinion Target Extraction (OTE)—identifying the specific entity or aspect being discussed—and Target Sentiment Classification (TSC)—determining the sentiment polarity (positive, negative, or neutral) directed at that target.
Traditionally, joint models for TBSA rely on token-based sequence tagging, such as the BIO (Beginning, Inside, Outside) scheme. While effective, this approach suffers from two primary drawbacks. First is sentiment inconsistency: a model might assign conflicting sentiment labels to different tokens within the same multi-word target (e.g., labeling "hard" as positive and "drive" as negative in "hard drive"). Second is the loss of global information: by processing tokens individually, models often fail to capture the holistic meaning of a phrase, potentially misinterpreting words like "hard" as a general adjective rather than part of a hardware component.
To address these issues, this paper (presented at IJCAI-19) proposes a novel Span-based Joint Model that shifts the focus from individual tokens to entire phrases, or spans.
Methods
The core innovation of the proposed model is the treatment of targets as complete spans rather than sequences of labels. The model enumerates all possible spans in a sentence up to a maximum length $L$ and classifies them directly.
Span Representation
For each candidate span, the model constructs a robust representation by concatenating three distinct features:
- Boundary Representations: The hidden states of the start and end words of the span.
- Merged Representation: The sum of the hidden states of all words contained within the span.
This combination ensures the model captures both the context surrounding the phrase boundaries and the internal semantic content of the target itself.
Span-aware Attention
To accurately classify sentiment, the model must identify sentiment-bearing words in the surrounding context. The authors introduce a span-aware attention mechanism that utilizes location weighting. Words physically closer to the target span are given higher initial importance, reflecting the linguistic reality that descriptors (e.g., "excellent," "broken") are typically located near their subjects.
Joint Prediction
Unlike pipeline approaches that perform extraction and classification sequentially, this model uses a single softmax layer to assign one of four labels to every candidate span: {Positive, Negative, Neutral, or Not-a-Target}. By classifying the span as a single unit, the model inherently guarantees sentiment consistency across all words in a target.
Experimental Setup
The model was evaluated on three benchmark datasets:
- $D_L$ (Laptops): Review data from SemEval 2014.
- $D_R$ (Restaurants): A merged dataset from SemEval 2014, 2015, and 2016.
- $D_T$ (Twitter): A collection of tweets curated by Mitchell et al. (2013).
Key Results
The span-based model consistently outperformed state-of-the-art (SOTA) tagging-based and pipeline models across all datasets.
As shown in the results table, the model achieved a significant performance boost on the Restaurant dataset ($D_R$), reaching an F1 score of 71.98, compared to the previous best of 69.80. Ablation studies further revealed that the "merged representation" and "boundary representation" are critical; removing either led to a sharp decline in performance, confirming that span-level features are essential for capturing global phrase information. Additionally, integrating contextualized embeddings (ELMo) provided a further boost, particularly in the extraction subtask.
Conclusion and Future Work
By moving from tokens to spans, the proposed model effectively solves the problem of sentiment inconsistency and better captures the global context of multi-word targets. The use of span-aware attention further refines the model's ability to link targets with their corresponding sentiment descriptors.
However, some limitations remain. The model relies on a maximum span length (typically $L=4$), which covers the vast majority of targets but may fail on unusually long, descriptive phrases. Furthermore, the computational complexity of enumerating all spans ($O(n \cdot L)$) is higher than simple sequence tagging ($O(n)$), which may impact scalability for very long documents.
Summary updated