codeswitching-sentiment-bias-results-v1
收藏资源简介:
该数据集名为codeswitching-sentiment-bias-results-v1,包含了一项实验的结果,该实验研究了在双语推文中单词语码转换(英语与西班牙语之间)对情感预测的影响。数据集基于SemEval 2020 Task 9语料库中的3,483条真实双语推文。实验使用了`cardiffnlp/twitter-roberta-base-sentiment-latest`模型和SHAP解释性方法。数据集包含原始推文、扰动后的推文、转换的单词、情感标签及分数、SHAP值等详细字段。实验结果表明,单词语码转换会导致情感预测的显著变化,其中38.4%的样本情感分数变化超过0.05,13.7%的样本情感标签发生变化。数据集适用于研究NLP模型中的语言依赖性偏见和语码转换对情感分析的影响。
The dataset named codeswitching-sentiment-bias-results-v1 contains the results of an experiment investigating the impact of single-word code-switching between English and Spanish on sentiment prediction in bilingual tweets. It is based on 3,483 real bilingual tweets from the SemEval 2020 Task 9 corpus. The experiment utilized the `cardiffnlp/twitter-roberta-base-sentiment-latest` model and the SHAP interpretability method. The dataset includes detailed fields such as original tweets, perturbed tweets, converted words, sentiment labels and their corresponding scores, as well as SHAP values. Experimental results demonstrate that single-word code-switching can induce significant changes to sentiment prediction: 38.4% of samples have sentiment score changes exceeding 0.05, while 13.7% of samples see their sentiment labels altered. This dataset is a valuable resource for researching language-dependent biases in NLP models and the impact of code-switching on sentiment analysis.
数据集概述:codeswitching-sentiment-bias-results-v1
该数据集记录了实验1的完整结果,旨在探究NLP模型是否存在语言依赖偏见——即在双语推文中将单个单词在英语和西班牙语之间互换,是否会显著改变模型的情绪预测结果。
实验设计
- 假设:NLP模型编码了语言依赖的偏见。在双语推文中互换一个单词(英语↔西班牙语)会可测量地改变模型的情绪预测。
- 模型:
cardiffnlp/twitter-roberta-base-sentiment-latest - 可解释性方法:SHAP(分区解释器,背景样本数=100)
- 输入数据集:基于 SemEval 2020 Task 9 语料库的 3,483 条真实双语推文
关键结果
| 指标 | 数值 |
|---|---|
| 尝试处理行数 | 3,483 |
| 成功处理行数 | 3,360 |
| 因翻译冲突跳过 | 117 |
| 无可翻译单词跳过 | 6 |
| 平均 | Δ |
| 最大 | Δ |
| Δ | |
| 标签改变的行数 | 459 / 3,360(13.7%) |
| 英语→西班牙语互换 | 1,648 |
| 西班牙语→英语互换 | 1,712 |
| SHAP排名=1(单词贡献最大) | 2,590 / 3,360(77.1%) |
| SHAP排名>1 | 770 / 3,360(22.9%) |
数据列说明
| 列名 | 说明 |
|---|---|
sentence_id |
在原始筛选数据集中的行索引(0-based) |
original_sentence |
原始双语推文文本 |
perturbed_sentence |
将一个单词通过 Helsinki-NLP 翻译互换后的推文 |
swapped_word |
被翻译并替换的源单词 |
translation |
翻译后的替换单词(若跳过则为 null) |
swap_direction |
互换方向:en→es 或 es→en |
shap_rank |
被互换单词在原始句子中按 |
original_sentiment_label |
互换前的情绪标签:positive/neutral/negative |
original_sentiment_score |
原始标签的置信度得分 [0,1] |
perturbed_sentiment_label |
互换后的情绪标签 |
perturbed_sentiment_score |
互换后标签的置信度得分 [0,1] |
sentiment_delta |
原始得分 − 互换后得分(有符号) |
label_changed |
互换后情绪标签是否改变 |
original_shap_values |
原始句子中 token → SHAP 值的字典 |
perturbed_shap_values |
互换后句子中 token → SHAP 值的字典 |
skip_reason |
跳过原因:translation_collision / no_translatable_word / 处理成功则为 null |
数据来源与实验参数
- 实验名称:codeswitching-sentiment-bias
- 作业编号:torch:7074434
- 集群:torch
- 制品状态:final
- 输入数据集:bermaneh/codeswitching-sentiment-bias-canary-v1
- 超参数:n_rows=3483, random_seed=42, min_word_len=2, max_new_tokens=20, shap_background_size=100
许可证
该数据集使用 MIT 许可证。





