SoochowDS at ROCLING-2021 Shared Task: Text Sentiment Analysis Using BERT and LSTM

986

Authors

nan

Abstract

AbstractIn this shared task, this paper proposes a method to combine the BERT-based word vector model and the LSTM prediction model to predict the Valence and Arousal values in the text. Among them, the BERT-based word vector is 768-dimensional, and each word vector in the sentence is sequentially fed to the LSTM model for prediction. The experimental results show that the performance of our proposed method is better than the results of the Lasso Regression model.

Keywords

nan

Full Content

摘要 在這次的挑戰賽中,本研究提出結合 BERT-based 詞向量模型和 LSTM 預測 模型進行文本 Valence和 Arousal數值預 測。其中 BERT-based 詞向量為 768 維, 並依序將文句中每個詞向量依序輸入 LSTM 模型中進行預測。實驗結果得知 我們所提出的 BERT 結合 LSTM 模型遠 優於 Lasso Regression 回歸模型的結果。 Abstract In this shared task, this paper proposes a method to combine the BERT-based word vector model and the LSTM prediction model to predict the Valence and Arousal values in the text. Among them, the BERT- based word vector is 768-dimensional, and each word vector in the sentence is sequentially fed to the LSTM model for prediction. The experimental results show that the performance of our proposed method is better than the results of the Lasso Regression model. 關鍵字:BERT、LSTM、Lasso Regression Keywords: BERT、LSTM、Lasso Regression 1 Introduction 情緒分析是一個非常熱門的研究領域,學者 們提出許多創新方法去分析和預測。公司可 以根據資料(如產品留言),進行顧客對產品的 評價分析或尋找產品銷售問題,以便提高銷 售量等。在文字情緒分析中,學者們採用兩 大指標,別是 Valence 和 Arousal,進行文本情 緒分析。其中 Valence 主要是區別情感正向與 負向,而 Arousal 則是判斷情感是沉靜還是喚 起。這兩大指標普遍用於檢測與識別文本情 感訊息。如”最近上課遇到很多問題,情緒低 落”對應的 Valence 和 Arousal 分別為 1.75 和 5.64。 會議紀錄對市場走勢起著重要作用,因為 它們提供了對市場走勢的鳥瞰圖。 因此,人 們越來越有興趣從大型金融文本中分析和提 取各個方面的情緒以進行經濟預測。然而由 於 缺 乏 大 型 標 記 數 據 集 ,Aspect-based Sentiment Analysis (ABSA) 並未廣泛用於金融 數據。於是 Wang [1] 提出一個模型來訓練 ABSA 的金融文件,並分析其對各種宏觀經濟 指標的預測能力。Wang [1] 運用 FinBERT技術 合併文字來達到文件級別的分析。其實驗結 果顯示 Federal Open Market Committee (FOMC) 的報告文件可以解釋63%市場的成長率,員工 的情緒與通貨膨脹能解釋47%和19%相對應的 經濟因數。 網路的普及創造了一個振興的數位媒體。 隨著新聞點擊次數驅動的貨幣化,在網路新 聞競爭激烈的氛圍中,記者們調整他們的報 告以適應這樣的氛圍。由此產生的消極偏見 是有害的,會導致焦慮和情緒障礙。Kumar 等 人 [2] 在各種數據集上訓練 4 個管線化情感分 析模型(Sequential、LSTM、BERT 和 SVM 模 型)。 經過組合後,行動裝置 APP 只顯示會鼓 舞人心的故事供用戶閱讀。結果顯示有 1,300 名用戶對該 APP 評價為 4.9 星,85% 的用戶回 饋通過使用此 APP 改善了心理健康。 由於來自不同文化和教育背景的人對網路 的使用呈指數增長,具仇恨攻擊的線上言論 偵測已成為當今的一個關鍵問題。區分文本 消息是否屬於仇恨言論和攻擊性語言是自動 檢測文本內容的關鍵挑戰。Bencheng 等人 [3] 提出一種將推文自動分類為三類的方法:仇 恨、攻擊性和兩者都不是。他們利用公共推 文數據集,首先進行實驗構建 BERT-based embedding 結合 Bi-Directional Long Short-Term Memory (BI-LSTM) 模型,然後他們也嘗試使 SoochowDS at ROCLING-2021 Shared Task: Text Sentiment Analysis Using BERT and LSTM Ruei-Cyuan Su, Sing-Seong Chong, Tzu-En Su and Ming-Hsiang Su Soochow University, Taiwan 70613rex, chongzhishan123, 70614roy, huntfox.su@gmail.com The 33rd Conference on Computational Linguistics and Speech Processing (ROCLING 2021) Taoyuan, Taiwan, October 15-16, 2021. The Association for Computational Linguistics and Chinese Language Processing 375 用預訓練的 Glove-based embedding結合相同的 神經網絡架構。實驗考慮不同的神經網絡架 構、學習率和歸一化方法,對他們所提之 BI- LSTM 模型進行超參數調整分析。在調整模型 並使用最佳參數組合後,在測試數據上對其 進行評估時達到了 92% 以上的準確率。在參 考上述研究後,本研究提出結合 BERT-based 詞向量模型和 LSTM 模型進行訓練,以完成 Valence 和 Arousal 文本預測。 2 資 資料集說明 本研究第一個採用的是 CVAT 1.0 及 CVAT 2.0 中文維度情感語料庫 [4],是一個情感語料庫。 其中包含從網路中提取的 2,969 的條列句子 (CVAT 2.0)及 2,009 的條列句子(CVAT 1.0),並 且分為六個不同類別:新聞文章、政治論壇、 汽車論壇、酒店評論、書評和筆記本電腦評 論。每個句子都用人工分類的方式標明了 Valence 和 Arousal 之維度的實值分數。這兩個 維度的範圍從 1(高度消極或平靜)到 9(高 度積極或興奮)。本研究第二個採用的是 CVAW 4.0中文維度情感詞典,包含了 5,512 個 單詞。每個單詞都使用人工分類的方式標明 Valence 和 Arousal 維度的實值分數。本研究第 三個採用的是 CVAP 2.0 中文維度情感片語, 包含 2,998 個多詞短語。每個短語由一個情感 詞和一個或多個修飾詞組成,例如修飾詞的 否定詞、情態詞和程度副詞。最後再使用測 試資料來完成 Valence 和 Arousal 文本預測。 3 System framework 在系統架構說明中,本研究首先使用 Jiba 斷詞 工具將 CVAT 1.0 及 CVAT 2.0 這兩個資料集進 行斷詞處理。本研究使用了中文維度情感辭 典 CVAW、中文維度型情感片語 CVAP 資料集、 地名或人名等加入 Jiba 的字典裡,使斷詞更加 正確。接著本研究以 word2vector, doc2vector 和 BERT 進行詞向量模型訓練。最後分別進行 Lasso Regression 和 LSTM 模型對 Valence 和 Arousal 進行訓練,並用以預測測試集得到 Valence 和 Arousal 的結果。 3.1 斷詞模型 目前中文有兩個斷詞模型可用,一個是 Jieba 斷詞工具,而另一個是中研院的 CKIP 斷詞工 具。本研究分析使用 Jieba 斷詞工具,這個工 具有 python 的介面,使用上非常容易,可輸 入繁體字典。 因 Jiba 的本身斷詞效果有限, 因此本研究加入中文維度情感辭典 CVAW、 中文維度型情感片語 CVAP 資料集。實驗結果 發現加入字典的地名、人名、專業名稱並無 有效修正,因此本研究再整理出應修正的名 稱加入字典,得到正確的斷詞結果。 3.2 詞向量模型 Word2Vector [5]是輕量級的神經網絡,其模型 僅僅包括輸入層、隱藏層和輸出層,模型框 架根據輸入輸出的不同,主要包括 CBOW 和 Skip-gram 模型。CBOW 的方式為知道詞��的 上下文����, ����, ����, ����的情況預測當前 詞��,而 Skip-gram 則是知道了詞��的情況, 對詞的上下文����, ����, ����, ����進行預測。 首先介紹 Simple CBOW Mode,在我們的設 置中,詞彙量大小為�隱藏層大小為�。輸入 �是一層 one-hot representation vector,這意味 著對於給定的輸入上下文詞{�� … ��},裡面共 �個單元,其中只有一個為 1,所有其他單元 為 0。例如� = [0, … ,1, … ,0]。輸入層和輸出層 之間的權重可以用一個V × N矩陣W表示。 ��×� = {���}的每一行是輸入層關聯詞的�維 向量表示��。給定一個上下文(一個詞),假 設 �� = 1, ��� = 0, � � ��,得 � = ��� = �(�,�) � � ��� � (1) 這只是將�的第�行複製到 �。���是輸入詞 wI的向量表示。從隱藏層至輸出層,權重矩 陣為 ��×� � = {��� � } (2) …

Content truncated to 500 words

Labeled Text

AbstractIn this shared task, this paper proposes a method to combine the BERT-based word vector model and the LSTM prediction model to predict the Valence and Arousal values in the text. Among them, the BERT-based word vector is 768-dimensional, and each word vector in the sentence is sequentially fed to the LSTM model for prediction. The experimental results show that the performance of our proposed method is better than the results of the Lasso Regression model.

Publication Details

Paper ID:
986
Year:
2021
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan