I Wish I Would Have Loved This One, But I Didn't -- A Multilingual Dataset for Counterfactual Detection in Product Reviews

James O’Neill, Polina Rozenshtein, Ryuichi Kiryo, Motoko Kubota, Danushka Bollegala · DOI

Abstract

Counterfactual statements describe events that did not or cannot take place. We consider the problem of counterfactual detection (CFD) in product reviews. For this purpose, we annotate a multilingual CFD dataset from Amazon product reviews covering counterfactual statements written in English, German, and Japanese languages. The dataset is unique as it contains counterfactuals in multiple languages, covers a new application area of e-commerce reviews, and provides high quality professional annotations. We train CFD models using different text representation methods and classifiers. We find that these models are robust against the selectional biases introduced due to cue phrase-based sentence selection. Moreover, our CFD dataset is compatible with prior datasets and can be merged to learn accurate CFD models. Applying machine translation on English counterfactual examples to create multilingual data performs poorly, demonstrating the language-specificity of this problem, which has been ignored so far.

Introduction

Counterfactual statements describe events that did not happen or are impossible (e.g., "I would have given this five stars if the battery lasted longer"). In the context of e-commerce, these statements are highly valuable for sentiment analysis and information retrieval. However, they pose a significant challenge for Natural Language Processing (NLP). A standard search engine might identify keywords like "five stars" and "battery" and rank a product positively, missing the crucial "if" that signals dissatisfaction.

Detecting these statements is difficult because they are linguistically diverse and relatively rare in natural language, often appearing in less than 2% of random sentences. Prior research was largely limited to English and focused on narrow domains like news or social media. This paper addresses this gap by providing a high-quality, professionally annotated dataset specifically for the e-commerce domain across three major languages: English, German, and Japanese.

Methods

The authors modeled Counterfactual Detection (CFD) as a binary classification task. To build the dataset, they employed a two-iteration collection process:

  1. Cue-phrase selection: Identifying sentences containing specific "clue" words (like "wish" or "would have").
  2. Similarity-based expansion: To avoid "cue-phrase bias"—where a model only learns to look for specific words—they used mBERT embeddings and k-means clustering to find semantically similar sentences that did not contain those specific keywords.

For modeling, they compared traditional approaches, such as Support Vector Machines (SVM) using Bag-of-Words, against state-of-the-art transformer models including mBERT, XLM, and XLM-RoBERTa. They also conducted "masking" experiments, where clue phrases were hidden during training to determine if the models were learning the underlying logic of counterfactuals or simply memorizing keywords.

Datasets

The study introduces a new benchmark based on Amazon product reviews. Unlike previous datasets that relied on crowdsourcing, this dataset was annotated by professional linguists to ensure high quality.

Dataset statistics showing the distribution of positive and negative examples across languages.

The dataset includes:

  • English (EN & EN-ext): 5,023 sentences in the core set, expanded to 10,000 in the extended version.
  • German (DE): 7,000 sentences.
  • Japanese (JP): 7,000 sentences.

The authors also demonstrated that their data is compatible with the existing SemEval-2020 CFD dataset, allowing for merged training sets to improve model performance.

Key Results and Insights

The transformer-based models, particularly XLM-RoBERTa, achieved the best results across almost all datasets. In English, the models reached F1 scores as high as 0.96 when combining the new dataset with SemEval data.

Classification quality when combining the new Amazon dataset with the SemEval benchmark.

Key insights from the experiments include:

  • Contextualized Embeddings: Contextualized embeddings (like those from BERT) significantly outperformed non-contextualized ones, confirming that counterfactuals are deeply dependent on surrounding text.
  • The Translation Trap: Machine Translation (MT) is not a shortcut. Training a model on English data and testing it on machine-translated German or Japanese performed poorly. Counterfactuals are expressed through specific grammatical structures that MT often misrepresents.
  • Robustness to Bias: Models were surprisingly robust to selection bias. Masking experiments revealed that while performance drops slightly when keywords are hidden, the models still achieve strong F1 and MCC (Matthews Correlation Coefficient) scores, suggesting they learn deeper semantic dependencies rather than just identifying keywords.

Conclusion

While the models performed well overall, Japanese remains the most challenging language for CFD, likely due to its complex system of verb and adjective inflections. Future work will focus on expanding the dataset to more languages, investigating potential social biases in pretrained models, and improving tokenization strategies for morphologically rich languages to better capture counterfactual markers.

Summary updated

BibTeX
@inproceedings{oneill2021i,
  author = {James O’Neill and Polina Rozenshtein and Ryuichi Kiryo and Motoko Kubota and Danushka Bollegala},
  title = {{I Wish I Would Have Loved This One, But I Didn't -- A Multilingual Dataset for Counterfactual Detection in Product Reviews}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.568},
}
Figure