Cross-lingual Aspect-based Sentiment Analysis with Aspect Term Code-Switching

Wenxuan Zhang, Ruidan He, Haiyun Peng, Lidong Bing, Wai Lam

Abstract

Aspect-based Sentiment Analysis (ABSA) is a fine-grained sentiment analysis task that identifies specific aspects and their polarities within text. While high-quality labeled datasets exist for English, manual annotation for other languages is costly. This paper presents a novel framework for unsupervised cross-lingual ABSA. We introduce an alignment-free label projection method to mitigate noise from word-alignment tools and an Aspect Code-Switching (ACS) mechanism to align cross-lingual representations. Furthermore, we employ knowledge distillation on unlabeled target language data to capture language-specific nuances. Experimental results on the SemEval-2016 benchmark demonstrate that our approach significantly outperforms existing baselines and approaches the performance of supervised models.

Introduction

The goal of ABSA is to extract aspect terms (e.g., "food", "service") and determine the sentiment expressed toward them. In a globalized economy, performing ABSA across multiple languages is crucial. However, the lack of labeled data in non-English languages necessitates unsupervised cross-lingual transfer. Standard approaches often rely on "translate-then-align" methods, which are prone to errors due to inaccurate word alignment in informal reviews. Additionally, zero-shot models often fail to capture language-specific expressions. We address these challenges by proposing a robust alignment-free projection and a code-switching strategy that treats aspect terms as anchors for cross-lingual alignment.

Methodology

Alignment-free Label Projection

To avoid the inaccuracies of external word-alignment tools, we propose an alignment-free projection method. During the translation of source English sentences to the target language, aspect terms are wrapped in unique markers (e.g., [food]). The translation engine preserves these markers, allowing for precise identification of aspect boundaries in the target language output without requiring explicit alignment.

Aspect Code-Switching (ACS)

The ACS mechanism generates "code-switched" training examples by swapping English aspect terms with their translated target language equivalents within English contexts, and vice versa. This process, illustrated in Figure 1, forces the model to map the semantic representations of aspects across languages, effectively using them as anchors to bridge the embedding space.

Overview of the Aspect Code-Switching (ACS) and alignment-free label projection process.

Knowledge Distillation

To further adapt the model to the target language's unique characteristics (e.g., slang), we utilize knowledge distillation. An ACS-trained "teacher" model generates soft labels for a large corpus of unlabeled target language text. A "student" model is then trained on these labels, allowing it to learn from authentic target language distributions while inheriting the task-specific knowledge of the teacher.

Experimental Setup

We evaluate our framework on the SemEval-2016 dataset, using English (EN) as the source and French (FR), Spanish (ES), Dutch (NL), and Russian (RU) as target languages. We simulate an unsupervised setting by discarding labels for the target language training sets. We use mBERT and XLM-R as the underlying multilingual encoders.

Results and Discussion

Our proposed methods, ACS-Distill-S (Single-teacher) and ACS-Distill-M (Multi-teacher/Multilingual), show substantial improvements over baselines. As shown in the results table, our method improves the average F1 score on XLM-R from 59.84 (Zero-Shot) to 63.73.

Performance comparison of the proposed ACS-Distill methods against supervised and zero-shot baselines.

The results highlight two key findings:

  1. Alignment-free projection provides a cleaner training signal than traditional alignment, leading to an 8-10% F1 improvement over standard translation baselines (e.g., Translation-TA).
  2. Code-switching and distillation effectively close the gap with supervised learning. The combination of these strategies allows the model to reach performance levels remarkably close to the fully supervised upper bound of 67.15.

Conclusion

This work demonstrates that high-quality cross-lingual ABSA is achievable without target-language labels. By combining alignment-free translation, aspect-level code-switching, and knowledge distillation, we provide a robust framework for fine-grained sentiment analysis in low-resource settings. Future work will explore applying these "anchor-based" strategies to other sequence labeling tasks such as Named Entity Recognition.

Summary updated

BibTeX
@inproceedings{zhang2021cross,
  author = {Wenxuan Zhang and Ruidan He and Haiyun Peng and Lidong Bing and Wai Lam},
  title = {{Cross-lingual Aspect-based Sentiment Analysis with Aspect Term Code-Switching}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.727},
}
Figure