DOI QR코드

DOI QR Code

KB-BERT: Training and Application of Korean Pre-trained Language Model in Financial Domain

KB-BERT: 금융 특화 한국어 사전학습 언어모델과 그 응용

  • Kim, Donggyu (Financial AI Center, Tech Group, KB Kookmin Bank) ;
  • Lee, Dongwook (Financial AI Center, Tech Group, KB Kookmin Bank) ;
  • Park, Jangwon (Financial AI Center, Tech Group, KB Kookmin Bank) ;
  • Oh, Sungwoo (Financial AI Center, Tech Group, KB Kookmin Bank) ;
  • Kwon, Sungjun (Financial AI Center, Tech Group, KB Kookmin Bank) ;
  • Lee, Inyong (Financial AI Center, Tech Group, KB Kookmin Bank) ;
  • Choi, Dongwon (Financial AI Center, Tech Group, KB Kookmin Bank)
  • 김동규 (KB국민은행 테크그룹 금융AI센터 AI테크팀) ;
  • 이동욱 (KB국민은행 테크그룹 금융AI센터 AI테크팀) ;
  • 박장원 (KB국민은행 테크그룹 금융AI센터 AI테크팀) ;
  • 오성우 (KB국민은행 테크그룹 금융AI센터 AI테크팀) ;
  • 권성준 (KB국민은행 테크그룹 금융AI센터 AI테크팀) ;
  • 이인용 (KB국민은행 테크그룹 금융AI센터 AI테크팀) ;
  • 최동원 (KB국민은행 테크그룹 금융AI센터 AI테크팀)
  • Received : 2022.06.16
  • Accepted : 2022.06.21
  • Published : 2022.06.30

Abstract

Recently, it is a de-facto approach to utilize a pre-trained language model(PLM) to achieve the state-of-the-art performance for various natural language tasks(called downstream tasks) such as sentiment analysis and question answering. However, similar to any other machine learning method, PLM tends to depend on the data distribution seen during the training phase and shows worse performance on the unseen (Out-of-Distribution) domain. Due to the aforementioned reason, there have been many efforts to develop domain-specified PLM for various fields such as medical and legal industries. In this paper, we discuss the training of a finance domain-specified PLM for the Korean language and its applications. Our finance domain-specified PLM, KB-BERT, is trained on a carefully curated financial corpus that includes domain-specific documents such as financial reports. We provide extensive performance evaluation results on three natural language tasks, topic classification, sentiment analysis, and question answering. Compared to the state-of-the-art Korean PLM models such as KoELECTRA and KLUE-RoBERTa, KB-BERT shows comparable performance on general datasets based on common corpora like Wikipedia and news articles. Moreover, KB-BERT outperforms compared models on finance domain datasets that require finance-specific knowledge to solve given problems.

대량의 말뭉치를 비지도 방식으로 학습하여 자연어 지식을 획득할 수 있는 사전학습 언어모델(Pre-trained Language Model)은 최근 자연어 처리 모델 개발에 있어 매우 일반적인 요소이다. 하지만, 여타 기계학습 방식의 성격과 동일하게 사전학습 언어모델 또한 학습 단계에 사용된 자연어 말뭉치의 특성으로부터 영향을 받으며, 이후 사전학습 언어모델이 실제 활용되는 응용단계 태스크(Downstream task)가 적용되는 도메인에 따라 최종 모델 성능에서 큰 차이를 보인다. 이와 같은 이유로, 법률, 의료 등 다양한 분야에서 사전학습 언어모델을 최적화된 방식으로 활용하기 위해 각 도메인에 특화된 사전학습 언어모델을 학습시킬 수 있는 방법론에 관한 연구가 매우 중요한 방향으로 대두되고 있다. 본 연구에서는 금융(Finance) 도메인에서 다양한 자연어 처리 기반 서비스 개발에 활용될 수 있는 금융 특화 사전학습 언어모델의 학습 과정 및 그 응용 방식에 대해 논한다. 금융 도메인 지식을 보유한 언어모델의 사전학습을 위해 경제 뉴스, 금융 상품 설명서 등으로 구성된 금융 특화 말뭉치가 사용되었으며, 학습된 언어 모델의 금융 지식을 정량적으로 평가하기 위해 토픽 분류, 감성 분류, 질의 응답의 세 종류 자연어 처리 데이터셋에서의 모델 성능을 측정하였다. 금융 도메인 말뭉치를 기반으로 사전 학습된 KB-BERT는 KoELECTRA, KLUE-RoBERTa 등 State-of-the-art 한국어 사전학습 언어 모델과 비교하여 일반적인 언어 지식을 요구하는 범용 벤치마크 데이터셋에서 견줄 만한 성능을 보였으며, 문제 해결에 있어 금융 관련 지식을 요구하는 금융 특화 데이터셋에서는 비교대상 모델을 뛰어넘는 성능을 보였다.

Keywords

References

  1. 김유영, 송민. (2016). 영화 리뷰 감성분석을 위한 텍스트 마이닝 기반 감성 분류기 구축. 지능정보연구, 22(3), 71-89. https://doi.org/10.13088/JIIS.2016.22.3.071
  2. 송민채, 신경식. (2018). 임베딩과 어텐션 매커니즘에 기반한 LSTM을 이용한 감성분석. 2018 한국지능정보시스템학회 춘계학술대회 논문집, 107-108.
  3. 유소연, 임규건. (2021). 텍스트 마이닝과 의미 네트워크 분석을 활용한 뉴스 의제 분석: 코로나 19 관련 감정을 중심으로. 지능정보연구, 27(1), 47-64. https://doi.org/10.13088/JIIS.2021.27.1.047
  4. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS'17), 6000-6010.
  5. Tchalakova, M., Gerdemann, D., & Meurers, D. (2011). Automatic Sentiment Classification of Product Reviews Using Maximal Phrases Based Analysis. In Proceedings of the 2nd Workshop on Computational Approaches to Subjectivity and Sentiment Analysis (WASSA 2.011), 111-117.
  6. Devlin, J., Chang, M.-W. Lee, K., & Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), 4171-4186.
  7. Lee, J., Yoon, W., Kim, S., Kim, D., Kim, S., So, C. H., & Kang, J. (2020). BioBERT: a pre-trained biomedical language representation model for biomedical text mining. Bioinformatics, Volume 36, Issue 4, 1234-1240. https://doi.org/10.1093/bioinformatics/btz682
  8. Peters, M. E., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., & Zettlemoyer, L. (2018). Deep Contextualized Word Representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), 2227-2237.
  9. Gururangan, S., Marasovic, A., Swayamdipta, S., Lo, K., Beltagy, I., Downey, D., & Smith, N. A. (2020). Don't Stop Pretraining: Adapt Language Models to Domains and Tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 8342-8360.
  10. Sachidananda, V., Kessler, J., & Lai, Y.-A. (2021). Efficient Domain Adaptation of Language Models via Adaptive Tokenization. In Proceedings of the Second Workshop on Simple and Efficient Natural Language Processing, 155-165.
  11. Araci, D. (2019). FinBERT: Financial Sentiment Analysis with Pre-trained Language Models. arXiv.
  12. Demszky, D., Movshovitz-Attias, D., Ko, J., Cowen, A., Nemade, G., & Ravi, S. (2020). GoEmotions: A Dataset of Fine-Grained Emotions," In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 4040-4054.
  13. Borgeaud, S., Mensch, A., Hoffmann, J., Cai, T., Rutherford, E., Millican, K., Driessche, G., Lespiau, J.-B., Damoc, B., Clark, A., Casas, D. L., Guy, A., Menick, J., Ring, R., Hennigan, T., Huang, S., Maggiore, L., Jones, C., Cassirer, A., Brock, A., Paganini, M., Irving, G., Vinyals, O., Osindero, S., Simonyan, K., Rae, J. W., Elsen, E., & Sifre, L. (2021). Improving language models by retrieving from trillions of tokens. arXiv.
  14. Wang, X., Gao, T., Zhu, Z., Zhang, Z., Liu, Z., Li, J., & Tang, J. (2021). KEPLER: A Unified Model for Knowledge Embedding and Pre-trained Language Representation. Transactions of the Association for Computational Linguistics, 9:176-194. https://doi.org/10.1162/tacl_a_00360
  15. Park, S., Moon, J., Kim, S., Cho, W. I., Han, J., Pack, J., Song, C., Kim, J., Song, Y., Oh, T., Lee, J., Oh, J., Lyu, S., Jeong, Y., Lee, I., Seo, S., Lee, D., Kim, H., Lee, M., Jang, S., Do, S., Kim, S., Lim, K., Lee, J., Park, K., Shin, J., Kim, S., Park, L., Oh, A., Ha, J., & Cho, K. (2021). KLUE: Korean Language Understanding Evaluation. arXiv.
  16. Park, J. (2020). KoELECTRA: Pretrained ELECTRA Model for Korean. GitHub repository. https://github.com/monologg/KoELECTRA.
  17. Lim, S., Kim, M., & Lee, J. (2019). KorQuAD1.0: Korean QA Dataset for Machine Reading Comprehension. arXiv.
  18. Chalkidis, I., Fergadiotis, M., Malakasiotis, P., Aletras, N., & Androutsopoulos, I. (2020). LEGAL-BERT: The Muppets straight out of Law School. In Findings of the Association for Computational Linguistics: EMNLP, 2898-2904.
  19. Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., & Sutskever, I., (2019). Language Models are Unsupervised Multitask Learners. arXiv.
  20. Karamanolakis, G., Hsu, D., & Gravano, L. (2019). Leveraging Just a Few Keywords for Fine-Grained Aspect Detection Through Weakly Supervised Co-Training. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 4611-4621.
  21. Yao, X., Zheng, Y., Yang, X., & Yang, Z. (2021). NLP From Scratch Without Large-Scale Pretraining: A Simple and Efficient Framework. arXiv.
  22. Han, W. -B., & Kando, N. (2019). Opinion Mining with Deep Contextualized Embeddings. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Student Research Workshop, 35-42.
  23. Firdaus, M., Jain, U., Ekbal, A., & Bhattacharyy, P. (2021). SEPRG: Sentiment aware Emotion controlled Personalized Response Generation. In Proceedings of the 14th International Conference on Natural Language Generation, 353-363.
  24. Beltagy, I., Lo, K., & Cohan, A. (2019). SciBERT: A Pretrained Language Model for Scientific Text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 3615-3620.
  25. Yin, P., Neubig, G., Yih, W., & Riedel, S. (2020). TaBERT: Pretraining for Joint Understanding of Textual and Tabular Data. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 8413-8426.
  26. Gao, L., Biderman, S., Black, S., Golding, L., Hoppe, T., Foster, C., Phang, J., He, H., Thite, A., Nabeshima, N., Presser, S., & Leahy, C. (2021). The Pile: An 800GB Dataset of Diverse Text for Language Modeling. arXiv.