인터넷 기술과 소셜 미디어의 빠른 성장으로 인하여, 구조화되지 않은 문서 표현도 다양한 응용 프로그램에 사용할 수 있게 마이닝 기술이 발전되었다. 그 중 감성분석은 제품이나 서비스에 내재된 사용자의 감성을 탐지할 수 있는 분석방법이기 때문에 지난 몇 년 동안 많은 관심을 받아왔다. 감성분석에서는 주로 텍스트 데이터를 이용하여 사람들의 감성을 사전 정의된 긍정 및 부정의 범주를 할당하여 분석하며, 이때 사전 정의된 레이블을 이용하기 때문에 다양한 방향으로 연구가 진행되고 있다. 초기의 감성분석 연구에서는 쇼핑몰 상품의 리뷰 중심으로 진행되었지만, 최근에는 블로그, 뉴스기사, 날씨 예보, 영화 리뷰, SNS, 주식시장의 동향 등 다양한 분야에 적용되고 있다. 많은 선행연구들이 진행되어 왔으나 대부분 전통적인 단일 기계학습기법에 의존한 감성분류를 시도하였기에 분류 정확도 면에서 한계점이 있었다. 본 연구에서는 전통적인 기계학습기법 대신 대용량 데이터의 처리에 우수한 성능을 보이는 딥러닝 기법과 딥러닝 중 CNN과 LSTM의 조합모델을 이용하여 감성분석의 분류 정확도를 개선하고자 한다. 본 연구에서는 대표적인 영화 리뷰 데이터셋인 IMDB의 리뷰 데이터 셋을 이용하여, 감성분석의 극성분석을 긍정 및 부정으로 범주를 분류하고, 딥러닝과 제안하는 조합모델을 활용하여 극성분석의 예측 정확도를 개선하는 것을 목적으로 한다. 이 과정에서 여러 매개 변수가 존재하기 때문에 그 수치와 정밀도의 관계에 대해 고찰하여 최적의 조합을 찾아 정확도 등 감성분석의 성능 개선을 시도한다. 연구 결과, 딥러닝 기반의 분류 모형이 좋은 분류성과를 보였으며, 특히 본 연구에서 제안하는 CNN-LSTM 조합모델의 성과가 가장 우수한 것으로 나타났다.
인터넷 기술과 소셜 미디어의 빠른 성장으로 인하여, 구조화되지 않은 문서 표현도 다양한 응용 프로그램에 사용할 수 있게 마이닝 기술이 발전되었다. 그 중 감성분석은 제품이나 서비스에 내재된 사용자의 감성을 탐지할 수 있는 분석방법이기 때문에 지난 몇 년 동안 많은 관심을 받아왔다. 감성분석에서는 주로 텍스트 데이터를 이용하여 사람들의 감성을 사전 정의된 긍정 및 부정의 범주를 할당하여 분석하며, 이때 사전 정의된 레이블을 이용하기 때문에 다양한 방향으로 연구가 진행되고 있다. 초기의 감성분석 연구에서는 쇼핑몰 상품의 리뷰 중심으로 진행되었지만, 최근에는 블로그, 뉴스기사, 날씨 예보, 영화 리뷰, SNS, 주식시장의 동향 등 다양한 분야에 적용되고 있다. 많은 선행연구들이 진행되어 왔으나 대부분 전통적인 단일 기계학습기법에 의존한 감성분류를 시도하였기에 분류 정확도 면에서 한계점이 있었다. 본 연구에서는 전통적인 기계학습기법 대신 대용량 데이터의 처리에 우수한 성능을 보이는 딥러닝 기법과 딥러닝 중 CNN과 LSTM의 조합모델을 이용하여 감성분석의 분류 정확도를 개선하고자 한다. 본 연구에서는 대표적인 영화 리뷰 데이터셋인 IMDB의 리뷰 데이터 셋을 이용하여, 감성분석의 극성분석을 긍정 및 부정으로 범주를 분류하고, 딥러닝과 제안하는 조합모델을 활용하여 극성분석의 예측 정확도를 개선하는 것을 목적으로 한다. 이 과정에서 여러 매개 변수가 존재하기 때문에 그 수치와 정밀도의 관계에 대해 고찰하여 최적의 조합을 찾아 정확도 등 감성분석의 성능 개선을 시도한다. 연구 결과, 딥러닝 기반의 분류 모형이 좋은 분류성과를 보였으며, 특히 본 연구에서 제안하는 CNN-LSTM 조합모델의 성과가 가장 우수한 것으로 나타났다.
Rapid growth of internet technology and social media is progressing. Data mining technology has evolved to enable unstructured document representations in a variety of applications. Sentiment analysis is an important technology that can distinguish poor or high-quality content through text data of p...
Rapid growth of internet technology and social media is progressing. Data mining technology has evolved to enable unstructured document representations in a variety of applications. Sentiment analysis is an important technology that can distinguish poor or high-quality content through text data of products, and it has proliferated during text mining. Sentiment analysis mainly analyzes people's opinions in text data by assigning predefined data categories as positive and negative. This has been studied in various directions in terms of accuracy from simple rule-based to dictionary-based approaches using predefined labels. In fact, sentiment analysis is one of the most active researches in natural language processing and is widely studied in text mining. When real online reviews aren't available for others, it's not only easy to openly collect information, but it also affects your business. In marketing, real-world information from customers is gathered on websites, not surveys. Depending on whether the website's posts are positive or negative, the customer response is reflected in the sales and tries to identify the information. However, many reviews on a website are not always good, and difficult to identify. The earlier studies in this research area used the reviews data of the Amazon.com shopping mal, but the research data used in the recent studies uses the data for stock market trends, blogs, news articles, weather forecasts, IMDB, and facebook etc. However, the lack of accuracy is recognized because sentiment calculations are changed according to the subject, paragraph, sentiment lexicon direction, and sentence strength. This study aims to classify the polarity analysis of sentiment analysis into positive and negative categories and increase the prediction accuracy of the polarity analysis using the pretrained IMDB review data set. First, the text classification algorithm related to sentiment analysis adopts the popular machine learning algorithms such as NB (naive bayes), SVM (support vector machines), XGboost, RF (random forests), and Gradient Boost as comparative models. Second, deep learning has demonstrated discriminative features that can extract complex features of data. Representative algorithms are CNN (convolution neural networks), RNN (recurrent neural networks), LSTM (long-short term memory). CNN can be used similarly to BoW when processing a sentence in vector format, but does not consider sequential data attributes. RNN can handle well in order because it takes into account the time information of the data, but there is a long-term dependency on memory. To solve the problem of long-term dependence, LSTM is used. For the comparison, CNN and LSTM were chosen as simple deep learning models. In addition to classical machine learning algorithms, CNN, LSTM, and the integrated models were analyzed. Although there are many parameters for the algorithms, we examined the relationship between numerical value and precision to find the optimal combination. And, we tried to figure out how the models work well for sentiment analysis and how these models work. This study proposes integrated CNN and LSTM algorithms to extract the positive and negative features of text analysis. The reasons for mixing these two algorithms are as follows. CNN can extract features for the classification automatically by applying convolution layer and massively parallel processing. LSTM is not capable of highly parallel processing. Like faucets, the LSTM has input, output, and forget gates that can be moved and controlled at a desired time. These gates have the advantage of placing memory blocks on hidden nodes. The memory block of the LSTM may not store all the data, but it can solve the CNN's long-term dependency problem. Furthermore, when LSTM is used in CNN's pooling layer, it has an end-to-end structure, so that spatial and temporal features can be designed simultaneously. In combination with CNN-LSTM, 90.33% accuracy was measured. This is
Rapid growth of internet technology and social media is progressing. Data mining technology has evolved to enable unstructured document representations in a variety of applications. Sentiment analysis is an important technology that can distinguish poor or high-quality content through text data of products, and it has proliferated during text mining. Sentiment analysis mainly analyzes people's opinions in text data by assigning predefined data categories as positive and negative. This has been studied in various directions in terms of accuracy from simple rule-based to dictionary-based approaches using predefined labels. In fact, sentiment analysis is one of the most active researches in natural language processing and is widely studied in text mining. When real online reviews aren't available for others, it's not only easy to openly collect information, but it also affects your business. In marketing, real-world information from customers is gathered on websites, not surveys. Depending on whether the website's posts are positive or negative, the customer response is reflected in the sales and tries to identify the information. However, many reviews on a website are not always good, and difficult to identify. The earlier studies in this research area used the reviews data of the Amazon.com shopping mal, but the research data used in the recent studies uses the data for stock market trends, blogs, news articles, weather forecasts, IMDB, and facebook etc. However, the lack of accuracy is recognized because sentiment calculations are changed according to the subject, paragraph, sentiment lexicon direction, and sentence strength. This study aims to classify the polarity analysis of sentiment analysis into positive and negative categories and increase the prediction accuracy of the polarity analysis using the pretrained IMDB review data set. First, the text classification algorithm related to sentiment analysis adopts the popular machine learning algorithms such as NB (naive bayes), SVM (support vector machines), XGboost, RF (random forests), and Gradient Boost as comparative models. Second, deep learning has demonstrated discriminative features that can extract complex features of data. Representative algorithms are CNN (convolution neural networks), RNN (recurrent neural networks), LSTM (long-short term memory). CNN can be used similarly to BoW when processing a sentence in vector format, but does not consider sequential data attributes. RNN can handle well in order because it takes into account the time information of the data, but there is a long-term dependency on memory. To solve the problem of long-term dependence, LSTM is used. For the comparison, CNN and LSTM were chosen as simple deep learning models. In addition to classical machine learning algorithms, CNN, LSTM, and the integrated models were analyzed. Although there are many parameters for the algorithms, we examined the relationship between numerical value and precision to find the optimal combination. And, we tried to figure out how the models work well for sentiment analysis and how these models work. This study proposes integrated CNN and LSTM algorithms to extract the positive and negative features of text analysis. The reasons for mixing these two algorithms are as follows. CNN can extract features for the classification automatically by applying convolution layer and massively parallel processing. LSTM is not capable of highly parallel processing. Like faucets, the LSTM has input, output, and forget gates that can be moved and controlled at a desired time. These gates have the advantage of placing memory blocks on hidden nodes. The memory block of the LSTM may not store all the data, but it can solve the CNN's long-term dependency problem. Furthermore, when LSTM is used in CNN's pooling layer, it has an end-to-end structure, so that spatial and temporal features can be designed simultaneously. In combination with CNN-LSTM, 90.33% accuracy was measured. This is
* AI 자동 식별 결과로 적합하지 않은 문장이 있을 수 있으니, 이용에 유의하시기 바랍니다.
문제 정의
선행연구에서는 주로 인공 신경망, SVM 등의 단순 기계학습기법을 활용하여 왔으나 전술한 특성 때문에 분류 성과가 미흡한 경우가 많았다. 본 연구에서는 이러한 한계점을 보완하고자 최근에 기계학습 분야에서 활발하게 연구되고 있는 대표적인 딥러닝 기법과 본 연구에서 영화 리뷰의 감성분석에 적합할 것으로 생각되어 CNN-LSTM 조합모델을 제안한다.
하지만 실제 응용에 있어서는 과적합이 되지 않도록 견고성을 확보하는 것이 중요하다. 특히, 딥러닝 기법은 이미지 인식 등에서 활발하게 이용되고 있으나 영화 리뷰 등의 텍스트 분석 사례는 적기 때문에 본 연구에서 영화 리뷰 데이터의 극성 분류문제에 이용해 보고자 한다.
가설 설정
본 연구의 결과에 대한 실무적 시사점은 딥러닝에 기반한 감성분석이 감성 예측을 더욱 정교하게 하여 흥행요인 분석 등에 활용될 수 있을 것이다. 정교한 영화 흥행요인의 분석은 영화 산업의 발전에 기여할 수 있을 것이다. 또한, 영화 리뷰에 대한 텍스트 분석은 영화 추천시스템에 활용될 수 있으며, 사용자의 평점 데이터에만 의존하는 기존의 추천시스템에 비해 감성분석의 결과를 고려하여 보다 정교한 추천 결과를 도출할 수 있을 것으로 기대된다.
제안 방법
본 연구에서는 분류모형의 성능을 향상시키기위해 RNN의 일종인 LSTM을 이용하여 IMDB의 감성분석 정보를 추출하고, 추출된 감성분석의 극성 예측 모델의 성능 평가를 실시한다.
이 연구에서 제안하는 모델은 감성분석의 긍정 및 부정의 특징 추출을 위해 CNN과 LSTM으로 이루어진 모델이다.
TF-IDF 가중치가 높은 단어는 TF-IDF가중치가 낮은 단어보다 중요하며, 가중치가 높을수록 문서의 단어 의미중요도가 높다. 본 연구에서는 데이터 전처리 후 텍스트를 벡터로 변환할 때, BoW와 TF-IDF를 사용하여 문서에 대한 특징을 추출하여 알고리즘을 비교할 수 있도록 하였다.
이 분석에서 형태소로 전처리된 문장의 최대 길이는 1191이기 때문에 리뷰 문장의 길이 차를 고려하여 단어 벡터의 최대 길이를 1200으로 재구성하여 word embedding 과정을 진행하였다. 또한, GPU의 성능을 고려하여 dimension은 100으로 구성하였다.
이 연구에서는 영화 리뷰의 감성분석을 딥러닝 기법 알고리즘인 CNN과 LSTM을 결합하여 제안하였다. 그 결과, CNN-LSTM 조합모델의 정확도가 90.
대상 데이터
데이터 셋은 Keras의 Scikit-learn 라이브러리에서 제공된 IMDB(imdb.com) 영화 리뷰 데이터를 사용하였으며, 그 중 이미 긍정 및 부정으로 분류된 25,000개의 데이터 셋을 대상으로 진행되었다. 데이터 예시는 다음 [Table 1]과 같다.
데이터처리
제안하는 모형의 성능을 테스트하기 위해서 선행연구의 검토를 통해 비교 기법을 선택하였다. 전체적인 분석과정과 비교 모형은 [Figure 3]와 같다.
그러나 온라인 리뷰는 항상 좋은 글만 있는 것은 아닐뿐더러 완벽하게 식별하기엔 어려움이 따른다. 그래서 이 연구에 서는 리뷰를 최대한 자동화 분류를 할 수 있도록, 기계학습은 Bag of Words, TF-IDF의 벡터화를 이용하고, 딥러닝에서는 sequence data화하여 word embedding을 통해 텍스트를 수치화하여 분석하였다. 본 연구의 결과, CNN-LSTM 조합모델의 연구 결과가 몇몇 기계학습기법과 비교하여 주목할 정도로 정확도가 개선되지는 않았다.
이론/모형
또한, 텍스트 리뷰 데이터에서 부호(punctuation mark)를 제거한 후, 토큰화(tokenization)를 진행하였다. 토큰화 라이브러리는 자연어 어휘를 많이 보유하고 있는 Stanford NLP를 이용하였다. Stanford NLP를 이용하여 단어를 분류한 후에는 대명사나 전치사 등의 stopwords를 제거하여 전처리를 하였다.
먼저, 비교모형으로 사용하기 위하여 감성분석과 유사한 텍스트 분류 알고리즘에서 높은 수준의 분류성능을 보이는 기계학습기법인 NB, SVM, XGboost를 선정하였고, 그 외에 RF(random forests)와 Gradient Boost를 비교 모형으로 채택하였다. 한편, 딥러닝에서 텍스트 데이터는 주로 CNN 알고리즘을 통해 텍스트 분류를 진행하기 때문에 따로 벡터화할 필요가 없지만, 전통적인 기계학습기법에서 사용하기 위해서 텍스트를 숫자로 벡터화해야 한다.
두 번째, 딥러닝의 대표적인 기법인 CNN, LSTM을 딥러닝 단일 비교 모형으로 채택했다. 마지막으로, 본 연구에서 제안하는 모형인 CNN과 LSTM을 조합한 모형을 제시한다.
Feature map을 설정하기 위하여 256개의 filter에 활성화함수 ReLU를 적용한 후, 1개씩 filter에 활성화함수 Sigmoid를 적용하여 분류기 함수에 근사 값을 갖게 하였다. 학습률을 설정할 수 있는 알고리즘으로 Adam(Adaptive moment)를 이용하여 속도벡터와 그라디언트 누적벡터를 계산한 후 다음단계에서 정확도를 측정할 수 있도록 하였다. Epoch은 30, batch size를 32로 설정하여 정확도를 측정하였다.
제안하는 기법들을 이용한 감성분석의 결과들을 비교하기 위하여 Accuracy, Precision, Recall, F-measure 등의 평가지표를 이용하였다. 이 지표들은 분류분석에서 흔히 사용하는 것들로서 이미 많은 선행연구에서 사용되고 있는 지표들이 다.
성능/효과
44%를 기록하였다. TF-IDF 모델에서는 Gradient Boost가 77.96%로 가장 낮은 정확도를 보였다. BoW와 TF-IDF의 벡터화 환경을 다르게 했을 때, SVM, RF, XG Boost의 경우, 1~2% 차이를 보였다.
단일 CNN 분석 결과, 89.04%의 정확도가 측정되었으며, 단일 LSTM 분석의 결과는 86.88%의 정확도가 측정되었다. 한편, CNN-LSTM 조합모델의 결과는 90.
88%의 정확도가 측정되었다. 한편, CNN-LSTM 조합모델의 결과는 90.33 %의 정확도가 측정되어 가장 우수한 분류 정확도를 보이는 것으로 나타났다.
이 연구에서는 영화 리뷰의 감성분석을 딥러닝 기법 알고리즘인 CNN과 LSTM을 결합하여 제안하였다. 그 결과, CNN-LSTM 조합모델의 정확도가 90.33%로 다른 전통적인 기계학습기법과 딥러닝 단일 분류 모형보다 더 안정적이고 정확하였다. 기계학습기법 중 SVM 모델도 정확도 88.
그래서 이 연구에 서는 리뷰를 최대한 자동화 분류를 할 수 있도록, 기계학습은 Bag of Words, TF-IDF의 벡터화를 이용하고, 딥러닝에서는 sequence data화하여 word embedding을 통해 텍스트를 수치화하여 분석하였다. 본 연구의 결과, CNN-LSTM 조합모델의 연구 결과가 몇몇 기계학습기법과 비교하여 주목할 정도로 정확도가 개선되지는 않았다. 향후 연구에서는 feature selection을 도입하여 훈련 데이터를 벡터화하여 분류하고, 매개변수의 영향을 비교하여 정확도를 개선할 수 있을 것이다.
후속연구
CNN은 주로 얼굴인식이나 이미지 분류에서 사용되는 알고리즘이지만, NLP에서 Bag of words와 유사하게 사용되며, LSTM은 주어진 단어를 미리 예측할 수 있도록 순차적으로 배열할 수 있는 장점이 있기에 주로 챗봇과 텍스트 번역에서 유용하게 이용되는 알고리즘이다. 따라서 CNN-LSTM의 조합모델을 이용하게 되면 양자의 장점을 활용할 수 있으며, 이를 통해 리뷰 데이터 감성분석 성능을 개선할 수 있을 것으로 기대된다.
본 연구의 결과, CNN-LSTM 조합모델의 연구 결과가 몇몇 기계학습기법과 비교하여 주목할 정도로 정확도가 개선되지는 않았다. 향후 연구에서는 feature selection을 도입하여 훈련 데이터를 벡터화하여 분류하고, 매개변수의 영향을 비교하여 정확도를 개선할 수 있을 것이다.
본 연구의 결과에 대한 실무적 시사점은 딥러닝에 기반한 감성분석이 감성 예측을 더욱 정교하게 하여 흥행요인 분석 등에 활용될 수 있을 것이다. 정교한 영화 흥행요인의 분석은 영화 산업의 발전에 기여할 수 있을 것이다.
정교한 영화 흥행요인의 분석은 영화 산업의 발전에 기여할 수 있을 것이다. 또한, 영화 리뷰에 대한 텍스트 분석은 영화 추천시스템에 활용될 수 있으며, 사용자의 평점 데이터에만 의존하는 기존의 추천시스템에 비해 감성분석의 결과를 고려하여 보다 정교한 추천 결과를 도출할 수 있을 것으로 기대된다.
질의응답
핵심어
질문
논문에서 추출한 답변
딥러닝이란?
딥러닝은 일반적으로 기계학습기법의 하나인 신경망의 계층을 심화시킨 알고리즘을 의미한다. 전통적인 기계학습기법은 분류에 대한 특징 집합을 따로 추출하여야 하지만, 딥러닝은 특징 집합을 추출하는 과정뿐만 아니라, 복잡한 특징을 자동으로 추출할 수 있다 (Liu et al.
감성분석에 많이 활용되는 기법은?
나이브베이즈 (NB, Naive Bayes), 의사결정나무, kNN, 인공신경망, SVM (support vector machines), 최대 엔트로피 등이 지도학습기법 중 감성분석에 많이 활용되는 기법이다 (Appel et al., 2015).
감성분석의 긍정 및 부정의 특징 추출을 위해 만들어진 CNN의 특징은?
기존 기계학습과 달리 CNN은 convolution layer를 적용하여 특징의 자동 추출이 가능하고, 대규모 병렬 처리가 가능하다. 한편, LSTM은 CNN과 달리 대규모 병렬처리가 가능하지 않지만, RNN과는 다르게 원하는 시기에 진행 및 제어 할 수 있는 입력, 출력, 망각 게이트가 있다.
참고문헌 (20)
Abid, F., M. Alam, M. Yasir, and C. Li, "Sentiment analysis through recurrent variants latterly on convolutional neural network of Twitter," Future Generation Computer Systems, Vol.95(2019), 292-308.
Appel, O., F. Chiclana and J. Carter, "Main concepts, state of the art and future research questions in sentiment analysis," Acta Polytechnica Hungarica, Vol.12, No.3(2015), 87-108.
Baydogan, M. G., G. Runger, and E. Tuv, "A bag-of-features framework to classify time series," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.35, No.11(2013), 2796-2802.
Bengio, Y., P. Simard, and P. Frasconi, "Learning long-term dependencies with gradient descent is difficult," IEEE Transactions on Neural Networks, Vol.5, No.2(1994), 157-166.
Ferguson, P., N. O'Hare, M. Davy, A. Bermingham, P. Sheridan, C. Gurrin and A. F. Smeaton, "Exploring the use of paragraph-level annotations for sentiment analysis of financial blogs," Proceedings of WOMAS 2009-Workshop on Opinion Mining and Sentiment Analysis, (2009).
Graves, A., "Long short-term memory," Supervised Sequence Labelling with Recurrent Neural Networks, Springer, Berlin, Heidelberg, 2012
Hyun, J., S. Ryu, and S.-Y. Lee, "How to improve the accuracy of recommendation systems: Combining ratings and review texts sentiment scores," Journal of Intelligence and Information Systems, Vol.25, No.1(2019), 219-239.
Kim, Y., and M. Song, "A study on analyzing sentiments on movie reviews by multi-level sentiment classifier," Journal of Intelligence and Information Systems, Vol.22, No.3(2016), 71-89.
Lee, S.-H., J. Cui, and J.-W. Kim, "Sentiment analysis on movie review through building modified sentiment dictionary by movie genre," Journal of Intelligence and Information Systems, Vol.22, No.2(2016), 97-113.
Liu, P., X. Qiu, and X. Huang, "Recurrent neural network for text classification with multi-task learning," arXiv 1605.05101, 2016.
Liu, S., and J.-H. Chen, "A multi-label classification based approach for sentiment classification," Expert Systems with Applications, Vol.42, No.3(2015), 1083-1093.
Lochter, J. V., R. F.Zanetti, D. Reller, and T. A. Almeida, "Short text opinion detection using ensemble of classifiers and semantic indexing," Expert Systems with Applications, Vol.62, (2016), 243-249.
Pak, A. and P. Paroubek, "Twitter as a corpus for sentiment analysis and opinion mining," Proceedings of the Seventh International Conference on Language Resources and Evaluation, (2010), 1320-1326.
Pang, B., L. Lee, and S. Vaithyanathan, "Thumbs up?: sentiment classification using machine learning techniques," Proceedings of the ACL-02 conference on Empirical methods in Natural Language Processing, 2002.
Rao, G., W. Huang, Z. Feng, and Q. Cong, "LSTM with sentence representations for document level sentiment classification," Neurocomputing, Vol.308(2018), 49-57.
Shuang K., Z. Zhang, H. Guo, and J. Loo, "A sentiment information Collector-Extractor architecture based neural network for sentiment analysis," Information Sciences, Vol.467 (2018), 549-558.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.