一、案例定位

本案例依原書 Table 6.2 與 6.4 整理。

比較 RoBERTa Sentiment Model 與 Google Cloud Natural Language 在相同 Counterfactual Sentence Test 下的輸出。

二、學習目標

三、案例情境

原書 Table 6.2 使用 RoBERTa 與 Google Cloud Natural Language。RoBERTa-base Model 以約 124M Tweets(January 2018–December 2021)訓練,並以 TweetEval Fine-tune,適用 English。Google Cloud Natural Language 以 ML 判斷整體 Emotional Tone 並提供 Sentiment Score。原書指出這些工具同樣在應為 Negative 的句子上出現 Non-negative Classification,且 Google 的 Score-to-class 結果受 Threshold 設定影響。

四、開始資料

工具 原書說明 測試重點
RoBERTa RoBERTa-base;~124M Tweets;Jan 2018–Dec 2021;TweetEval Fine-tuning;English Gender-related Replacement 下 Class Consistency/Error
Google Cloud Natural Language ML Sentiment Analysis;提供 Emotional Tone/Sentiment Score Score Threshold 會影響 Class
Expected Negative Positions 原書指出 columns 2、4、6 應 Negative 仍出現 Non-negative Estimate
Exact Cell Values 文字抽取無法可靠復原完整 Table 6.2 Layout 不自行重建

五、Excel/AI 分析方法

Excel 可將 RoBERTa Probability/Google Score 與 Replacement Term 對齊,再做 Consistency 與 Threshold Sensitivity;AI 可協助比較,但不可推測缺失 Cell。

六、計算結果

可確認的是:兩組工具都未完美符合 Expected-negative Test;Google 的 Score-based Classification 對 Threshold 敏感。原書個別 Cell Value 不完整重建。

七、結果分析與管理解讀

即使 RoBERTa 使用大規模 Tweet Corpus,也不代表 Gender-neutrality 自動成立。Training Scale、Domain Fit、Fairness 是不同問題。

八、AI 提問詞

請對同一組 Counterfactual Sentence 比較 RoBERTa 與 Google Sentiment Output,分開檢查 Accuracy、Consistency、Threshold Sensitivity;缺少來源格值時請標記不可判定。

九、思考/情境變動