FLAME: Flexible LLM-Assisted Moderation Engine DOI: XXXXXXX.XXXXXXX CCS: Computing methodologies Natural language processing CCS: Social and professional topics Censoring filters

Ivan Bakulin, Ilia Kopanichuk, Iaroslav Bespalov, Nikita Radchenko, Vladimir Shaposhnikov, Dmitry V. Dylov, Ivan Oseledets · 2025

Read FLAME: Flexible LLM-Assisted Moderation Engine DOI: XXXXXXX.XXXXXXX CCS: Computing methodologies Natural language processing CCS: Social and professional topics Censoring filters by Ivan Bakulin, Ilia Kopanichuk, Iaroslav Bespalov, Nikita Radchenko, Vladimir Shaposhnikov, Dmitry V. Dylov, Ivan Oseledets (2025) 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-2502-09175.txt.

Introduction

Ivan Bakulin and six co-authors build FLAME, a moderation engine that checks model replies, not user prompts. Their paper is from two thousand twenty-five; the pack row gives no title or year, so the text head is the source. Prompt filters have proved weak: best-of-many jailbreak tries break top models most of the time.

By grading the reply, FLAME is cheap to train and run, hard for such attacks to dodge, and free to retune by topic lists. Tests cut attack wins on two known models by near ninefold at low cost. Wide checks span models and attack kinds. The shift from gate at the door to check at the exit is the core move.

Catalog record

CREATORIvan Bakulin, Ilia Kopanichuk, Iaroslav Bespalov, Nikita Radchenko, Vladimir Shaposhnikov, Dmitry V. Dylov, Ivan Oseledets
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE23 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2502-09175

Browse the full library · About the Tower of Babel

Full text

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

FLAME: Flexible LLM-Assisted Moderation Engine DOI: XXXXXXX.XXXXXXX CCS: Computing methodologies Natural language processing CCS: Social and professional topics Censoring filters Ivan Bakulin, Ilia Kopanichuk, Iaroslav Bespalov, Nikita Radchenko, Vladimir Shaposhnikov, Dmitry V. Dylov, Ivan Oseledets Abstract . The rapid advancement of Large Language Models (LLMs) has introduced significant challenges in moderating user-model interactions. While LLMs demonstrate remarkable capabilities, they remain vulnerable to adversarial attacks, particularly “jailbreaking” techniques that bypass content safety measures. Current content moderation systems, which primarily rely on input prompt filtering, have proven insufficient, with techniques like Best-of-N (BoN) jailbreaking achieving success rates of 80% or more against popular LLMs. In this paper, we introduce Flexible LLM-Assisted Moderation Engine (FLAME): a new approach that shifts the focus from input filtering to output moderation. Unlike traditional circuit-breaking methods that analyze user queries, FLAME evaluates model responses, offering several key advantages: (1) computational efficiency in both training and inference, (2) enhanced resistance to BoN jailbreaking attacks, and (3) flexibility in defining and updating safety criteria through customizable topic filtering. Our experiments demonstrate that FLAME significantly outperforms current moderation systems. For example, FLAME reduces attack success rate in GPT-4o-mini and DeepSeek-v3 by a factor of ∼ \sim 9, while maintaining low computational overhead. We provide comprehensive evaluation on various LLMs and analyze the engine’s efficiency against the state-of-the-art jailbreaking. This work contributes to the development of more robust and adaptable content moderation systems for LLMs. 1. Introduction Content moderation for Large Language Models (LLMs) represents a critical challenge in ensuring safe and appropriate human-AI interactions. While traditional content moderation approaches have focused primarily on input filtering ( Huang 2024 ) , the increasing sophistication of adversarial techniques necessitates a fundamental shift in how we approach this problem. The main purpose of content moderation is to limit the processing of requests that do not align with the system’s intended use. This serves several crucial functions: prevents errors in specialized applications like medical consultation, eliminates irrelevant or potentially harmful data that may interfere with model performance, and reduces the risks associated with malicious information or legal violations ( Chua et al. 2024 ) . Current moderation systems typically rely on input filtering to identify and block potentially harmful queries before they reach the model. However, recent developments in jailbreaking techniques, particularly the Best-of-N (BoN) approach, have exposed significant vulnerabilities in existing moderation systems. These techniques exploit the probabilistic nature of LLM outputs through multiple sampling attempts, achieving concerning success rates of 80% or higher against popular models ( Hughes et al. 2024 ) . The effectiveness of these attacks highlights a critical gap in current defensive approaches, which predominantly focus on analyzing user inputs rather than model outputs. Our work introduces FLAME (Flexible LLM-Assisted Moderation Engine), shifting the focus from input filtering to output moderation through an efficient regulatory policy. Unlike existing solutions that require extensive computational resources or complex neural architectures, FLAME employs a lightweight approach that can be deployed with minimal requirements. This design choice not only makes the system more accessible but also enables rapid adaptation to emerging threats through customizable topic filtering. The flexibility of FLAME’s architecture addresses one key limitation in current moderation systems: the ability to quickly adapt to new types of harmful content while maintaining efficient operation. Our approach allows organizations to define and update their moderation criteria based on specific needs and emerging challenges, without requiring significant retraining or computational resources. Recent work on constitutional AI and classifier-based approaches ( Sharma et al. 2025a ) has demonstrated the potential of sophisticated moderation systems. However, these solutions often demand substantial computational resources for both training and inference. In contrast, FLAME demonstrates that effective moderation can be achieved through carefully designed rule-based systems enhanced by LLM-generated training data. Through extensive experimentation and real-world deployment, we have validated this approach across multiple leading LLM platforms, consistently achieving a 2-9 \times improvement in resistance to BoN attacks. Contributions This work advances the field of LLM content moderation in several ways. • We introduce an output-centered moderation approach that provides superior protection against state-of-the-art jailbreaking techniques while maintaining minimal computational requirements. • We jailbreak 6 popular LLMs with and without our moderation engine, demonstrating an up to 9-fold improvement in their resistance to adversarial attacks . • Our engine challenges the prevailing trend towards resource-intensive censorship, demonstrating that effective moderation can be achieved without extensive model fine-tuning or complex neural architectures. • We report practical insights from deployment of the moderation engine into a dialogue system product, addressing critical considerations from the standpoint of user experience and finding the delicate balance between moderation strictness and system accessibility. 2. Related work Classifier guards. Markov et al. ( Markov et al. 2023 ) proposed an active learning strategy that identifies relevant samples for labeling, balances between uncertainty and diversity, and leverages redundancy to capture rare events. Rebedea et al. ( Rebedea et al. 2023 ) developed guardrails control LLM output, preventing harmful topics, following dialogue paths, and maintaining language styles. Chi et al. ( Chi et al. 2024 ) introduced multimodal LLM-based safeguard that classifies content as safe or unsafe based on user-provided guidelines, conversation context, and output formats. Kim et al. ( Kim et al. 2024 ) highlight the necessity of developing better definitions for unsafe outputs. Wang et al. ( Wang et al. 2024 ) point to challenges in jailbreak defense even in narrow contexts, suggests future directions involving classifier calibration and human feedback integration, suggesting future directions involving classifier calibration and human feedback integration. Sharma et al. ( Sharma et al. 2025b ) proposed "Constitutional Classifiers", which use natural-language rules to train classifier safeguards defining what constitutes permitted and restricted content. Jailbreaking Lapid et al. ( Lapid et al. 2024 ) developed a black-box Genetic Algorithm (GA) to manipulate LLMs. Huang et al. ( Huang et al. 2023 ) show that manipulation of generation strategies, such as removing system prompts and altering decoding parameters, can easily disrupt model alignment. Samvelyan et al. ( Samvelyan et al. 2024 ) introduced "Rainbow Teaming" methodology that sefines features like risk category and attack style to diversify prompts and rank them based on their effectiveness. Doumbouya et al. ( Doumbouya et al. 2024 ) developed an open-source automated red-teaming platform for generating and analyzing jailbreak attacks. Andriushchenko et al. ( Andriushchenko et al. 2024 ) applied prompt templates, random suffix search, self transfer from easier tasks, transfer and prefilling attacks and showed that adaptive attacks are necessary to accurately assess LLM robustness. Hughes et al. ( Hughes et al. 2024 ) proposed "Best-of-N (BoN) Jailbreaking," a black-box algorithm and demonstrated its effectiveness across text, vision, and audio language models, achieving high Attack Success Rates (ASR). 3. Method Algorithm 1 FLAME Training Pipeline 1: 2: topics - list of sensitive topics to filter 3: training_dialogs - collection of safe dialogues 4: 5: blacklist - set of filtered phrases 6: function GenerateMessages (topics) 7: messages \leftarrow [] 8: for all topic in topics do 9: // Generate variations using LLM 10: variations \leftarrow GenerateTopicVariations (topic, n=30) 11: // Create semantic neighbors for robustness 12: messages \leftarrow messages \cup CreateSemanticMessages (variations, k=20) 13: end for 14: return messages 15: end function 16: function AssembleTrainingCollection (dialogs) 17:

Read the complete text