Source-linked AI summary
Structured Sentiment Analysis Using Sequence Labeling as Dependency Graph Parsing
Muhammad Imran, Ana Ezquerro, Carlos Gómez-Rodríguez, Anders Søgaard, David Vilares
TL;DR
Structured sentiment analysis represents sentiment holders, targets, expressions, and their relationships, beyond coarse polarity classification. This paper predicts such graphs through dependency-graph sequence labeling with linearized encodings. Across datasets, these models compete with or outperform more complex approaches, with the 6k-bit encoding performing best overall.
Problem
Coarse sentiment classification does not capture the sentiment-bearing elements and relationships needed to represent differing opinions about aspects or sources.
Source: §1 · p. 1Method
The paper converts sentiment graphs to dependency graphs and uses linearized graph encodings to train a sequence-labeling model that predicts one label per token.
Source: §1 · p. 2, §3 · p. 4, §4.2 · p. 7Results
Sequence-labeling models can compete with or outperform more complex approaches across datasets, and the 6k-bit encoding showed the best overall performance.
Source: §7 · p. 11Takeaways & Limitations
Lightweight sequence-labeling models with suitable structural encodings are a viable approach to structured sentiment analysis.
Source: §7 · p. 11The approach is most competitive on graph-level metrics, while other systems often do better on holder extraction and targeted polarity.
Source: §6.2 · p. 11
Abstract
from arXiv · showhide
This study addresses the problem of structured sentiment analysis, whose goal is to obtain a fine-grained sentiment graph where the nodes represent spans of sentiment holders, targets, and expressions, while the arcs define the relationships among them. Our proposed approach casts the task as dependency graph parsing, but departs from traditional parsing methods by solving it through sequence labeling. To do so, we leverage recent advances in linearized graph encodings that allow each word in the input to be assigned a label, effectively capturing the structure of the dependency graph. We conducted experiments on seven datasets spanning five languages (English, Spanish, Norwegian, Basque, and Catalan), showing performance competitive with leading, more complex single-model approaches.
1. Introduction
Structured sentiment analysis represents who expresses sentiment, about what, and how those elements relate, addressing structure that coarse polarity classification overlooks. This work recasts sentiment graphs as dependency graphs and predicts them through sequence labeling.
1. Introduction
- SSA captures sentiment holders, targets, expressions, and their relationships, unlike sentence- or document-level polarity classification.The opinion tuples represent who expresses what sentiment about which target.Source: §1 · p. 1
- Traditional lexicon-based and supervised approaches can miss negation and relationships among sentiment components, whereas SSA models those interdependencies.The paper describes SSA as offering a more comprehensive and interpretable view of sentiment in context.Source: §1 · p. 1
- The paper treats sentiment expressions as source nodes in a directed acyclic dependency graph and uses sequence labeling with linearized graph encodings to predict it.The approach exploits SSA graph properties including sparsity, bounded dependency distances, and limited relation types; it is evaluated on seven datasets across five languages.Source: §1 · p. 2
2. Related Work
Related work traces sentiment analysis from coarse classification toward fine-grained extraction, then reviews advances in aspect-based and structured sentiment analysis. The paper positions sequence labeling as a simpler alternative to specialized graph parsing for structured sentiment.
2. Related Work
- Sentence- and document-level sentiment classification cannot represent differing opinions about aspects or contrasting sources as explicitly as fine-grained sentiment analysis.Structured sentiment analysis identifies sentiment-bearing elements and their relationships.Source: §2 · p. 2
2.1. Aspect-based sentiment analysis
- Aspect-based sentiment systems combine varied architectures and resources, including opinion-tree induction, spiking-neuron sequences, contextual memory graphs, and multitask learning.The surveyed approaches use mechanisms such as attention, syntactic information, and commonsense knowledge.Source: §2.1 · pp. 2–3
2.2. Structured Sentiment Analysis
- Structured sentiment research progressed from BIO sequence labelers to dependency-graph parsing with a biaffine parser, followed by systems using pretrained encoders, augmentation, and ensembles.The section also reviews partial sequence labeling and token-pair labeling that avoids graph parsing.Source: §2.2 · p. 3
- The paper investigates token-level sequence labeling with masked-language-model encoders and simple feed-forward output layers as an alternative to specialized graph parsers.The formulation uses graph linearizations to preserve dependency structures while avoiding complex graph-parsing components.Source: §2.2 · p. 3
3. Dependency graph parsing as sequence labeling
The method encodes a dependency graph as one label per input token, then decodes labels back into arcs. It compares unbounded positional and bracketing encodings with bounded encodings that trade output-space size against graph coverage.
3. Dependency graph parsing as sequence labeling
- The method maps dependency arcs to a sequence of n labels and learns a token sequence-to-label sequence mapping, with decoding recovering the original arcs.The paper focuses on supervised approaches using annotated SSA resources for comparison with prior graph-based methods.Source: §3 · pp. 3–4
3.1. Unbounded encodings
- Absolute and relative encodings store sorted head positions, with relative labels subtracting the dependent's position; bracketing encodes incoming and outgoing arcs with directional symbols.The example figure contrasts absolute, relative, and bracketing encodings; a root marker is needed to identify graph roots.Source: §3.1 · p. 4, Figure 2 · p. 4
- Bracketing decoding uses a left-to-right pass with two stacks, but cannot directly represent crossing arcs in the same direction.The method distributes arcs into non-crossing planes and encodes each plane with a different bracket variant; Figure 3 illustrates crossing arcs and separate brackets.Source: §3.1 · p. 4, Figure 3 · p. 4
3.2. Bounded encodings
- Bounded encodings constrain label-space size, but 4k-bit and 6k-bit labels require arc sets meeting different parent and crossing constraints.The 4k-bit encoding requires exactly one parent per node; 6k-bit permits at most one parent per direction, and arcs can be distributed across up to k subsets.Source: §3.2 · pp. 4–5
- The 6k-bit encoding independently labels each arc subset and adjusts k to trade compactness and learnability against coverage of dense or complex crossing graphs.Prior empirical results cited by the paper found k=2 or 3 usually sufficient for high coverage on the tested datasets.Source: §3.2 · p. 5
4. System overview
The system transforms sentiment structures into dependency graphs, then linearizes those graphs as token-level labels for neural prediction. It also uses a separate module to predict arc relations and an inverse transformation to recover sentiment graphs.
4. System overview
- The system transforms sentiment structures into dependency graphs, then linearizes them as token-level labels for a neural sequence-labeling model.These are the two phases used to learn sentiment graph structure from a sentence.Source: §4 · p. 5, §4.2 · p. 7
4.1. Sentiment-to-dependency transformation
- Head-first and head-final strategies connect components through first or last tokens; 4k encoding may add artificial arcs, whereas 6k does not.The 4k artificial arcs satisfy a one-parent-per-node assumption; the 6k encoding has no minimum-parent restriction.Source: §4.1 · p. 5, Figure 4 · p. 5
- When multiple opinion tuples induce indistinguishable graph structures, their original tuples cannot be uniquely recovered; shared-token re-entrancies are rare and affect a small proportion of graphs.This coverage limitation is inherent to representing structured sentiment as a dependency graph, rather than to the parsing approach.Source: §4.1 · pp. 5–6
4.2. Dependency graph linearization and neural tagger
- Because the linearization cannot recover arc relation types, a separate module concatenates the endpoint representations to predict each arc’s relation.The module learns the relation distribution from paired word representations.Source: §4.2 · pp. 6–7
- Training converts gold sentiment graphs to dependency graphs and token-label sequences; inference decodes predicted labels into dependency graphs and applies the inverse transformation.At inference, the input is a sentence without arc information.Source: §4.2 · p. 7
5. Experimental setup
The experimental setup uses five SemEval-2022 datasets and describes preprocessing, model training, and two evaluation protocols.
5.1. Datasets
- The study uses five SemEval-2022 datasets: OpeNER in English and Spanish, MPQA and DS in English, NoReC in Norwegian, and MultiBooked in Basque and Catalan.Table 1 reports general dataset statistics, with train, development, and test splits and columns for average sentence length, opinion tuples, and arcs per node.Source: §5.1 · p. 7, Table 1 · p. 7
- With k=2 or 3, encoding coverage exceeds 99% on most datasets; MPQAen and NoReCno are exceptions, where most missing coverage comes from the sentiment-to-dependency transformation.Coverage is the maximum SF1 achievable if the sequence-labeling system makes no prediction errors.Source: §5.1 · p. 7, Table 2 · p. 8
5.2. Data preprocessing
- Sentiment graphs are converted using the official SemEval-2022 code in head-first and head-final forms, rooting each graph at the first or last expression token, respectively.The first or last tokens of holder and target spans are attached as dependents.Source: §5.2 · p. 7
5.3. Training setup and hyperparameters:
- The token-labeling model fine-tunes XLM-RoBERTa-large with a linear learning-rate schedule, batch size 64, gradient accumulation over 10 steps, and early stopping.Training uses an initial learning rate of 1e−5, patience of 20 epochs, a 50-epoch maximum, and convergence tolerance 0.03.Source: §5.3 · pp. 7–8
5.4. Evaluation
- Evaluation follows the official SemEval protocol using labeled sentiment graph F1 (SF1), and also reports fine-grained span, targeted, parsing, and sentiment metrics.The fine-grained metrics include holder, target, and expression token-level F1; unlabeled and labeled dependency parsing F1; and NSF1 and SF1.Source: §5.4 · p. 8
- An internal baseline replaces the sequence-labeling decoder with a biaffine decoder while keeping the XLM-RoBERTa-large encoder and training setup fixed.This comparison is designed to isolate the prediction formulation from encoder and training choices.Source: §5.4 · p. 8
6. Results
The sequence-labeling parser is competitive with specialized systems across datasets, with strong graph-level results and higher throughput than the biaffine decoder. Performance varies with representation and graph structure, and element-level holder and targeted-polarity metrics remain areas for improvement.
6.1. Labeled sentiment graph F1 score evaluation
- Under h.first, sequence-labeling models outperform the biaffine parser on most treebanks, whereas h.final favors biaffine parsing, with average SF1 of 57.8 versus 51.8.Absolute encoding beats biaffine on six of seven treebanks at h.first (55.6 vs. 51.8 average SF1), while relative encoding averages 44.1.Source: §6.1 · p. 8
- Increasing k can improve SF1 when graph coverage grows, but offers little or no benefit after coverage gains saturate.For MBeu, bracketing k=1 to 3 raises SF1 from 60.5 to 69.5; on DSen, 6k-bit k=2 to 3 lowers SF1 from 46.1 to 43.3.Source: §6.1 · p. 9
- 60.4 average SF1 for 6k-bit k=2 with h.first surpasses the best biaffine result of 57.8; the h.first 6k-bit variants score 59.4, 60.4, and 59.2 for k=1, 2, and 3.The table reports SF1 for both head-first and head-final transformations.Source: §6.1 · p. 9, Table 4 · p. 9
- Longer dependencies have lower F1 across both parsing paradigms, while h.first encodings, particularly 6k-bit, maintain relatively balanced performance across displacement directions.The h.final setting performs notably worse on the more frequent positive-displacement side.Source: §6.1 · pp. 9–10, Figure 7 · p. 9
- Across seven treebanks, the approach outperforms existing systems on two and is competitive overall, using one shared encoder without treebank-specific optimization or graph-specific decoding.The comparison is against representative structured sentiment systems.Source: Table 5 · p. 9, §6.1 · p. 10
6.2. Fine-grained Evaluation
- On three of five benchmarks, sequence labeling obtains the highest SF1, improving by +1.1 to +3.0 points, and achieves the best target F1 on four; it remains competitive on the other two.The comparison uses the fine-grained evaluation protocol.Source: §6.2 · p. 10, Table 6 · p. 10
- The same encoder identifies spans about as well as, or sometimes better than, the proposed model, but its graph scores are over 15 SF1 points lower on every dataset.The authors attribute the gap to assembling spans into coherent graphs; their approach is most competitive on graph-level rather than element-level metrics, especially for holders and targeted polarity.Source: §6.2 · pp. 10–11
6.3. Model Efficiency Analysis
- About 3,800 tokens/s in training and 4,450 tokens/s at inference yield a 2× speedup over biaffine decoding under the same configurations.The authors attribute the efficiency to avoiding dense pairwise score tensors; encoding variants perform within 1–2% of each other.Source: §6.3 · p. 11
7. Conclusion
The paper frames structured sentiment analysis as dependency graph parsing but uses sequence labeling to predict linearized graph encodings. These encodings are learnable and well suited to the task; with effective representations, sequence-labeling models compete with or outperform more complex approaches while achieving high efficiency.
7. Conclusion
- The paper applies parsing-as-tagging to structured sentiment graphs, assigning each input token a label that encodes part of the graph.The approach uses a recently proposed graph-linearization method.Source: §7 · p. 11
- Both bounded and unbounded graph linearizations are learnable and well suited to structured sentiment analysis..Source: §7 · p. 11
- With standard encoder-decoder architectures and a suitable representation, sequence-labeling models compete with or outperform more complex approaches across datasets while achieving high efficiency; 6k-bit had the best overall performance among tested linearizations..Source: §7 · p. 11
CRediT authorship contribution statement
The authors’ contribution statement assigns work across conceptualization, methodology, software, analysis, validation, supervision, and writing.
CRediT authorship contribution statement
- Imran contributed to data curation, formal analysis, investigation, methodology, software, validation, visualization, and writing..Source: CRediT authorship contribution statement · p. 12
- Ezquerro contributed to conceptualization, methodology, software, validation, visualization, and writing..Source: CRediT authorship contribution statement · p. 12
- Gómez-Rodríguez, Søgaard, and Vilares contributed to conceptualization and methodology; their listed roles also include funding and project leadership, supervision, analysis, investigation, validation, and writing.The statement assigns funding acquisition and project administration to Gómez-Rodríguez, and supervision to Gómez-Rodríguez and Søgaard.Source: CRediT authorship contribution statement · p. 12
A. Appendix
The appendix points readers to dataset-level fine-grained results and model-efficiency measurements, with captions specifying the metrics and system variants covered.
A. Appendix
- Tables A1–A7 provide fine-grained SSA results by dataset, including token-level span F1, targeted F1, dependency-graph F1, and sentiment F1 measures where specified.The captions identify MultiBooked Catalan and Basque, NoReC, Darmstadt Universities, MPQA, and OpeNER English and Spanish datasets.Source: A. Appendix · p. 16, Table A1 · p. 16, Table A2 · p. 16
- Table A8 reports training and inference throughput in tokens per second and sentences per second for the encodings and biaffine baseline.The listed variants are absolute, relative, bracketing B1–B3, and 6k-bit B61–B63.Source: A. Appendix · p. 16, Table A8 · p. 17
- The appendix captions use the same fine-grained metric definitions and encoding notation as the main comparisons..Source: A. Appendix · p. 16, Table A1 · p. 16, Table A2 · p. 16