Introduction
Targeted Sentiment Analysis (TSA) is a critical task in natural language processing that involves identifying specific opinion targets within a text and determining the sentiment polarity associated with each. In open-domain scenarios, these targets are not known in advance, requiring models to perform both extraction and classification simultaneously. Traditionally, this has been framed as a sequence tagging problem using BIO (Beginning, Inside, Outside) labels. However, this approach suffers from a massive search space and the risk of "sentiment inconsistency," where different words within a single multi-word entity (like "Windows 7") are assigned conflicting polarities.
This paper introduces a novel span-based "extract-then-classify" framework that treats entities as atomic units. By identifying entire spans first and then classifying their sentiment, the proposed model significantly reduces complexity and ensures structural consistency.
The Proposed Framework
The researchers propose a two-stage architecture leveraging BERT as the underlying representation layer. The framework breaks the TSA task into two distinct, span-aware components:
- Multi-Target Extractor: Instead of per-token tagging, the model predicts the probability of each token being the start or end of a target. To handle multiple targets in a single sentence, a heuristic multi-span decoding algorithm is employed, utilizing Non-Maximum Suppression (NMS) to prune redundant or overlapping span candidates.
- Polarity Classifier: For each extracted span, the model generates a summarized representation using an attention mechanism. This representation is then passed to a classifier to predict a single sentiment for the entire entity, naturally preventing internal sentiment conflicts.
The study explored three architectural variations: a Pipeline model (two separate BERT instances), a Joint model (shared BERT with two heads), and a Collapsed model (merged boundary and sentiment labels). Surprisingly, the Pipeline model demonstrated the best performance, suggesting that target extraction and sentiment classification benefit from independent feature spaces.
Experimental Results and Analysis
The models were evaluated on three benchmark datasets: LAPTOP (SemEval 2014), REST (restaurant reviews from 2014-2016), and TWITTER. The span-based approach consistently outperformed state-of-the-art sequence tagging baselines, with the SPAN-pipeline model achieving F1 scores of 68.06 on LAPTOP and 74.92 on REST.
Robustness to Sentence Length
A key finding of the research is the stability of the span-based approach as sentence length increases. Traditional sequence tagging (TAG) models often struggle with long-range dependencies, leading to a sharp decline in performance for longer inputs. In contrast, the span-based extractor maintains high accuracy even in complex sentences.
On the LAPTOP dataset, for sentences exceeding 40 words, the SPAN model outperformed the BIO tagger by a significant 16.1 F1 points. This robustness is attributed to the reduced search space; while BIO tagging search space grows exponentially, the span-based search space grows linearly with sentence length.
Conclusion
By shifting from word-level tagging to span-level extraction, this framework addresses the fundamental flaws of traditional TSA models. The approach eliminates sentiment inconsistency and provides superior performance on long-form text. While the current model relies on heuristic decoding, future work may focus on dynamic thresholding and refining joint architectures to further improve the synergy between extraction and classification tasks.
Summary updated