---
title: "Span Detection for Aspect-Based Sentiment Analysis in"
description: "How UIT-ViSD4SA identifies opinion spans in Vietnamese smartphone reviews, and how well syllable, character and contextual features…"
canonical: "https://research.elamur.ai/free/en/papers/thanh-2021-span-detection-aspect-based-sentiment/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/thanh-2021-span-detection-aspect-based-sentiment/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Span Detection for Aspect-Based Sentiment Analysis in Vietnamese

# Span Detection for Aspect-Based Sentiment Analysis in Vietnamese

Paper · 2021 · Kim Nguyen Thi Thanh, Sieu Huynh Khai, Phuc Pham Huynh et al.

**Authors:** Kim Nguyen Thi Thanh, Sieu Huynh Khai, Phuc Pham Huynh, Luong Phan Luc, [Duc-Vu Nguyen](https://md.research.elamur.ai/free/en/authors/duc-vu-nguyen/) and Kiet Nguyen Van · **Year:** 2021 · **Venue:** Proceedings of the 35th Pacific Asia Conference on Language, Information and Computation · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 35th Pacific Asia Conference on Language, Information and Computation · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.paclic-1.34/)
- [PDF](https://aclanthology.org/2021.paclic-1.34.pdf)

## Summary

A customer may praise a phone’s camera, complain about its battery and say that it was worth the price, all in the same review. A rating for the whole review loses those distinctions. Even a label for each aspect leaves a reader looking for the words that explain the judgment. This paper asks whether a system can recover those words from Vietnamese smartphone reviews and identify both what each passage is about and the attitude it expresses. It treats an opinion as a continuous span of the original comment. The task brings together the recognition of attitudes and the recovery of the evidence behind them. [Sentiment & emotion](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/)

The authors create UIT-ViSD4SA by adding span boundaries to an existing collection of smartphone feedback. It contains 35,396 manually marked spans across 11,122 comments. Annotators look for the shortest passage that conveys an opinion on a given aspect and assign it an aspect and a polarity. The categories distinguish subjects such as camera, battery and service, while polarity can be positive, negative or neutral. The data support experiments that ask for the aspect alone, the polarity alone or both together. The authors make the dataset freely available for research.

Their system assigns tags to the syllables of a review and uses those tags to recover spans. A bidirectional long short-term memory network reads the comment in both directions so that the representation at a syllable can draw on what comes before and after it. A conditional random field uses that information to score sequences of tags. The authors vary what the network receives about each syllable, starting with syllable embeddings, then adding character information and finally contextual information from XLM-RoBERTa.

The strongest combination uses syllable and character embeddings with XLM-RoBERTa Large. On the UIT-ViSD4SA test set, it reaches macro F1 of 62.76% for aspect spans, 49.77% for polarity spans and 45.70% for spans labeled with both. A prediction earns credit only when it matches the annotated span exactly under the task’s labeling scheme. Camera and battery are among the strongest aspect categories, while neutral sentiment is the weakest polarity. The authors also show missed opinions, mistaken categories and a prediction that merges remarks about several aspects. These examples help explain what the benchmark measures: a system must decide which words belong together as an opinion as well as how to label them.

## Deep dive: Span Detection for Aspect-Based Sentiment Analysis in Vietnamese

How UIT-ViSD4SA identifies opinion spans in Vietnamese smartphone reviews, and how well syllable, character and contextual features recover them. · about 34 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A review contains several kinds of evidence

The paper starts from a familiar decision. Someone considering a product wants to know what previous buyers encountered. A buyer interested in battery life may have little use for a high overall rating if the accompanying praise is mainly about the camera. A business reading the same comments may want to tell complaints about the phone apart from complaints about the service that came with it. In both cases, the useful evidence can be a short part of a long comment. Recovering it is a problem in [information extraction](https://md.research.elamur.ai/free/en/concepts/information-extraction/).

Aspect-based sentiment analysis, or ABSA, makes the subject of an opinion part of the output. For smartphone feedback, battery, camera and price can each be that subject. An analysis can then attach positive, negative or neutral sentiment to an aspect. The paper distinguishes these decisions from finding an opinion target expression, the words that identify the thing being evaluated. The target and the passage expressing the evaluation can be different in extent. A mention of a camera gives a reader the target. The surrounding words may say whether its pictures are sharp, its focus is slow or the reviewer is simply describing how it was used.

The authors put the opinion passage itself at the center of the task. Consider the contrast in their introductory example, where a reviewer approves of the staff but strongly dislikes the phone. A positive label on service and a negative label on the phone convey the contrast. Marking the source passages also establishes which part of the sentence led to each label. The result can be read in context, and a person inspecting it can check whether the system attributed the attitude to the right subject.

The paper motivates this distinction through the review interfaces it describes. Several Vietnamese e-commerce sites allow customers to combine a written comment with an overall rating. A restaurant review service in the paper gives scores for distinct dimensions, including service and atmosphere. A score attached to a dimension offers more detail about the evaluation, while an extracted passage gives a reader access to how the customer expressed it. The authors envisage interfaces that let shoppers focus on passages about the parts of a product they care about. They also see a use for businesses that need to follow recurring feedback about products and services.

This aim shapes the boundaries of the research problem. The system receives a written comment and returns text already present in it. The output always points back to the source. An opinion that can be inferred has a place in the task if there is a passage to mark, even when the words naming its aspect are absent. The annotation still needs a location. That requirement turns a general interpretation of a review into a concrete decision about where the evidence starts and ends.

#### What earlier datasets made possible

The authors place their work in the line of ABSA benchmarks developed through SemEval. The restaurant reviews in the earlier shared task came with categories distinguishing subjects such as food, service and price, and the sentiment inventory included a conflict label. The same benchmark also had laptop reviews. The paper uses these collections to show how a review can be annotated for several dimensions of evaluation and how the kind of product affects the vocabulary of those dimensions. [SemEval-2014 Task 4](https://md.research.elamur.ai/free/en/papers/pontiki-2014-semeval-2014-task-4-aspect/)

The next shared task changed the way aspects were specified. An aspect could pair an entity type with an attribute, as in the paper’s example of food and style. The sentiment inventory dropped conflict. The paper describes a subsequent extension to more domains and languages. This history matters because the unit of classification and the choice of labels determine what detail an evaluation can reveal. A benchmark can distinguish fine-grained subjects and still leave open how much of a comment expresses an opinion about each one. [SemEval-2015 Task 12](https://md.research.elamur.ai/free/en/papers/pontiki-2015-semeval-2015-task-12-aspect/)

For Vietnamese, the authors describe a smaller set of resources with different annotation goals. Mai and Le collected smartphone reviews and annotated 2,098 sentences for opinion target expressions and sentiment. Their approach used sequence labeling with a bidirectional recurrent network and a conditional random field. This is a close predecessor in domain and in the use of tags, but the span sought in UIT-ViSD4SA is defined around the opinion expressed about the aspect. An evaluation built around a target mention gives a different answer about where that evidence begins and ends.

The Vietnamese Language and Speech Processing shared task drew on hotel and restaurant reviews. Its aspect categories used entity and attribute pairs, with a sentiment assignment for each category. The authors point out that the task omitted opinion target expressions. Another collection in those domains had 7,828 reviews with document-level annotations. The paper also describes sentence-level corpora in the same domains, with high agreement among annotators. Together, these examples trace a difference in granularity. A document can contain an aspect, a sentence can convey a view on it, and a span can isolate the part a reader needs to inspect.

UIT-ViSFD, an earlier smartphone feedback dataset, supplies the text and category scheme for the new work. It already separates aspects in customer comments and was used in developing a social listening system. The new undertaking is to locate the words that support those distinctions. Working from the earlier collection lets the authors keep the product domain and aspect definitions while changing what annotators have to identify. It also means that the contribution depends heavily on the placement of boundaries and the rules for deciding what belongs inside them.

#### How earlier systems used spans

The method also has predecessors in the way it represents the output. The paper describes an earlier extract-then-classify approach from Hu and colleagues. That approach learns to extract multiple opinion targets with supervision from their boundaries and then uses representations of the extracted targets to classify sentiment. The connection is the use of explicitly located text. The proposed Vietnamese task applies that idea to passages that express opinions, and its baseline produces spans through syllable tags. [Open-Domain Targeted Sentiment Analysis via Span-Based Extraction and Classification](https://md.research.elamur.ai/free/en/papers/hu-2019-open-domain-targeted-sentiment-analysis/)

The paper connects this use of boundaries to reading comprehension and [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/). In the examples of extractive reading comprehension that it cites, the answer is a continuous passage in a source text. Knowing the topic of an answer still leaves the problem of choosing where the answer starts and ends. The analogy gives a way to think about review evidence. A passage about charging can ground a favorable opinion of the battery in approximately the way that a passage in a document can ground an answer. The review system in this paper receives a comment and marks the opinions it finds across the relevant categories.

The authors also discuss work by Xu and colleagues that uses multiple conditional random fields as a form of structured attention. There, the system extracts aspect-specific opinion spans and uses information from the spans and their context to classify sentiment. This example shows a different role a span can play in an ABSA system. It can supply evidence used in making a sentiment decision. In UIT-ViSD4SA, recovering the evidence has its own evaluation, so the benchmark can ask directly how precise that recovery was.

### The method, step by step

#### Define an opinion as a passage in the original comment

A span starts and ends at character positions in the input. The paper gives the following bounds on those positions.

```
0 ≤ i, j ≤ n and i ≤ j
```

Here `i` is the starting character position, `j` is the ending position, and `n` is the length of the feedback in characters. The comparison sign `≤` means less than or equal to. Both positions must fall within the review’s allowed range, which starts at `0`. The starting position must come at or before the ending position.

The annotation rule asks for the shortest passage that contains the customer’s opinion about the aspect. Applying it requires a judgment about what words carry the opinion. In the paper’s worked example, a customer says that the battery takes a long time to run down and also charges quickly. The text elaborates on both points. The annotation groups that part of the review under positive battery sentiment. Elsewhere in the same review, praise of the phone’s appearance is labeled as design, and an observation that it runs smoothly is labeled as performance. A favorable judgment about value at the end is assigned to the general category.

That example shows why length follows the substance of the comment. A brief observation about smooth operation can carry an opinion in a few words. An assessment of battery life can extend through details about how long the phone lasts and how quickly it charges. An annotator has to identify the words that belong to the same assessment and locate them within the comment. The category describes the subject of that assessment, while the offsets make it possible to display precisely the portion of text that received the label.

The aspect inventory gives the annotator a fixed set of choices. SCREEN is for such things as display quality, size and color. CAMERA concerns properties such as focus and the quality of the resulting image. FEATURES includes capabilities such as wireless connectivity and fingerprint or face recognition. BATTERY covers battery capacity and quality, while PERFORMANCE covers subjects such as the processor and how smoothly the device operates. STORAGE includes capacity and the ability to expand it. DESIGN concerns appearance and the body of the phone. PRICE covers its cost, GENERAL covers overall judgments, and SER&ACC groups sales service, warranty and accessories.

These definitions make nearby categories worth distinguishing. An overall statement about value can concern the phone as a whole, as in the worked example. A passage specifically discussing the price can be assigned to PRICE. Likewise, the rubric puts some capabilities in FEATURES and smooth operation in PERFORMANCE. The category has to follow the annotated meaning of the passage. A word associated with the device can occur in any of these contexts, so identifying a category entails reading what is said about it.

The polarity choices are POSITIVE, NEGATIVE and NEUTRAL. In the joint representation, the aspect and polarity are joined in a label such as `CAMERA#POSITIVE`. The hash marks the division between the two parts. The annotation process permits both explicit and implicit mentions of an aspect. In either case, an annotator marks the words conveying the opinion and gives them a label from the same inventory. This preserves the distinction between the text evidence and the category the annotator infers from it.

#### Train the annotators and measure agreement

The source dataset provides comments, star ratings, dates and times, and labels. The new [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/) builds on its existing aspect guidelines. The authors add rules explaining what counts as a span and how its limits should be chosen. They then use rounds of practice to find where annotators interpret those rules differently before asking them to work independently.

In each practice round, the annotators mark a random selection of about 30-70 reviews. The team evaluates agreement with F1. When annotations disagree, the annotators discuss them and vote on the final label. They use those cases to clarify ambiguous terms and supplement the guidelines where a term is missing. Practice continues over four rounds until the F1-score exceeds 80%, the threshold the authors set for the training phase. This exercise gives the annotators shared precedents for decisions about boundaries and labels before they apply the guidelines across the collection.

The paper represents an annotation as follows.

```
(d, l, o)
```

Here `d` is the document identifier for the review, `l` is the annotation label, and `o` is a list of pairs giving the starting and ending character offsets. The parentheses enclose the fields of the annotation record. The use of document identifiers matters because identical wording in different reviews can be marked at different positions and must be counted as separate occurrences.

The agreement calculation compares the records made by pairs of annotators.

```
F1ᵢⱼ = (2 × |Aᵢ ∩ Aⱼ|) / (|Aᵢ| + |Aⱼ|)
```

Here `F1ᵢⱼ` is the agreement score for annotators `i` and `j`. `Aᵢ` and `Aⱼ` are their respective collections of annotations. The paper allows these collections to be multisets, in which repeated entries retain their multiplicities. The intersection symbol `∩` picks out annotations shared by the two collections, and the vertical bars count entries. The factor `2` accounts for the shared count appearing on both sides of the comparison. The denominator adds the counts made by both annotators. The paper averages the pairwise scores and describes grouping annotations by document or by label to calculate agreement at those levels.

Agreement in the practice rounds serves a different purpose from the system’s evaluation. The team is testing whether people can apply the proposed definitions consistently. A disagreement may reveal a boundary rule that needs a clearer example or a category distinction that needs a fuller explanation. The system’s eventual score, by contrast, compares its predictions with the benchmark annotations. Both calculations use F1, but their participants and the decisions they are meant to inform differ.

#### Turn character spans into syllable tags

The paper approaches span detection as sequence labeling. The sequence is the ordered set of syllables in a comment, and the system assigns a tag at each position. To train it this way, the authors convert the character-offset annotations to IOB format. The tag components mark a beginning, an inside position or an outside position. A beginning tag establishes where a span starts, inside tags continue it, and outside tags cover syllables that belong to no marked span. This use of syllables defines the working units of the system’s [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/).

An opinion represented by several successive syllables therefore has both a boundary pattern and a label. The beginning and continuation tags carry the label relevant to the experiment. When the task is aspect detection, that label can be BATTERY. When the task is polarity detection, it can be POSITIVE. When the task is joint detection, it can be `BATTERY#POSITIVE`. The same annotated source passage can give rise to each version because the annotation records both properties. The experiment changes what the tag must express.

The beginning marker is important when consecutive passages have the same retained label. A sequence can begin a new positive span immediately after another positive span. The original annotations may distinguish the two passages through their aspects, and the beginning markers preserve their boundaries when the polarity is the only category kept for training. The polarity-only system has to learn to reproduce that boundary from the input and the remaining supervision. An uninterrupted run of positive sentiment may offer little direct indication of why the annotators separated the opinions.

The paper’s architecture takes the syllable sequence through embeddings, a bidirectional recurrent layer and a sequence labeler. The tags can then be interpreted as passages in the original comment.

From a Vietnamese review to labeled opinion spans The steps in order.

#### Describe each syllable at several levels

The embedding layer receives the syllables in order and returns a vector for each position. A vector is a fixed-length list of values used to represent the input to the next layer. The simplest experimental setting uses syllable embeddings. This gives the network a learned representation associated with the identity of the syllable. In the stronger settings, the authors also let it use the characters making up that syllable and a representation supplied by XLM-RoBERTa. [Word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/)

The character representation comes from a character LSTM, called CharLSTM in the paper. It supplies information about how a syllable is written. That is a distinct source of evidence from a vector attached to the syllable as a whole. It can represent similarities in character sequences even when the syllables themselves differ. The paper’s experiments ask whether giving the sequence labeler that additional information helps it identify and classify the opinion passages.

The contextual representation comes from XLM-RoBERTa, tested in Base and Large versions. A contextual vector can reflect the surrounding comment as well as the unit being represented. This matters to a span task because the same expression can participate in different judgments depending on where it occurs and what it describes. For instance, the relevant evidence around a mention of the camera can include the words saying whether it focuses quickly or takes poor pictures. The contextual representation makes information from the surrounding text available to the tagger’s input layer.

The selected vectors are concatenated, meaning their values are placed together as one longer representation for the position. The tagger receives the applicable information at every syllable. In the full configuration, it can use the identity of the syllable, its written composition and its context. Its own bidirectional layer can then process the sequence of these combined representations. The experiments begin with the syllable representation, add CharLSTM, and add contextual information to that pair.

#### Carry information forward and backward through the review

The recurrent layer is a long short-term memory network, or LSTM. Its central state is a memory vector that is updated as the network reads the comment. The update can preserve some information from the preceding step, add a candidate contribution from the current step and control how much of the resulting memory is exposed. The gates are vectors of learned values that regulate these operations component by component. The authors build on a sequence-tagging architecture described in [Bidirectional LSTM-CRF for Sequence Tagging](https://md.research.elamur.ai/free/en/papers/huang-2015-bidirectional-lstm-crf-models-sequence/).

The input gate is computed as follows. The notation `e(wₜ)` writes the paper’s embedding at the current step as a function of the input unit.

```
iₜ = σ(Wₕᵢ hₜ₋₁ + Wₑᵢ e(wₜ) + bᵢ)
```

Here `t` is the current step in the traversal, and `t−1` is the preceding step. `iₜ` is the input gate vector. `hₜ₋₁` is the preceding hidden state, and `e(wₜ)` is the input embedding for the current unit `wₜ`. `Wₕᵢ` and `Wₑᵢ` are learned weight matrices for the previous state and the current embedding. `bᵢ` is the learned input gate bias. Juxtaposition with a matrix denotes multiplication by that matrix, and `+` adds the resulting vectors and bias. The sigmoid function `σ` turns the combined values into gate values.

The forget gate has its own parameters.

```
fₜ = σ(Wₕꜰ hₜ₋₁ + Wₑꜰ e(wₜ) + bꜰ)
```

Here `fₜ` is the forget gate at step `t`. `Wₕꜰ` and `Wₑꜰ` weight the previous hidden state `hₜ₋₁` and the embedding `e(wₜ)` for that gate. The subscript `ꜰ` identifies the forget gate parameters, and `bꜰ` is their bias vector. Again `σ` is the sigmoid applied after the additions. The forget gate determines the contribution of the old memory to the update.

Another computation proposes new memory content.

```
c̃ₜ = tanh(Wₕ꜀ hₜ₋₁ + Wₑ꜀ e(wₜ) + b꜀)
```

Here `c̃ₜ` is the candidate memory at step `t`. `Wₕ꜀` and `Wₑ꜀` transform the preceding hidden state `hₜ₋₁` and the current embedding `e(wₜ)`. `b꜀` is the bias for this candidate computation. `tanh` is the hyperbolic tangent activation, applied to each component of the resulting vector. The tilde marks the candidate value, which enters the next computation through the input gate.

The updated memory combines the retained and new information.

```
cₜ = fₜ ⊙ cₜ₋₁ + iₜ ⊙ c̃ₜ
```

Here `cₜ` is the updated memory at step `t`, and `cₜ₋₁` is the preceding memory. `fₜ` and `iₜ` are the forget and input gates, and `c̃ₜ` is the candidate memory. The symbol `⊙` means elementwise multiplication, so each gate value affects the corresponding component of the memory vector. The plus sign adds together the gated contributions from the old memory and the candidate.

The output gate is computed separately.

```
oₜ = σ(Wₕₒ hₜ₋₁ + Wₑₒ e(wₜ) + bₒ)
```

Here `oₜ` is the output gate vector. `Wₕₒ` and `Wₑₒ` weight the preceding hidden state `hₜ₋₁` and the current input embedding `e(wₜ)` for this gate. `bₒ` is the output gate bias. The sigmoid `σ` acts on the sum. The gate controls how the updated memory contributes to the hidden state passed to the next step and made available to the rest of the network.

The hidden state uses the memory after the update.

```
hₜ = oₜ ⊙ tanh(cₜ)
```

Here `hₜ` is the state exposed at step `t`, `oₜ` is the output gate, and `cₜ` is the updated memory. `tanh` transforms the individual memory components, and `⊙` applies the gate to the transformed vector element by element.

In one direction, the hidden state can carry information from earlier in the comment to the current syllable. The forward recurrence is written as follows.

```
h→ₜ = F(e(wₜ), h→ₜ₋₁)
```

Here `h→ₜ` is the forward hidden state at step `t`, as indicated by the right arrow. `F` denotes the LSTM state update, with the memory operations implicit. `e(wₜ)` is the current embedding, and `h→ₜ₋₁` is the hidden state from the previous step in the forward traversal.

The other direction processes the sequence from the end toward the beginning.

```
h←ₜ = F(e(wₜ), h←ₜ₋₁)
```

Here `h←ₜ` is the backward hidden state for the current input, the left arrow indicates reversed traversal, and `F` again denotes the LSTM update on the embedding `e(wₜ)` and the preceding recurrent state. The paper writes `t−1` for this predecessor as well. In a backward traversal it is the step already visited in that direction, which corresponds to text on the later side of the current position in the original comment.

For the representation used by the sequence labeler, the corresponding states are brought together.

```
hₜ = [h→ₜ, h←ₜ]
```

Here `hₜ` is the combined output at the input position, `h→ₜ` is its forward state, and `h←ₜ` is its backward state. The square brackets and comma denote concatenation. In this equation the undecorated `hₜ` names the vector made from both directions. It gives the next layer access to context on either side of the syllable being labeled.

#### Choose tags as a sequence

The conditional random field, or CRF, uses the contextual vectors to score tag sequences. A tag at one location has implications for its neighbors. An inside tag with a battery label, for example, naturally belongs after the start or continuation of a battery span. Scoring the sequence lets the system use that relationship alongside the evidence available at the individual syllable. The recurrent layer supplies information about the words and their context, and the CRF accounts for the way output tags go together.

The training objective rewards high conditional probability for the annotated sequences and penalizes large parameter values.

```
L = ∑ᵢ₌₁ᴺ log(P(yᵢ | xᵢ)) − ∑ₖ₌₁ᴷ (λₖ² / (2σ²))
```

Here `L` is the quantity the CRF training seeks to maximize. The first sum ranges over training examples from `1` to `N`, where `N` is the number of input and label sequences. `xᵢ` is the input sequence for example `i`, and `yᵢ` is its annotated tag sequence. `P(yᵢ | xᵢ)` is the probability assigned to that sequence of tags given the input, with `|` read as “given.” The function `log` takes the logarithm. The second sum ranges over the `K` parameters in the penalty. `λₖ` is parameter `k`, and `σ²` is the variance that scales its squared penalty, with `2` part of the denominator. The minus sign subtracts the penalty from the conditional log-likelihood. In this equation `σ` is a regularization scale. In the gate equations the same symbol names the sigmoid function.

The system’s output can be read as a collection of passages by following the beginning and continuation tags and using the corresponding character locations in the input. For the joint task, the assigned tag also gives both the aspect and the polarity. For the other tasks, the same span can be returned with the single category used in training. This is how a reader gets back from a sequence of syllable-level decisions to the text the benchmark asks the system to recover.

The authors report an embedding dimension of 100, a hidden-layer setting of 400 for the LSTM, dropout of 0.33, and a batch size of 5,000. Dropout suppresses some network activations during training, and batching groups training material for updates. The paper reports 30 epochs, or passes through the training material, and says the experiments use a single NVIDIA T4 GPU. Across the embedding comparisons, the reported architecture remains the BiLSTM-CRF, with the input representation changing according to the setting.

### Experiments and results

#### What the test set asks the system to recover

The authors randomly divide UIT-ViSD4SA into training, development and test partitions in a ratio of 7:1:2. The training split has 7,784 comments, the development split has 1,113, and the test split has 2,225. The corpus as a whole has 11,122 comments and 35,396 labeled spans. The reported average span lengths are 32.6 characters on the training split, 32.4 on development and 32.5 on test. This puts the basic unit of prediction in perspective. The system typically has to identify a short portion within a comment, and there can be several such portions in succession.

The dataset analysis reports that 22.76% of reviews mention GENERAL. It also draws attention to frequent discussion of performance, battery, features and camera. Within the sentiment labels, positive instances are the most numerous, followed by negative and then neutral. This imbalance affects how the evaluation is read. A score that pools predictions can reflect how well the system performs on common cases, while a score that gives equal weight to labels brings performance on less frequent labels into view. The paper reports both views in its [evaluation benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/).

The test has three versions. In the aspect version, the prediction specifies the passage and its aspect. In the polarity version, it specifies the passage and its sentiment. In the joint version, the system identifies the passage and supplies both labels. Changing the inventory affects what the system is trained to predict. For example, the joint experiment distinguishes positive battery passages from negative battery passages and positive camera passages, while the aspect experiment groups both battery polarities under the same battery category.

The paper uses exact span matching. Suppose a system marks an expression about battery life but ends its passage before the end of the annotation. That prediction misses the exact boundary, even if it captures part of the reason for the judgment. A prediction with the correct extent also has to carry the required label. The joint task therefore permits credit only when the location and both parts of the classification agree with the annotation. The paper uses the same general matching principle across the three target inventories.

Precision asks how frequently the spans returned by the system are correct. Recall asks how much of the annotated set the system recovers. F1 combines precision and recall through their harmonic mean, which makes a low value on either side matter. Micro averaging aggregates the decisions across categories. Macro averaging gives categories equal weight and is particularly informative when some labels occur much more frequently than others. The tables report these measures together, so a setting can be better at recovering annotated spans while another has a greater proportion of exact matches among the spans it returns.

#### What the embedding comparisons establish

The baselines are variants of the same syllable-level BiLSTM-CRF. One uses syllable embeddings alone, one adds character embeddings, and the other settings add contextual vectors from XLM-R Base or Large to the syllable and character embeddings. These are comparisons within the authors’ architecture on the newly annotated dataset. The earlier span-based methods discussed in the paper give context for the task and are suggested avenues for subsequent experiments.

UIT-ViSD4SA test set aspect span detection by embedding configuration The Large contextual configuration has the highest macro F1 among the tested settings.

**The numbers**

| System or setting | Macro F1 % |
| --- | --- |
| Syllable | 59.74 |
| Syllable and character | 60.21 |
| Syllable, character and XLM-R Base | 62.17 |
| Syllable, character and XLM-R Large (this paper) | 62.76 |

The aspect task gives the strongest macro F1 result of the three. Its progression is consistent across the tested input configurations, starting at 59.74% with syllables alone and reaching 62.76% with the full Large configuration. The micro F1 scores also rise across the four settings, from 62.65% to 65.89%. In the Large setting, aspect micro recall is 66.85% and micro precision is 64.96%. The Base setting records 65.15% micro recall and 65.63% micro precision. Thus the Large setting recovers more of the annotations, while Base has the strongest micro precision in the aspect comparison.

This difference is useful when interpreting the gains. The change to Large does something visible in the exact-match counts even though the precision column favors Base. A reader interested in the number of source passages recovered should look at recall. A reader using the results to estimate how many displayed spans might require correction should pay attention to precision. F1 captures their joint movement, and the strongest configuration on that measure depends on both.

UIT-ViSD4SA test set polarity span detection by embedding configuration Character embeddings alone give a lower macro F1 than syllables alone, while both contextual configurations score higher.

**The numbers**

| System or setting | Macro F1 % |
| --- | --- |
| Syllable | 41.05 |
| Syllable and character | 40.68 |
| Syllable, character and XLM-R Base | 46.57 |
| Syllable, character and XLM-R Large (this paper) | 49.77 |

For polarity spans, the best macro F1 is 49.77% and the best micro F1 is 58.30%, both from the Large configuration. Its micro precision is 56.89% and its micro recall is 59.78%. The syllable-only configuration has 52.36% micro precision and 50.10% micro recall for the polarity task. The contextual setting thus improves both measures in this comparison. The gap between its macro and micro performance gives a reason to inspect the label-specific results, which differ substantially by sentiment.

UIT-ViSD4SA test set joint aspect and polarity span detection by embedding configuration Macro F1 rises as character and contextual embeddings are added, with the Large configuration ranking highest.

**The numbers**

| System or setting | Macro F1 % |
| --- | --- |
| Syllable | 37.64 |
| Syllable and character | 39.30 |
| Syllable, character and XLM-R Base | 44.37 |
| Syllable, character and XLM-R Large (this paper) | 45.70 |

For joint aspect and polarity, the best macro F1 is 45.70% and the best micro F1 is 62.38%. The Large configuration’s micro recall reaches 62.99%, while aspect and polarity micro precision is 61.78%. The syllable-only configuration has micro precision of 61.87% and micro recall of 54.55%. As in the aspect experiment, the full representation’s stronger F1 accompanies higher recall, with the highest micro precision found in a different setting. The joint experiment also shows a larger separation between the macro and micro views of the same setting than the aspect-only experiment does.

An important detail appears when the polarity and joint columns of the results are read together. In the Large setting, the joint task has the lower macro F1, while the polarity-only task has the lower micro F1. Changing the tag inventory changes the categories used for macro averaging and the sequence-labeling problem the system learns. The two results can therefore move in different directions. A statement about which task was hardest needs to specify the averaging scheme.

#### Which categories account for the spread

The aspect breakdown shows particular strength on camera and battery. The reported exact-span F1 for CAMERA is 76.43%, and the score for BATTERY is 72.29%. DESIGN reaches 69.37%, GENERAL 66.76%, and SCREEN 67.23%. At the lower end, PRICE has 47.35% F1, and STORAGE has 45.90%. The overall score thus describes a test set on which the system recovers some categories much more successfully than others. A scenario centered on complaints about storage would encounter different behavior from one centered on camera feedback.

Precision and recall are relatively close within several of those classes. For CAMERA the paper reports precision of 75.09% and recall of 77.82%. The values for STORAGE are 45.16% and 46.67%, respectively. Storage has weak scores on both measures. The result concerns both how many marked storage passages are exact matches and how many of the benchmark’s storage passages are found. It gives no simple basis for treating one of those outcomes as the sole difficulty of the class.

The polarity breakdown is ordered by positive, negative and then neutral F1. POSITIVE reaches 65.92%, with 63.52% precision and 68.50% recall. NEGATIVE has 47.30% F1, with 47.05% precision and 47.56% recall. NEUTRAL has 36.26% F1, with 36.57% precision and 35.97% recall. The class that appears most often scores highest, and the least frequent class scores lowest. The paper reports that neutral labels account for 6.25% of the dataset and discusses imbalance as a reason to expect difficulty with neutral examples.

The joint labels make the class differences more pronounced. `BATTERY#POSITIVE` reaches 78.40% F1 and `CAMERA#POSITIVE` reaches 77.54%. The corresponding negative scores are 54.62% for battery and 58.97% for camera. On neutral labels, CAMERA has 55.65% and GENERAL has 52.73%, while DESIGN, SER&ACC and STORAGE each have an F1 score shown as 00.00. These are scores for particular combinations of aspect and sentiment. They show that strength on an aspect, or on one polarity of that aspect, tells only part of the story about whether its other opinions can be recovered.

### What the ablations show

#### Character information has a mixed effect on its own

The closest comparison to a component ablation is the progression from syllable embeddings through increasingly rich combinations. The syllable-only and syllable-plus-character settings isolate the addition of the character representation within that progression. On the UIT-ViSD4SA test set, aspect macro F1 goes from 59.74% to 60.21%, and joint macro F1 goes from 37.64% to 39.30%. Polarity macro F1 falls from 41.05% to 40.68%. Character information therefore accompanies a modest improvement on aspects and the joint task, and the answer for polarity depends on what measure is used.

The polarity comparison illustrates that dependence. Adding characters raises test micro F1 from 51.20% to 51.55%. Its macro precision moves from 46.71% to 44.44%, and its macro recall from 38.37% to 38.79%. Read alongside the macro F1, the comparison suggests that extra information about written form can change the balance of the returned predictions without improving performance equally across the labels. The experiments aggregate over many kinds of passages, so this comparison does not identify the particular spellings or expressions affected.

The next step adds XLM-R Base to the syllable and character pair. Test macro F1 rises from 60.21% to 62.17% for aspect, from 40.68% to 46.57% for polarity, and from 39.30% to 44.37% for the joint task. Those results give consistent evidence for the contextual addition under the tested conditions. They specifically compare the existing pair of representations with a combination that also carries contextual information.

Replacing Base with Large raises macro F1 in all three tasks again, and the Large configuration also has the strongest micro F1 for each task. The result supports the paper’s choice of that combination as its main baseline. It leaves an open question about the contribution of character and syllable embeddings once contextual information is available. Because the comparisons add representations in a fixed order, the strong final result measures the package trained and tested together. A contextual-only configuration or a combination that drops characters from the full system would be needed to measure those contributions directly.

There is also a distinction between presenting a comparison and establishing its stability. The table provides a score for each configuration on the same benchmark. It lets a reader see the direction of the changes across tasks and metrics. It gives no spread across repeated runs. The smallest movements, such as the change from adding characters to the polarity setting, can be described as observed score changes under the reported setup.

#### The tag inventory changes how boundaries can be learned

The three target inventories provide a controlled change to what a prediction must say. The same opinion can be learned as camera, positive, or positive camera. The joint task creates a more specific label for the sequence layer to learn. At the same time, including the aspect gives it information that can help distinguish adjacent opinions even if those opinions share a polarity. For instance, two nearby remarks can praise different parts of the device. Aspect information helps explain why they are separate annotations.

The paper’s case study gives an example of a boundary failure. A polarity-only prediction assigns NEUTRAL to a continuous passage containing a comment about the clarity of the screen, a remark about the phone growing warm during gaming and a complaint about speaker noise. The passage covers several pieces of feedback whose subjects change along the way. The authors observe that the joint labeling system identifies boundaries more effectively in the cases they discuss. The polarity-only system must learn those breaks even when the labels it sees during training omit the distinctions among aspects.

These examples are suggestive about supervision. An aspect label can provide a cue about how an opinion is organized, and a sentiment label can express what the reviewer thinks about it. Learning both may encourage the system to recognize a break where the subject changes. The paper illustrates that possibility through predictions, while the aggregate F1 scores still combine boundary recovery with label correctness. The qualitative finding concerns visible decisions about where particular spans start and end.

The per-class results supply another comparison among the tasks. Camera and battery are strong aspect categories, and their positive joint labels also rank highly. Neutral predictions have lower F1 in the polarity breakdown, and several neutral joint categories receive no F1 credit. The authors read these results in light of the uneven sentiment distribution. The analysis ties the rank order to the amount of annotated material available for different labels, although the experiments vary neither class frequency nor the difficulty of the phrases assigned to each class.

#### The case study separates failures that share a score

An exact-match miss can arise in different ways. The system can overlook an opinion entirely, choose the wrong category for a passage it detects, or assign a plausible label to a passage with the wrong boundaries. The case study examines examples of each. This shows what information the headline scores compress. On an exact-match evaluation, a long prediction that swallows several short opinions can hurt both precision and recall, while a wholly omitted opinion contributes a miss without producing an extra passage to inspect.

In one example, systems trained for the different label inventories miss a remark about sound coming from the speaker. The failure leaves an opinion absent from the output, in spite of the changes in whether the system is asked for aspect, polarity or both. The example gives a concrete form to the recall problem. An interface displaying returned passages could leave out the remark regardless of which label inventory it used.

Another review praises dark mode. The benchmark assigns the passage positive PERFORMANCE, while the aspect-only prediction assigns CAMERA and the joint prediction gives positive FEATURES. The joint prediction recovers the favorable attitude but supplies a different subject from the one used by the annotation. The authors connect this case and others they inspected to the presence of English loanwords, particularly in technology reviews. The example also highlights the role of the category definitions. An expression about a software interface has to be mapped to the benchmark’s notion of performance, features or another relevant subject.

The paper’s examples thus help localize problems that would otherwise look identical in the overall metric. Missing the speaker remark calls attention to opinion recall. Assigning dark mode to another category calls attention to interpretation of an expression and its subject. Grouping several remarks into one neutral segment calls attention to boundary placement. The examples establish that these failures occur. They leave their prevalence across the full test set open.

### Limitations

#### Limits the authors identify

The authors regard the reported span detection performance as relatively low. In the aggregate evaluations, the F1 scores remain below 80%. They call particular attention to tasks involving polarity, with test macro F1 of 49.77% for polarity alone and 45.70% when paired with aspect in the strongest embedding configuration. They also identify missed spans, incorrect classifications and boundary errors in their cases. These limits matter for the application that motivated the study because a reader might rely on both the passage selected and its assigned subject.

The authors mark loanwords as a topic for further work. They note that technology feedback in Vietnamese can use borrowed words whose meanings in context may be close to, or differ from, their meanings in the original language. Their dark mode example shows a system assigning the associated opinion to different categories under different training targets. The paper identifies this as a difficulty encountered in the case analysis. It gives no separate performance estimate for the borrowed vocabulary.

They propose improving boundary detection with multilingual pretrained representations and exploring methods inspired by reading comprehension. They also suggest developing a Vietnamese reading comprehension task around reviews with marked evidence. A further set of directions would apply evidence spans in work on complaint analysis, emotion recognition, constructive comments or opinion mining. These proposals follow from the ability to put a location on language that expresses an attitude. The reported experiments concern the smartphone benchmark and its aspect and polarity labels.

#### Limits implied by the evaluation design

The corpus comes from a smartphone feedback dataset collected on a Vietnamese e-commerce site. Its aspect scheme reflects that setting directly, down to categories for battery, storage and service or accessories. The random split tests new comments within the resulting collection. Evidence about transfer to hotel or restaurant reviews, other product categories, or sites whose users write differently would require material beyond that split. The earlier literature on those domains establishes that the underlying task is of interest there, while the particular scores here belong to UIT-ViSD4SA.

The splits are described at the level of comments. The paper gives no separate result for a held-out phone, brand, time period or platform. As a consequence, the test answers a question about comment-level generalization within this corpus. Product names and expressions that recur in one domain can be useful to classification. A test organized around unseen products or a change in review source could place more weight on other cues. There is no such comparison in the reported results.

The annotation agreement threshold applies to the practice rounds. The annotators discuss and vote during this phase, revise the criteria, and later annotate independently. The reported result of over 80% F1 therefore shows that the team met its preparation criterion. The paper describes how agreement can be calculated by label or document but gives no corresponding agreement breakdown for the completed independent annotations. The reader has limited evidence about which categories or boundary decisions remained hardest for annotators after training, and how much disagreement might be expected on the final test set.

The shortest-span rule also requires an interpretive choice about how much evidence to include. An opinion can contain an assertion followed by an explanation, as in the example about battery use and recharging. A reader can understand the subject and attitude from a core phrase, while an annotator may include details that belong to the same assessment. Exact match evaluates whether the prediction follows the benchmark’s boundary decision. The paper presents no measure that assigns partial credit for a useful overlap or distinguishes a boundary error by its extent.

The formal task uses continuous spans and the system uses a single sequence of tags. This is a natural fit for opinions expressed in adjacent syllables. The setup gives no evaluated mechanism for returning disjoint fragments as one opinion, or for representing multiple overlapping tags at the same position. These are properties of the formulation. The paper supplies no counts that would show how frequently these cases arise in the domain or affect the reported performance.

Some implementation details would matter for reproducing the comparisons exactly. The paper explains the use of syllables and the source of the contextual vectors, but gives little detail about alignment between the contextual representation, the syllable sequence and the annotated character offsets. That alignment matters because the vectors must be associated with the positions the tagger can label, and the tagger’s output must be turned back into exact offsets. An implementation that handles punctuation or other joins differently could produce different span boundaries. The results evaluate the authors’ implementation of the conversion and tagging pipeline together.

The embedding comparison gives evidence about configurations inside the BiLSTM-CRF. It does not establish how much each of the recurrent layer and CRF contributes because the paper keeps those layers in place. Nor does the comparison test the direct extraction methods discussed in the related work on the same splits. The highest F1 in the paper identifies the strongest tested configuration on UIT-ViSD4SA. Direct comparison with a boundary-based extractor would be needed to judge whether syllable tagging is preferable for this dataset.

Similarly, the paper’s explanation of low neutral scores is grounded in a visible association with class frequency. Neutral is least common overall and has the lowest polarity F1. The experiments do not adjust the class balance or control for the kinds of language that mark each sentiment. The data therefore support the observation that rare labels performed poorly in this setup, while the cause of each error remains open. Similar caution applies to the loanword analysis, which gives specific cases alongside a hypothesis about a recurring source of errors.

Finally, the experiments measure recovery of annotations, not an outcome for shoppers or businesses. A system could support a review interface by highlighting evidence, and exact matching gives an interpretable test of the quality of those highlights under the annotation rules. How much the highlighting helps someone make a purchase decision or monitor products is a separate question. This paper’s contribution to that application is the dataset, the baseline and the observed patterns of success and error.

### What came after

[ViHOS hate speech span detection](https://md.research.elamur.ai/free/en/papers/hoang-2023-vihos-hate-speech-spans-detection/) cites the paper in work on identifying text spans for a different Vietnamese language task. The common unit is a passage in the input. UIT-ViSD4SA marks the language that expresses an opinion about a product aspect. The ViHOS title places the emphasis on locating language associated with hate speech. In each setting, a span tells the reader which words are at issue.

The citation connects the smartphone study to later work on locating evidence within Vietnamese text. It does not establish reuse of the smartphone reviews, their annotation rules or the BiLSTM-CRF architecture. The connection that can be traced is the task formulation: locating a stretch of language makes the evidence an explicit output, giving a reader something more specific to inspect than a judgment attached to the entire comment.

## Cite

Cite as Kim Nguyen Thi Thanh, Sieu Huynh Khai, Phuc Pham Huynh, Luong Phan Luc, Duc-Vu Nguyen and Kiet Nguyen Van. 2021. Span Detection for Aspect-Based Sentiment Analysis in Vietnamese. Proceedings of the 35th Pacific Asia Conference on Language, Information and Computation.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{thanh2021span,
  title = {{Span Detection for Aspect-Based Sentiment Analysis in Vietnamese}},
  author = {Kim Nguyen Thi Thanh, Sieu Huynh Khai, Phuc Pham Huynh, Luong Phan Luc, Duc-Vu Nguyen and Kiet Nguyen Van},
  booktitle = {Proceedings of the 35th Pacific Asia Conference on Language, Information and Computation},
  year = {2021},
  url = {https://aclanthology.org/2021.paclic-1.34/}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
