Skip to main content
QUICK REVIEW

[論文レビュー] Fine-Tuning Llama 2 Large Language Models for Detecting Online Sexual Predatory Chats and Abusive Texts

Thanh Thi Nguyen, Campbell Wilson|arXiv (Cornell University)|Aug 28, 2023
Hate Speech and Cyberbullying Detection被引用数 5
ひとこと要約

この論文では、英語、ローマ・ウルドゥー語、ウルドゥー語のデータセットにおいて、オープンソースのLlama 2 7B大規模言語モデルをLoRAを用いて微調整することで、オンラインでの性的な誘いの会話や攻撃的テキストの検出を提案している。このアプローチは、多様なデータサイズ、不均衡度、言語において強力で一貫性のあるパフォーマンスを達成しており、非英語データが限定的であっても従来の手法を上回っている。これは、多言語デジタルセーフティアプリケーションにおける有害コンテンツ検出の汎用的で自動化されたソリューションを示している。

ABSTRACT

Detecting online sexual predatory behaviours and abusive language on social media platforms has become a critical area of research due to the growing concerns about online safety, especially for vulnerable populations such as children and adolescents. Researchers have been exploring various techniques and approaches to develop effective detection systems that can identify and mitigate these risks. Recent development of large language models (LLMs) has opened a new opportunity to address this problem more effectively. This paper proposes an approach to detection of online sexual predatory chats and abusive language using the open-source pretrained Llama 2 7B-parameter model, recently released by Meta GenAI. We fine-tune the LLM using datasets with different sizes, imbalance degrees, and languages (i.e., English, Roman Urdu and Urdu). Based on the power of LLMs, our approach is generic and automated without a manual search for a synergy between feature extraction and classifier design steps like conventional methods in this domain. Experimental results show a strong performance of the proposed approach, which performs proficiently and consistently across three distinct datasets with five sets of experiments. This study's outcomes indicate that the proposed method can be implemented in real-world applications (even with non-English languages) for flagging sexual predators, offensive or toxic content, hate speech, and discriminatory language in online discussions and comments to maintain respectful internet or digital communities. Furthermore, it can be employed for solving text classification problems with other potential applications such as sentiment analysis, spam and phishing detection, sorting legal documents, fake news detection, language identification, user intent recognition, text-based product categorization, medical record analysis, and resume screening.

研究の動機と目的

  • 異なるデータセットに対して、顕著なハイパーパrameterチューニングや手作業による特徴工学的設計を必要とする従来のテキスト分類手法の限界を克服すること。
  • 大規模言語モデル(LLM)を用いて、オンラインでの性的な誘いの行動や攻撃的言語を検出する汎用的で自動化されたアプローチを開発すること。
  • 言語(英語、ローマ・ウルドゥー語、ウルドゥー語)、データサイズ、クラスの不均衡度といった多様なデータ特性における微調整済みLlama 2のパフォーマンスを評価すること。
  • 特に低リソースのデータセットにおいて、非英語言語(ウルドゥー語など)の有害コンテンツ検出にLLMを用いる可能性を実証すること。
  • 予期せぬ性的な会話検出の範囲を超えて、実世界のデジタルセーフティアプリケーションに適用可能なスケーラブルな、ワンサイズ・フィットスモールのソリューションを確立すること。

提案手法

  • テキスト分類タスクに効率的に適応できるように、LoRA(低ランク微調整)手法を用いてLlama 2 7B LLMを微調整すること。
  • データサイズやクラスの不均衡度が異なる3つの異なるデータセット(英語、ローマ・ウルドゥー語、ウルドゥー語)で学習すること。
  • LLMの事前学習済みの世界知識と文脈理解力を活用するゼロショットからFew-shotへの微調整戦略を採用すること。
  • 有害または誘いの内容を予測するための標準的なテキスト分類ヘッドと交差エントロピー損失を用いること。
  • すべてのデータセットおよび言語バージョンにおいて、標準的な自然言語処理指標(正確度、適合率、再現率、F1スコア)を用いてパフォーマンスを評価すること。
  • 再トレーニングをほとんど行わずに、モデルの挙動を検出タスクに合わせるためのプロンプト工学およびインstructチューニングを適用すること。

実験結果

リサーチクエスチョン

  • RQ1微調整済みのLlama 2 7B LLMは、データサイズ、不均衡度、言語が異なる多様なデータセットにおいて、一貫性があり高いパフォーマンスを達成できるか?
  • RQ2手作業による特徴工学的設計や分類器選択に依存する従来の機械学習パイプラインと比較して、LLMベースのアプローチは優れているか?
  • RQ3特に英語とは異なるスクリプトを使用する言語(ウルドゥー語など)において、LLMアプローチは攻撃的・誘いのコンテンツ検出にどの程度有効か?
  • RQ4微調整済みLLMは、短いチャット文や長い攻撃的メッセージなど、さまざまなテキスト長さや種別に一般化できるか?
  • RQ5LoRA微調整は、専門的な検出タスクに適応させつつ、LLMの一般知識をどの程度保持できるか?

主な発見

  • 微調整済みLlama 2 7Bモデルは、ローマ・ウルドゥー語データセットでF1スコア99.2%を達成し、先行研究のCNN(91.6%)やLogitBoost(99.2%)を上回った。
  • 訓練データがたった1,736件のウルドゥー語データセットで、低リソース環境にもかかわらず、強力なパフォーマンスを示した。これは、大多数の従来手法を上回った。
  • データサイズ、不均衡度、言語に関係なく、英語、ローマ・ウルドゥー語、ウルドゥー語の3つのデータセットすべてで一貫したパフォーマンスを示した。
  • LLMベースのアプローチにより、手作業による特徴工学的設計や分類器選択の必要がなくなり、汎用的で自動化されたパイプラインが実現した。
  • さまざまなテキスト長さにわたって頑健な性能を示し、短いチャットメッセージや長い攻撃的コンテンツの両方に適していることが示された。
  • 結果から、LoRAによる微調整済みLlama 2は、ヘートスピーチ、サイバーグルーミング、有害コンテンツ検出を含む、多言語オンラインセーフティ分野における実世界の応用に効果的に展開可能であると考えられる。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。