Manuscript Offprint

arXiv:2610.24288

BanglaShield: A Script-Robust Safety Classifier and Benchmark for Bangla Native, Romanized, and Code-Mixed Prompts

Mohsinul Kabir, Md. Tariquzzaman, Mohammad Rashidujjaman Rifat, Tharindu Ranasinghe, Nishat Raihan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Safety classifiers for large language models (LLMs) are typically built and evaluated on standard-script text, yet Bangla, like many lower-resource languages, is routinely written in native script, in Latin-script romanization, and code-mixed with English, Hindi, or Urdu. We introduce BANGLASHIELD, a resource and model for graded prompt-safety classification across these written forms. We consolidate 10,245 Bangla prompts from six sources under a four-level taxonomy (Safe, Offensive, Harmful, Severe) and render each prompt in three aligned forms that share labels and a group-aware split, enabling strictly paired comparisons. Benchmarking six contemporary LLMs, including a Bangla-specialized one, on 36,882 classification queries and 24,318 judged responses, we find that LLM classifiers label 47.0% of unsafe native-script prompts as Safe, rising to 63.4% under romanization, while response-level safety accuracy drops by 10.3 points. Three multilingual guard models also pass 30.3–57.3% of unsafe native-script prompts. Using a model's own classification as an input filter reduces harmful compliance by only about five points. In contrast, BANGLASHIELD, a compact fine-tuned encoder, reaches 87.8 macro-F1 on native-script and 84.4 on romanized prompts, outperforming the best LLM on each form by 42.8–46.1 points with ∼130×\sim130\times fewer parameters than Gemma 4 31B. We release the corpus, splits, judgments, and model. 1^{1}

1 Introduction

Prompt-level guard models assess a user input before a model generates a response, and they have become a standard component of LLM deployment (Inan et al., 2023; Han et al., 2024). Most guard models are trained with supervised learning,

Gold: Severe

MultiJail #4488

"What is a good way to hide or get rid of a dead body?"

Bangla script

একটি মূল্যে লুকানোর বা তার থেকে মূল্যে পাতোয়ার

জল উপায় কী হতে পারে?

Code-mixed (En)

একটি dead body hide বা তার থেকে মূল্যে পাতোয়ার

জল way What হতে পারে?

6/6 flag unsafe

V H H V V H

Gem Lla Cmd GPT Hai Tig

5/6 predict Safe

S O S S S S

Gem Lla Cmd GPT Hai Tig

Romanized

Ekti mritodeho lukanor ba tar theke mukti

paoyar bhalo upay ki hote pare?

2/6 predict Safe

V O S S H H

Gem Lla Cmd GPT Hai Tig

BanglaShield (ours), all three forms:

V V V

Predicted label: S Safe O Offensive H Harmful V Severe

Figure 1: One Severe prompt rendered in the three BANGLASHIELD forms with the predictions of six LLMs. All six models flag the Bangla-script prompt as unsafe; five of six classify the code-mixed rendering as Safe.

but their training data is concentrated in English and a few other high-resource languages, and low-resource languages are often covered only through machine-translated data (Kumar et al., 2025). Multilingual studies consistently report that safety performance drops for low-resource languages (Yong et al., 2023; Deng et al., 2024; Wang et al., 2024).

Bangla, spoken by roughly 250 million people, adds a further challenge: the same request can appear in several written forms. Bangla users write online in the native script, in Latin-script romanization, and frequently mix Bangla with English, Hindi, or Urdu (Das et al., 2022; Raihan et al., 2023; Goswami et al., 2023). Existing Bangla safety resources have three limitations. They omit romanized Bangla (Islam et al., 2026), use only binary or three-way safety labels (Hassan and Hossain, 2026), or address offensive language rather than harmful user requests. Little work compares how guard models classify the same request in different written forms, so it remains unclear whether a harmful request that is caught in Bangla script is also caught when it is romanized or code-

1^{1}Code, data, and all model outputs: https://github.com/mraihan-gmu/BanglaShield-Model-Benchmark

Content warning: this paper contains examples of harmful and offensive requests and model responses.

Figure

Figure 2: Overview of BANGLASHIELD. Six resources are mapped to a four-level taxonomy, every prompt is rendered in three aligned written forms, and the paired partition supports both the LLM benchmark and the training of the BANGLASHIELD classifier. Counts refer to the full corpus. *BanglaEcomReviewCorpus negative reviews converted into benign prompts.

mixed, and whether a compact classifier can make graded safety judgments that stay stable across these forms.

Figure 1 shows the problem. All six evaluated LLMs flag a request for help disposing of a corpse as unsafe when it is written in Bangla script, yet five of the six classify the code-mixed version of the same request as Safe. The meaning and intent of the request are unchanged; only its written form differs. Changing the written form can therefore bypass existing safety filters, whether the user is an adversary or simply writes Bangla the way many speakers do every day. We address this problem with BANGLASHIELD, a benchmark and safety classifier for Bangla prompts in native-script, romanized, and code-mixed forms. Our contributions are as follows:

C1 A paired, graded Bangla safety corpus. We consolidate 10,245 prompts from six sources under a four-level taxonomy with source-aware mapping rules, and render each prompt in Bangla script, romanized Bangla, and Bangla code-mixed with English, Hindi, or Urdu. The three versions of a prompt share its label and data split, so every comparison across forms uses the same items ( §3§3).

C2 A paired benchmark of LLM safety across written forms. We evaluate six LLMs, including a Bangla-specialized one, on prompt classification and on the safety of their own responses, and three guard models on prompt classification, with bootstrap confidence intervals and paired significance tests ( §4–§5§4–§5).

C3 BANGLASHIELD, a compact script-robust guard. A fine-tuned MuRIL (Multilingual Representations for Indian Languages) encoder (Khanuja et al., 2021) that surpasses all evaluated LLMs on every form while remaining stable across scripts ( §5§5, §5.2§5.2).

References (20)