# The Use of a Large Language Model for Cyberbullying Detection

사이버 괴롭힘 탐지를 위한 대규모 언어 모델의 활용

Bayode Ogunleye, Babitha Dharmaraj · arXiv · 2024년 2월 6일

- **연구 문제** 사이버괴롭힘 탐지는 불균형 데이터와 일반화 문제로 기존 머신러닝 성능이 일관되지 않으며, 대규모 언어모델의 적용은 충분히 이루어지지 않았습니다.
- **연구 방법** pre-training 언어모델 RoBERTa를 사이버괴롭힘 라벨 데이터로 미세조정하고 BERT, XLNet, XLM-RoBERTa 및 전통적 머신러닝 모델과 비교합니다.
- **주요 결과** 불균형 데이터 D1에서 RoBERTa는 bully 클래스 F1 0.66을, 균형 데이터 D2에서는 F1 0.87을 보고했습니다.

## 사이버괴롭힘 탐지의 어려움

사이버괴롭힘(CB)은 소셜 미디어에서 정신적·신체적 건강을 위협하는 문제로 제시되며, 이를 자동으로 걸러내는 시스템이 필요합니다. 기존 머신러닝 모델은 높은 클래스 불균형과 일반화 문제로 성능이 일관되지 않으며, 욕설 필터링에만 의존하는 연구는 문맥을 충분히 파악하지 못한다고 지적됩니다. 본 논문은 이러한 상황에서 대규모 언어모델(LLM)이 CB 탐지에 충분히 적용되지 않았다는 점을 출발점으로 삼습니다.

이 연구는 pre-training 언어모델인 BERT, RoBERTa, XLNet, XLM-RoBERTa를 CB 탐지에 적용하여 전통적 머신러닝 모델과 비교합니다. 또한 Formspring과 Twitter 자료를 바탕으로 균형 잡힌 이진 데이터셋 D2를 새로 구성합니다.

## RoBERTa fine-tuning과 비교 모델

본 논문은 사전학습된 RoBERTa를 CB 탐지 과제의 라벨 데이터로 미세조정하는 방법을 제안합니다. RoBERTa는 BERT가 학습 방법에서 과소학습되었다는 문제의식에서 출발하여, 동적 마스킹, 더 많은 데이터와 큰 배치, 다음 문장 예측 제거, 더 긴 문장 학습을 적용한 모델입니다. 반면 BERT는 마스크 언어모델과 다음 문장 예측으로 사전학습된 양방향 Transformer 모델입니다.

비교 대상으로는 XLNet과 다국어 모델인 XLM-RoBERTa가 포함됩니다. 전통적 모델로는 TF-IDF 특징 벡터 또는 SBERT 임베딩을 입력으로 받는 SVM과 RF가 사용되며, SVM은 최대 마진 초평면을 찾는 방법이고 RF는 여러 결정트리를 앙상블하는 방법입니다. 실험 설정에서 데이터는 층화 방식으로 90%와 10%로 나누어졌고 Transformer 모델은 4 에폭 학습되었다고 기술됩니다.

## D1과 D2 데이터셋

D1은 Agrawal and Awekar의 Formspring 기반 데이터셋으로, 비괴롭힘 11,997건과 괴롭힘 776건으로 구성된 심하게 불균형한 자료입니다. 반면 D2는 Formspring 자료와 Wang et al.의 Twitter 자료를 이진 클래스로 재구성하여 만든 데이터입니다. 이때 Twitter 자료의 age, ethnicity, gender, religion, other cyberbullying 클래스를 괴롭힘으로 묶었고, 단어 수가 3개 미만이거나 100개를 넘는 사례는 이상치로 제거되었습니다. 그 결과 D2는 괴롭힘 19,553건과 비괴롭힘 19,526건으로 구성됩니다.

## 불균형 데이터 D1에서의 결과

사건 1에서는 불균형 데이터 D1을 사용하여 양성 클래스 bully의 F1 점수를 비교합니다. 보고된 결과에서 RoBERTa는 F1 점수 0.66을 기록하여 전통적 모델보다 높았고, XLNet을 제외한 다른 LLM들도 비교적 비슷한 결과를 보였습니다. 전통적 머신러닝 모델은 하이퍼파라미터 튜닝을 거쳤음에도 뚜렷하게 개선되지 않았다고 보고됩니다.

선행 연구와의 비교에서 Agrawal and Awekar의 BiLSTM with attention은 D1에서 F1 점수 0.51을 보고했으며, 본 논문의 LLM 결과가 이보다 높다고 보고됩니다. 한편 SMOTE로 오버샘플링한 BiLSTM 결과인 F1 0.91은 Emmery et al.이 학습 데이터와 테스트 데이터의 중복 때문에 신뢰하기 어렵다고 비판한 결과입니다. Emmery et al.이 학습 데이터만 오버샘플링하여 재현한 결과는 F1 0.33입니다. 이 두 값은 서로 다른 설정에서 나온 것이므로 함께 비교할 때 조건을 구분해야 합니다.

## 균형 데이터 D2에서의 결과

사건 2에서는 균형 데이터 D2를 사용하여 여러 모델을 비교합니다. RoBERTa는 양성 클래스 bully에 대해 F1 점수 0.87을 기록하여 가장 높은 성능을 보였으며, BERT, XLNet, XLM-RoBERTa도 비슷한 수준이었습니다. 전통적 모델 중에서는 SVM이 F1 점수 0.85를 기록했습니다. 이는 균형 잡힌 학습 데이터에서는 전통적 모델도 비교적 좋은 성능을 보일 수 있음을 보여줍니다.

이 결과는 D2라는 특정 균형 데이터셋과 해당 학습·평가 설정에서 얻은 것입니다. 두 사건의 실험 설정은 같지 않으며, 사건 2에서 D2를 ML 알고리즘에 입력했다는 기술과 표 4의 사건 1 전통 모델 결과는 구분해서 읽어야 합니다.

## 적용 범위와 한계

본 연구의 실험은 영어 텍스트로 제한된다고 명시됩니다. 따라서 결과는 다른 언어의 CB 탐지로 바로 확장되지 않으며, 저자들은 비영어 말뭉치로 LLM을 조정하는 연구와 다중 모달 접근을 향후 과제로 제시합니다.

또한 D1의 학습 크기는 본문에서 부정 클래스 10,702건과 양성 클래스 703건으로 기술되지만, 표 4는 부정 클래스 학습 크기를 10,792로 기재하여 두 값이 일치하지 않습니다. Yadav et al.의 BERT 결과는 오버샘플링된 데이터에서 시험되어 일반화 측면에서 신뢰하기 어렵다고 원문에서 지적됩니다.

## 논문 정보

- **저자**: Bayode Ogunleye, Babitha Dharmaraj
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2024년 2월 6일
- **등록일**: 2026년 11월 6일
- **수정일**: 2024년 2월 6일
- **버전**: v1
- **arXiv**: 2402.04088
- **DOI**: 10.3390/analytics2030038
- **분류**: cs.CL · cs.AI · cs.LG · stat.AP
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2402.04088v1) · [원문 PDF ↗](https://arxiv.org/pdf/2402.04088v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

The dominance of social media has added to the channels of bullying for perpetrators. Unfortunately, cyberbullying (CB) is the most prevalent phenomenon in todays cyber world, and is a severe threat to the mental and physical health of citizens. This opens the need to develop a robust system to prevent bullying content from online forums, blogs, and social media platforms to manage the impact in our society. Several machine learning (ML) algorithms have been proposed for this purpose. However, their performances are not consistent due to high class imbalance and generalisation issues. In recent years, large language models (LLMs) like BERT and RoBERTa have achieved state-of-the-art (SOTA) results in several natural language processing (NLP) tasks. Unfortunately, the LLMs have not been applied extensively for CB detection. In our paper, we explored the use of these models for cyberbullying (CB) detection. We have prepared a new dataset (D2) from existing studies (Formspring and Twitter). Our experimental results for dataset D1 and D2 showed that RoBERTa outperformed other models.

## 원문 인용

Bayode Ogunleye, Babitha Dharmaraj (2024). The Use of a Large Language Model for Cyberbullying Detection. arXiv:2402.04088v1. https://doi.org/10.3390/analytics2030038

**BibTeX**

```
@article{ogunleye2024large,
  title = {{The Use of a Large Language Model for Cyberbullying Detection}},
  author = {Bayode Ogunleye and Babitha Dharmaraj},
  year = {2024},
  eprint = {2402.04088},
  archivePrefix = {arXiv},
  doi = {10.3390/analytics2030038},
  url = {https://arxiv.org/abs/2402.04088v1}
}
```

## 이 논문의 용어

- [BERT](https://refivu.com/terms/45b639a1d317-bert)
- [recall](https://refivu.com/terms/3774987267f3-recall)
- [Precision](https://refivu.com/terms/29bee1303774-precision)
- [TF-IDF](https://refivu.com/terms/b8fd079027e3-tf-idf)
- [random forest](https://refivu.com/terms/e69b7b54f2ea-random-forest)
- [RoBERTa](https://refivu.com/terms/f42b278690e5-roberta)
- [Support Vector Machine](https://refivu.com/terms/34721f065497-support-vector-machine)
- [class imbalance](https://refivu.com/terms/4d21fc4ce21e-class-imbalance)
- [masked language model](https://refivu.com/terms/7ab0d97f6798-masked-language-model)
- [sBERT](https://refivu.com/terms/d551156f28b2-sbert)
- [XLM-RoBERTa](https://refivu.com/terms/3022c20cb935-xlm-roberta)
- [XLNet](https://refivu.com/terms/b2194e0b0811-xlnet)
- [F1 measure](https://refivu.com/terms/a39d1182351e-f1-measure)
- [GridSearchCV](https://refivu.com/terms/331f7cd2c14c-gridsearchcv)

## 다른 논문 해설

- [Large language models as oracles for instantiating ontologies with domain-specific knowledge](https://refivu.com/papers/85eee3df-5efc-4893-8031-73d3acb2845a-large-language-models-as-oracles-for-instantiating.md)
- [Chain-of-Thought in Neural Code Generation: From and For Lightweight Language Models](https://refivu.com/papers/38d5567d-a614-4267-bbb0-6d9799c3fb96-chain-of-thought-in-neural-code-generation-from.md)
- [Biomedical knowledge graph-optimized prompt generation for large language models](https://refivu.com/papers/e1838fc1-b401-4ed1-b5ff-698a296f92bb-biomedical-knowledge-graph-optimized-prompt-generation-for.md)
- [Towards Lifelong Learning of Large Language Models: A Survey](https://refivu.com/papers/ba5a697c-f7e4-4b23-ad05-f0baf14f4c7d-towards-lifelong-learning-of-large-language-models-a.md)
- [Interpretable Robot Control via Structured Behavior Trees and Large Language Models](https://refivu.com/papers/7176dc31-574b-4ce3-a08f-58ad945dedb2-interpretable-robot-control-via-structured-behavior-trees.md)
- [Evaluating Large Language Models for Health-Related Text Classification Tasks with Public Social Media Data](https://refivu.com/papers/a1752153-6f9d-4988-83f5-6982829af7f8-evaluating-large-language-models-for-health-related-text.md)
- [Accelerating Structure-Property Relationship Discovery with Multimodal Machine Learning and Self-Driving Microscopy](https://refivu.com/papers/dc9a1379-d408-4a74-8886-95481d9986ac-accelerating-structure-property-relationship-discovery-with.md)
- [A Survey on Deep Learning-Based Monocular Spacecraft Pose Estimation: Current State, Limitations and Prospects](https://refivu.com/papers/0b2151fa-78c7-4bc6-a0dc-c653c57cb42b-a-survey-on-deep-learning-based-monocular-spacecraft.md)
- [Deep convolutional neural networks to restore single-shot electron microscopy images](https://refivu.com/papers/ba99721e-608d-4e22-bb51-5fdee06fd5fc-deep-convolutional-neural-networks-to-restore-single-shot.md)
- [Trajectory Planning with Deep Reinforcement Learning in High-Level Action Spaces](https://refivu.com/papers/1e10f178-b947-4603-b813-00f8bb93e5cd-trajectory-planning-with-deep-reinforcement-learning-in-high.md)
- [Do Robots Really Need Anthropomorphic Hands? A Comparison of Human and Robotic Hands](https://refivu.com/papers/75c6b79a-683a-466b-bd9e-4c0ad8032765-do-robots-really-need-anthropomorphic-hands-a-comparison.md)
- [WaveMamba: Spatial-Spectral Wavelet Mamba for Hyperspectral Image Classification](https://refivu.com/papers/febd3e0d-6a93-4c53-b5e3-40ed091e1d5c-wavemamba-spatial-spectral-wavelet-mamba-for-hyperspectral.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/02cf43ba-f35c-4ece-875f-6d5aa3a362a9-the-use-of-a-large-language-model-for)
