MIPIAD: Multilingual Indirect Prompt Injection Attack Defense with Qwen–TF-IDF Hybrid and Meta-Ensemble Learning

Al Muhit Muhtadi, Mostafa Rifat Tazwar · 2026

Read MIPIAD: Multilingual Indirect Prompt Injection Attack Defense with Qwen–TF-IDF Hybrid and Meta-Ensemble Learning by Al Muhit Muhtadi, Mostafa Rifat Tazwar (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-07269.txt.

Introduction

Al Muhit Muhtadi and Mostafa Rifat Tazwar defend retrieval-based language systems against indirect prompt injection in more than one language. Attacks hide instructions inside retrieved content, and multilingual settings make them harder to characterize. Their MIPIAD framework combines a fine-tuned sequence classifier with classic word-frequency features and tuned ensemble methods.

Testing used a synthetic benchmark of well over a million samples across email, table, question answering, abstract, and code tasks, in English and Bangla. Lexical features alone were already strong, and the hybrid ensemble reached the best overall detection score. Ensembles consistently shrank the performance gap between the two languages.

Catalog record

CREATORAl Muhit Muhtadi, Mostafa Rifat Tazwar
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE25 KB
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.07269

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

MIPIAD: Multilingual Indirect Prompt Injection Attack Defense with Qwen–TF-IDF Hybrid and Meta-Ensemble Learning Al Muhit Muhtadi, Mostafa Rifat Tazwar Abstract Indirect prompt injection remains a persistent weakness in retrieval-augmented and tool-using LLM systems, and the problem becomes harder to characterise in multilingual settings. We present MIPIAD , a defense framework evaluated on English and Bangla that combines a sequence classifier fine-tuned from Qwen2.5-1.5B via LoRA (XLPID), TF-IDF lexical features, and validation-tuned ensembling through late fusion, stacking, and gradient boosting. The framework is evaluated on a synthetic benchmark built from BIPIA ( 15 ) templates spanning five task families—email, table, QA, abstract, and code—comprising over 1.43 million generated samples, with train and test splits using mutually exclusive attack categories. Across the experiments, lexical signals prove unexpectedly strong (TF-IDF+SVM F1=0.77), and the hybrid XLPID+TF-IDF ensemble achieves the best overall F1 (0.9205) while the Boosting Ensemble achieves the best AUROC (0.9378). Ensemble methods consistently reduce the English–Bangla cross-lingual gap relative to standalone neural models. The pipeline is designed for extensibility: NLLB-200 supports over 200 languages and XLPID’s multilingual backbone can be retargeted to additional languages without architectural changes; empirical validation is currently limited to English and Bangla. 1 Introduction Prompt injection can make an LLM ignore the user’s intent, expose sensitive information, or carry out unsafe tool actions. The harder case is indirect prompt injection, where malicious instructions are hidden inside retrieved documents, emails, tables, web pages, or code rather than in the user’s query ( 9 ) . That setting is still underexplored once the input stream is multilingual. In practice, systems see a mix of languages, domains, and formatting styles, so a defense that works only in one language or one surface is not enough. This paper studies that more realistic setting and presents MIPIAD (Multilingual Indirect Prompt Injection Attack Defense), a full pipeline for cross-lingual detection and evaluation. MIPIAD is empirically validated on English and Bangla; the underlying components—NLLB-200 translation and a multilingual LLM backbone—are designed to extend to additional languages without architectural modification. We make four contributions: • A unified multilingual data pipeline that generates English/Bangla indirect prompt-injection samples across five tasks, forming a massive dataset of over 1.43M templates. • XLPID , a cross-lingual prompt injection detector utilizing efficient Low-Rank Adaptation (LoRA) over robust LLM backbones. • Meta-ensemble strategies (stacking and boosting) integrating LLM-based probability metrics with explicit TF-IDF lexical priors. • Strong baseline comparisons showing that hybridization outperforms isolated neural models (F1: 0.9205 vs. 0.8939 for the best standalone, a 2.7-point gain). 2 Related Work Indirect Prompt Injection. Early work established prompt injection as a major security threat ( 9 ) , which quickly proved highly applicable to real-world Retrieval-Augmented Generation (RAG) and LLM-integrated agent applications via indirect injections ( 3 ) . To standardize evaluation, researchers introduced tailored benchmarks such as LLM-PIRATE ( 11 ) for comprehensive evaluations and LLMail-Inject ( 1 ) for realistic, adaptive threat scenarios. Defensive Mechanisms. Defenses fall into three families. Input-filtering : PromptGuard ( 7 ) screens inputs with a fine-tuned BERT classifier; SpotLight ( 5 ) injects formatting markers into trusted context to help the LLM distinguish it from retrieved content. Instruction-isolation : InstructDetector ( 14 ) identifies instruction states to limit injection blast radius; CachePrune ( 13 ) prunes malicious context via neuron-level attribution. Output-smoothing : SmoothLLM ( 12 ) applies input perturbation with majority voting, though at high inference cost and without evaluation on indirect retrieval injection; MELON ( 16 ) protects agentic tool-use trajectories. MIPIAD belongs to the input-filtering family, but uniquely combines lexical and neural signals, spans five task families, and operates on multilingual inputs. None of the above defenses has been evaluated on Bangla or on large-scale multilingual indirect injection benchmarks; Section 5.4 provides the first cross-lingual end-to-end victim evaluation for this class of defense. Multilingual Safety Gap. Most existing literature still assumes an English-heavy setting. Cross-lingual transfer is less understood for prompt-injection defense, where translations and domain shifts can dilute injection signatures and increase the false negative rate. To our knowledge, prior work has not united the multilingual and indirect axes into a generalized detection framework. 3 MIPIAD Benchmark 3.1 Threat Model and Task Definition We study binary detection over text inputs where the label y\in\{0,1\} indicates whether an indirect injection is present. Each sample is language-specific (EN or BN) and includes metadata for task, attack type, and insertion position. The defender’s goal is to accurately detect embedded instructions before downstream victim LLMs consume them. English Attack Templates (BIPIA ( 15 ) ) NLLB-200 Translation (EN to BN) Bilingual Attack Texts Task Contexts (EN) (Email, Tables, QA, Abstract, Code) NLLB-200 Translation (EN to BN) Bilingual Contexts Sample Composition (Inject at Start/Mid/End) MIPIAD Dataset (1.43M Raw Samples) Figure 1: MIPIAD data generation pipeline. English strings and contexts are translated to Bangla using NLLB-200, then contextually composed to create a balanced bilingual dataset. 3.2 Multilingual Sample Construction Figure 1 illustrates the data engineering pipeline. MIPIAD generation follows three main steps: 1. Translate attack templates from English to Bangla with Meta’s NLLB-200 ( 8 ) . 2. Translate task contexts across five families (email, table, QA, abstract, code) into Bangla. 3. Compose poisoned samples by injecting attack texts at the start, middle, or end of the contexts; generate benign samples from clean contexts. To ensure robustness, our data generator yields an extensive matrix: 15 unique text attack categories and 10 code-specific attack categories, each with 5 variants. Combining these with 3 insertion positions and 2 languages (EN/BN) results in exactly 1,431,400 raw samples. Crucially, to prevent cross-lingual data leakage, train and test splits are explicitly partitioned at the context level. All language translations for a single context are securely bounded within identical splits. Furthermore, to evaluate genuine generalization capabilities rather than rote memorization, the training and testing sets utilize completely mutually exclusive attack categories and variants. 4 Methodology 4.1 XLPID Architecture The core neural detector of our framework is XLPID (Cross-Lingual Prompt Injection Detector). Figure 2 provides a structural overview of the classification scheme. Input Document (EN/BN) LLM Backbone (e.g., Qwen) Weights frozen in bf16 LoRA fp32 Context Pooling Sequence Classification Head Injection Logits ( p_{t} ) Figure 2: XLPID architecture utilizing parameter-efficient LoRA adapters alongside a sequential classification head. XLPID is a direct sequence-classification wrapper over a frozen LLM backbone, using the backbone’s built-in classification head (context pooling layer followed by a two-label linear projection). XLPID supports multiple backbone families including Qwen2.5 ( 10 ) and DeBERTa ( 4 ) ; all results in this paper use Qwen/Qwen2.5-1.5B as the backbone. Base weights are kept in bfloat16 to reduce VRAM while LoRA adapters (rank=16, \alpha =32) targeting q_proj and v_proj are trained in float32 . 4.2 Meta-Ensembles and Lexical Baselines We compare XLPID against isolated contextual backbones (XLM-RoBERTa ( 6 ) , mBERT ( 2 ) ) and powerful lexical baselines (TF-IDF + LR, TF-IDF + SVM) comprising 10,000 top n-gram features (sizes 1–3). Furthermore, we evaluate two meta-ensembles synthesizing transformer and lexical streams into a unified prediction: • Hybrid late fusion : Combining XLPID transformer probabilities ( p_{t} ) and TF-IDF probabilities ( p_{l} ) via p=\alpha p_{t}+(1-\alpha)p_{l} . The mixing weight \alpha is selected by grid search over 21 evenly spaced values in [0,1]

Read the complete text