This paper presents a model that detects harmful prompts in the Filipino language. Textual data was collected and translated into Filipino manually and through the use of Google’s language translation API. The translated text was annotated with ‘1’ to represent safe prompts, ‘0’, otherwise. The preprocessed input data is processed through the model, which consists of using the transformer pipelines, namely, DistilmBERT-Base, (XLM-RoBERTa (xlm-roberta-base), and Multilingual BERT (bert-base-multilingual). These pipelines performed better than in processing Filipino text data for hate speech. The tokens which are output of the mentioned Transformer models will be input into a fully connected linear layer and a sigmoid function. Two linear layers to the output were added to perform binary classification. The first layer is a fully connected dense layer with ReLU activation function, and the second layer is designed to produce a single output unit followed by a sigmoid function. The LlaMa-3.3-70B and Mixtral-8 × 7B chat models serve as the target LLM for the prompts. The performance of the model was assessed using the Attack Success Rate (ASR). The ASR was identified using LLaMa-3.3-70B and Mixtral-8 × 7B model, which initially stand at 29.36% and 34.45%, respectively, without any of the transformer model. The ASR lowered to the following values, 0.73, 0.44, and 0.44% using LlaMa-3.3-70B and 0.29, 0.29, 0.29% using Mixtral-8 × 7B for the ensemble model using DistilmBERT-Base, (XLM-RoBERTa (xlm-roberta-base), and Multilingual BERT (bert-base-multilingual), respectively. This shows that the ensemble model performed better than the LLaMa-3.3-70B and Mixtral-8 × 7B alone in identifying harmful prompts in the Filipino language.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

FilShield: Harmful Query Detection in Large Language Model for the Filipino Language

  • Charmaine Ponay,
  • Vladimir Mariano

摘要

This paper presents a model that detects harmful prompts in the Filipino language. Textual data was collected and translated into Filipino manually and through the use of Google’s language translation API. The translated text was annotated with ‘1’ to represent safe prompts, ‘0’, otherwise. The preprocessed input data is processed through the model, which consists of using the transformer pipelines, namely, DistilmBERT-Base, (XLM-RoBERTa (xlm-roberta-base), and Multilingual BERT (bert-base-multilingual). These pipelines performed better than in processing Filipino text data for hate speech. The tokens which are output of the mentioned Transformer models will be input into a fully connected linear layer and a sigmoid function. Two linear layers to the output were added to perform binary classification. The first layer is a fully connected dense layer with ReLU activation function, and the second layer is designed to produce a single output unit followed by a sigmoid function. The LlaMa-3.3-70B and Mixtral-8 × 7B chat models serve as the target LLM for the prompts. The performance of the model was assessed using the Attack Success Rate (ASR). The ASR was identified using LLaMa-3.3-70B and Mixtral-8 × 7B model, which initially stand at 29.36% and 34.45%, respectively, without any of the transformer model. The ASR lowered to the following values, 0.73, 0.44, and 0.44% using LlaMa-3.3-70B and 0.29, 0.29, 0.29% using Mixtral-8 × 7B for the ensemble model using DistilmBERT-Base, (XLM-RoBERTa (xlm-roberta-base), and Multilingual BERT (bert-base-multilingual), respectively. This shows that the ensemble model performed better than the LLaMa-3.3-70B and Mixtral-8 × 7B alone in identifying harmful prompts in the Filipino language.