[๋…ผ๋ฌธ ๋ฆฌ๋ทฐ] Aspect-Based Sentiment Analysis Using BERT

๐ŸŠ ๋…ผ๋ฌธ ๋งํฌ: https://aclanthology.org/W19-6120.pdf

Hoang, M., Bihorac, O. A., & Rouces, J. (2019). Aspect-based sentiment analysis using bert. In Proceedings of the 22nd nordic conference on computational linguistics (pp. 187-196).


   ๊ธฐ์กด ๊ฐ์„ฑ๋ถ„์„ ๊ธฐ๋ฒ•์€ ๋ฆฌ๋ทฐ ํ…์ŠคํŠธ์˜ ์ „๋ฐ˜์ ์ธ ๊ฐ์„ฑ (overall sentiment)๋งŒ์„ ์˜ˆ์ธกํ•œ๋‹ค. ๋”ฐ๋ผ์„œ ์†Œ๋น„์ž๊ฐ€ ๊ฐ ์†์„ฑ, entity์— ๋Œ€ํ•ด ๋‹ค์–‘ํ•˜๊ฒŒ ํ‘œํ˜„ํ•œ ๊ฐ์„ฑ์„ ํ’๋ถ€ํ•˜๊ฒŒ ๋ฐ˜์˜ํ•˜์ง€ ๋ชปํ•œ๋‹ค. Aspect-based-sentiment anlaysis (ABSA)๋Š” ํ…์ŠคํŠธ ๋‚ด ๋“ฑ์žฅํ•˜๋Š” ์—ฌ๋Ÿฌ ์†์„ฑ๋“ค์— ๋Œ€ํ•œ ๊ฐ์„ฑ์„ ์ง์ ‘์ ์œผ๋กœ ํ•™์Šตํ•˜๊ณ  ์˜ˆ์ธกํ•˜๋Š” ๊ธฐ๋ฒ•์ด๋‹ค. ๋…ผ๋ฌธ์— ๋”ฐ๋ฅด๋ฉด ABSA task๋Š” ํฌ๊ฒŒ ๋ฆฌ๋ทฐ์— ๋‚˜ํƒ€๋‚œ aspect๋ฅผ ์ฐพ๋Š” ๊ฒƒ๊ณผ ๊ฐ aspect์— ๋Œ€ํ•œ sentiment๋ฅผ ์˜ˆ์ธกํ•˜๋Š” ๋‘ ๊ฐ€์ง€๋กœ ๋‚˜๋‰œ๋‹ค. ๋ณธ ๋…ผ๋ฌธ์€ BERT๋ฅผ ABSA ๊ธฐ๋ฒ•์— ์ ์šฉํ•˜๊ณ , ์—ฌ๋Ÿฌ ์‹คํ—˜์„ ํ†ตํ•ด SemEval-2016 (task 6) ๋“ฑ์—์„œ SOTA๋ฅผ ๋‹ฌ์„ฑํ•œ๋‹ค. ๋˜ํ•œ ์—ฌ๋Ÿฌ ๋„๋ฉ”์ธ (out-of-domain)์— ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋ธ์„ ์ œ์‹œํ•œ๋‹ค.

์œ„ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด Location aspect์— ๋Œ€ํ•ด์„œ๋Š” ๊ธ์ •์ ์œผ๋กœ ํ‰๊ฐ€ํ–ˆ์ง€๋งŒ, Food aspect์— ๋Œ€ํ•ด์„œ๋Š” ๋ถ€์ •์ ์œผ๋กœ ํ‰๊ฐ€ํ•œ ๋ฆฌ๋ทฐ๋Š” overall sentiment๋งŒ์œผ๋กœ ํ‘œํ˜„๋˜๊ธฐ ์ œํ•œ๋œ๋‹ค. ๋”ฐ๋ผ์„œ ABSA๋ฅผ ํ†ตํ•ด ๋ณด๋‹ค ํ’๋ถ€ํ•œ ๊ฐ์„ฑ์„ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

1. Introduction


  ๊ฐ์„ฑ๋ถ„์„์€ opinion mining์ด๋ผ๊ณ ๋„ ๋ถˆ๋ฆฌ๋ฉฐ, ํ…์ŠคํŠธ๋ฅผ ๊ธ์ •, ๋ถ€์ •, ์ค‘๋ฆฝ์œผ๋กœ ๋ถ„๋ฅ˜ํ•˜๋Š” NLP์˜ ์ฃผ์š” ๋ถ„์•ผ์ด๋‹ค. ์ „ํ†ต์ ์ธ ๊ฐ์„ฑ๋ถ„์„์€ ํ…์ŠคํŠธ์— ๋Œ€ํ•œ overall sentiment๋ฅผ ์˜ˆ์ธกํ•˜๋Š” ๊ฒƒ์— ํฌ์ปค์Šค๋ฅผ ๋งž์ถ”์—ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ ๊ฐ์„ฑ์ด '์–ด๋–ค ๊ฒƒ'์— ๋Œ€ํ•œ ๊ฐ์„ฑ์ธ์ง€๋Š” ๊ณ ๋ ค๋˜์ง€ ์•Š์•˜๋‹ค. (Traditional sentiment analysis focuses on classifying the overall sentiment expressed in a text without specifying what the sentiment is about.) ์ „ํ†ต์ ์ธ ๊ฐ์„ฑ๋ถ„์„์€ ์œ„ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด ๋‹ค์–‘ํ•œ topics ๋˜๋Š” entities (๋˜๋Š” aspects)์— ๋‚˜ํƒ€๋‚œ ๊ฐ๊ฐ์˜ ๊ฐ์„ฑ๋“ค์„ ๋ถ„๋ฅ˜ํ•ด๋‚ด์ง€ ๋ชปํ•œ๋‹ค. ABSA๋Š” SemEval-2014 workshop์—์„œ๋ถ€ํ„ฐ ๋ฐœ์ „๋˜์–ด ์™”๊ณ , ๋จธ์‹ ๋Ÿฌ๋‹, ๋”ฅ๋Ÿฌ๋‹ ๋“ฑ ์—ฌ๋Ÿฌ ๊ธฐ๋ฒ•์œผ๋กœ ์†์„ฑ๊ธฐ๋ฐ˜ ๊ฐ์„ฑ๋ถ„์„์— ๊ด€ํ•œ ์—ฐ๊ตฌ๊ฐ€ ์ง„ํ–‰๋˜์—ˆ๋‹ค. ๋ณธ ๋…ผ๋ฌธ์—์„œ๋Š” BERT๋ฅผ ๋ฒ ์ด์Šค ๋ชจ๋ธ๋กœ ์‚ฌ์šฉํ•œ ABSA ๋ชจ๋ธ์„ ์ œ์‹œํ•˜์˜€๋‹ค. ์ด๋•Œ ์ถ”๊ฐ€์ ์ธ ๋ฐ์ดํ„ฐ ๋ฆฌ์†Œ์Šค๋ฅผ ๋งŒ๋“œ๋Š” ์ž‘์—…๋„ ์ง„ํ–‰ํ•˜์˜€๋‹ค. ๋…ผ๋ฌธ์— contributions๋Š” ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

  • ๋ฌธ์žฅ, ํ…์ŠคํŠธ ๋ ˆ๋ฒจ๋กœ ์—ฌ๋Ÿฌ ๋„๋ฉ”์ธ์˜ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์ƒˆ๋กœ์šด ABSA ๋ชจ๋ธ์„ ์ œ์‹œํ•œ๋‹ค.
  • Contextual word representaions ๊ธฐ๋ฒ•์ธ BERT๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ sentence pair classification task๋ฅผ ํ†ตํ•ด ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ ์‹œํ‚จ๋‹ค.
  • Aspect classification๊ณผ sentiment classification์— ๋™์‹œ์— ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋‹จ์ผ combined ๋ชจ๋ธ์„ ์ œ์‹œํ•œ๋‹ค.

 

2. State-of-the-art


2.1 BERT

  Pre-trained language ๋ชจ๋ธ์ธ BERT๋Š” ๋ฌธ์žฅ์—์„œ ๊ฐ ๋‹จ์–ด๋“ค์˜ ๋ฌธ๋งฅ์„ ์–‘๋ฐฉํ–ฅ์œผ๋กœ ๋™์‹œ์— ๊ณ ๋ คํ•˜๋Š” ์–ธ์–ด ๋ชจ๋ธ์ด๋‹ค. ๋ณธ ๋…ผ๋ฌธ์—์„œ ๋ฒ ์ด์Šค ๋ชจ๋ธ๋กœ BERT๋ฅผ ์‚ฌ์šฉํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ž์„ธํ•˜๊ฒŒ ์„ค๋ช…๋˜์–ด ์žˆ๋‹ค. Previous work ์„น์…˜์—๋Š” RNN, LSTM, ELMo ๋“ฑ NLP ์–ธ์–ด ๋ชจ๋ธ๋“ค์˜ ๊ธฐ์กดใ…‡ ์—ฐ๊ตฌ๋“ค์ด ์–ธ๊ธ‰๋˜์—ˆ๋‹ค. Input Representation / Transformers / Sentence Pair Classifier Task / Masked Language Model BERT / Next Sentence Predition ์„น์…˜๋“ค์—์„œ๋Š” ๋ฒ„ํŠธ์— ๋Œ€ํ•œ ๊ธฐ๋ณธ์ ์ธ ์„ค๋ช…์„ ํ•œ๋‹ค. 

2.2 Aspect-Based Sentiment Analysis

  ABSA๋Š” ํ…์ŠคํŠธ์— ์–ธ๊ธ‰๋œ attributes or entity์˜ aspects๋ฅผ ๋ถ„๋ฅ˜ํ•˜๋Š” task์ด๋‹ค. SemEval-2016 ABSA task์˜ ๋ชฉํ‘œ๋Š” ์†Œ๋น„์ž ๋ฆฌ๋ทฐ์—์„œ ํ•œ ํ† ํ”ฝ์˜ aspcet์— ํ‘œํ˜„๋œ sentiment๋ฅผ ์˜ˆ์ธกํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ๊ตฌ์ฒด์ ์œผ๋กœ ํŠน์ •ํ•œ ์ฃผ์ œ (laptop, restaurant)๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ SemEval-2016์˜ ๋ชฉํ‘œ๋Š” ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

 

- Aspect categoty classification

(topic - aspect) pair๋ฅผ ์ฐพ๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋•Œ ํŽ˜์–ด๋ฅผ (E#A)๋กœ ํ‘œํ˜„ํ•˜๊ณ , ํ† ํ”ฝ, ์†์„ฑ๋“ค์€ ๋ฏธ๋ฆฌ ์ •์˜๋˜์–ด ์žˆ๋‹ค.

์˜ˆ์‹œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. topic-> (e.g. LAPTOP, RESTAURANT, FOOD), aspects → (e.g. PRICE, QUALITY)

 

- Opinion target expression(OTE)

๋ฏธ๋ฆฌ ์ •์˜๋œ (E#A)์— ๋Œ€ํ•ด์„œ ์˜๋ฏธ๋ก ์  ํ‘œํ˜„์„ ์ถ”์ถœํ•˜๋Š” ์ž‘์—…์ด๋‹ค. OTE๋Š” ์‹œํ€€์Šค์—์„œ ํ•˜๋‚˜์˜ starting๊ณผ ending ์˜คํ”„์…‹์œผ๋กœ ์ •์˜๋œ๋‹ค. ๋งŒ์•ฝ ๋ช…์‹œ์ ์œผ๋กœ ์–ธ๊ธ‰๋œ entity๊ฐ€ ํ•˜๋‚˜๋„ ์—†๋‹ค๋ฉด "NULL" ๊ฐ’์„ ๋ฆฌํ„ดํ•œ๋‹ค.

 

- Sentiment polarity classification

(E#A)์™€ OTE๊ฐ€ ์žˆ์„ ๋•Œ ๊ฐ์„ฑ์„ ์˜ˆ์ธกํ•œ๋‹ค. ์ด๋•Œ ๋ฆฌํ„ด ๊ฐ’์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. sentiment polarity set = {positive, negative, neutral, conflict}

 

 - Examples

"The So called laptop runs to slow and I hate it!"

{LAPTOP#OPERATION_PERFORMANCE, negative}, {LAPTOP#GENERAL, negative}


"Chow fun was dry; pork shu mai was more than usually greasy and had to share a table with loud and rude family."

{FOOD#QUALITY, "Chow fun", negative, from=0, to=8}, {FOOD#QUALITY, "pork shu mai", negative, from=18, to=30}

 

- Subtasks

Subtask 1, 2๋Š” ๊ฐ๊ฐ ๋ฌธ์žฅ ๋‹จ์œ„์—์„œ์˜ ํ…Œ์Šคํฌ, ํ…์ŠคํŠธ ๋‹จ์œ„์—์„œ์˜ ํƒœ์Šคํฌ๋กœ ๊ตฌ๋ถ„๋œ๋‹ค.

 

2.3 ABSA without BERT

  ์ƒ๋žต

2.4 ABSA with BERT

  Post-Training์ด๋ผ๊ณ  ๋ถˆ๋ฆฌ๋Š” ์ถ”๊ฐ€์ ์ธ ํ•™์Šต์„ ํ†ตํ•ด ํผํฌ๋จผ์Šค๋ฅผ ํ–ฅ์ƒ์‹œ์ผฐ๋‹ค(Xu et al., 2019). Post-Training์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•ด ABSA๋ฅผ ์งˆ๋ฌธ-๋‹ต๋ณ€ ๋ฌธ์ œ๋กœ ์ •์˜ํ•œ๋‹ค. ๋˜ํ•œ sentenco-pair classification์œผ๋กœ auxiliary sentence๋ฅผ ๊ตฌ์ถ•ํ•˜์—ฌ ๋ฒ„ํŠธ๋ฅผ ์‚ฌ์šฉํ•œ ์—ฐ๊ตฌ๋„ ์žˆ๋‹ค (Sun et al., 2019).

 

3. Experiments


3.1 Pre-processing entity and aspect pairs for BERT

  SemEval-2016 ๋ฐ์ดํ„ฐ์…‹์˜ ํ˜•์‹์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค, ”ENTITY#ASPECT” ์ด๋ฅผ BERT์— ์ธํ’‹์œผ๋กœ ํ™œ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์ „์ฒ˜๋ฆฌ ํ•œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด

”FOOD#STYLE OPTIONS”  ํŽ˜์–ด๋ฅผ ”food, style options”์™€ ๊ฐ™์ด ๊ฐ„๋‹จํ•˜๊ฒŒ ์ „์ฒ˜๋ฆฌํ•œ๋‹ค.

 

3.2 Data generation

  SemEval-2016 ๋ฐ์ดํ„ฐ์…‹์—์„œ ๊ฐ ํ…์ŠคํŠธ๋Š” ๊ณ ์ •๋œ ํฌ๊ธฐ์˜ aspect์™€ sentiment polarity ๋ฆฌ์ŠคํŠธ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ๋ ˆ์Šคํ† ๋ž‘ ๋ฐ์ดํ„ฐ์…‹์€ 12๊ฐœ์˜ ์œ ๋‹ˆํฌ aspect๊ฐ€ ๊ณ ์ •๋˜์–ด ์žˆ๋‹ค. ํ…์ŠคํŠธ์— ์–ธ๊ธ‰๋˜์ง€ ์•Š์€ aspect๋Š” 'unrelated'๋กœ ๋ผ๋ฒจ๋ง ๋œ๋‹ค. ๋ฐ์ดํ„ฐ์…‹์˜ ๋ ˆ์ด๋ธ” ๋ถ„ํฌ๋Š” ์•„๋ž˜ ํ‘œ์™€ ๊ฐ™๋‹ค. ๋˜ํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ์–ธ๋ฐธ๋Ÿฐ์Šคํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋ ˆ์ด๋ธ” ์นด์šดํŠธ์— ๋”ฐ๋ผ ๊ฐ€์ค‘์น˜๋ฅผ ๋ถ€์—ฌํ•œ๋‹ค

 

3.3 Sentiment Classifier

  ํ…์ŠคํŠธ์—์„œ ํŠน์ •ํ•œ aspect๊ฐ€ ์ฃผ์—ฌ ์กŒ์„ ๋•Œ ๊ฐ์„ฑ์„ ์˜ˆ์ธกํ•˜๋Š” ๋ชจ๋ธ์ด๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด ๋‘ ๊ฐœ์˜ ๋ฌธ์žฅ์„ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›๋Š”, BERT sentence pair classification ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•œ๋‹ค.

๋ชจ๋ธ์˜ Sentence 1์€ ๋ฆฌ๋ทฐ ํ…์ŠคํŠธ์ด๊ณ  Sentence 2๋Š” ์ฃผ์–ด์ง„ aspect์ด๋‹ค. Class Label์€ 'positive', 'negative, 'neutral', 'conflict' 4๊ฐ€์ง€์ด๋‹ค. ์ด๋•Œ conflict๋Š” aspect๊ฐ€ ์–ด๋–ค ๋ถ€๋ถ„์—์„œ๋Š” positive ๋‹ค๋ฅธ ๋ถ€๋ถ„์—์„œ๋Š” negative๋กœ ๊ตฌ๋ถ„๋˜๋Š” ๊ฒƒ์„ ๋œปํ•œ๋‹ค.

 

3.4 Aspect Category Classifier

  ์œ„ ๋ชจ๋ธ๊ณผ ๋˜‘๊ฐ™์ด BERT sentence pair classification ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜๊ณ  Sentence 1์€ ๋ฆฌ๋ทฐ ํ…์ŠคํŠธ, Sentence 2๋Š” aspect ๋ฆฌ์ŠคํŠธ์ด๋‹ค. ๊ฐ aspect๊ฐ€ ๋ฆฌ๋ทฐ ํ…์ŠคํŠธ์™€ ์—ฐ๊ด€์ด ์žˆ๋Š”์ง€ ์—†๋Š” ์ง€๋ฅผ ํ•™์Šตํ•˜๋Š” ๊ฒƒ์ด ๋ชฉํ‘œ์ด๊ณ , Class Label์€ 'Related', 'Unelated'์ด๋‹ค.

 

3.5 Combined Model

  ์œ„ ๋‘ ๋ชจ๋ธ์„ ๊ฒฐํ•ฉํ•œ multi-class classifier ๋ชจ๋ธ์ด๋‹ค. ์—ญ์‹œ BERT sentence pair classification ๋ชจ๋ธ์„ ๋ฒ ์ด์Šค๋กœ Sentence 1์€ ๋ฆฌ๋ทฐ ํ…์ŠคํŠธ, Sentence 2๋Š” aspect ๋ฆฌ์ŠคํŠธ์ด๋‹ค. ์ด๋•Œ Class Label์€ text์™€ aspect๊ฐ€ ์—ฐ๊ด€์ด ์žˆ๋‹ค๋ฉด, sentiment label์„ ๋ฐ˜ํ™˜ํ•˜๊ณ , ์—ฐ๊ด€์ด ์—†๋‹ค๋ฉด unrelated label์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

 


4. Evaluation

5. Discussion

๋…ผ๋ฌธ ์ฐธ์กฐ

๋ฐ˜์‘ํ˜•