Skip to main content
QUICK REVIEW

[Paper Review] Bergeron: Combating Adversarial Attacks through a Conscience-Based Alignment Framework

Matthew Pisano, Peter Ly|arXiv (Cornell University)|Nov 16, 2023
Advanced Malware Detection TechniquesComputer Science5 citations
TL;DR

Bergeron proposes a two-tiered LLM framework where a secondary 'conscience' model monitors and corrects unsafe inputs and outputs of a primary LLM, significantly improving robustness against adversarial attacks without fine-tuning. It reduces failure rates across multiple models—including GPT-3.5, Llama2-7B, and Mistral-7B—especially on high-risk prompts like shell emulation and list completion.

ABSTRACT

Research into AI alignment has grown considerably since the recent introduction of increasingly capable Large Language Models (LLMs). Unfortunately, modern methods of alignment still fail to fully prevent harmful responses when models are deliberately attacked. Such vulnerabilities can lead to LLMs being manipulated into generating hazardous content: from instructions for creating dangerous materials to inciting violence or endorsing unethical behaviors. To help mitigate this issue, we introduce Bergeron: a framework designed to improve the robustness of LLMs against attacks without any additional parameter fine-tuning. Bergeron is organized into two tiers; with a secondary LLM acting as a guardian to the primary LLM. This framework better safeguards the primary model against incoming attacks while monitoring its output for any harmful content. Empirical analysis reviews that by using Bergeron to complement models with existing alignment training, we can significantly improve the robustness and safety of multiple, commonly used commercial and open-source LLMs. Specifically, we found that models integrated with Bergeron are, on average, nearly seven times more resistant to attacks compared to models without such support.

Motivation & Objective

  • Address the persistent vulnerability of large language models to adversarial prompts that bypass existing alignment methods.
  • Overcome limitations of weight-based alignment techniques like RLHF, which are costly, incomplete, and can degrade model performance.
  • Develop a modular, non-invasive framework that enhances alignment without retraining the primary model.
  • Improve safety for both open-source and black-box LLMs by adding an external, transparent layer of oversight.
  • Demonstrate that a secondary LLM can act as a real-time, interpretable safeguard for primary model outputs and inputs.

Proposed method

  • Deploy a secondary LLM as a 'conscience' to monitor both input prompts and generated outputs of a primary LLM.
  • Use the conscience model to detect and correct potentially harmful content in real time, using plain-text critiques.
  • Apply two protection tiers: one for prompt correction before generation, and another for response correction after generation.
  • Leverage GPT-4 as a judge model to evaluate safety of responses, using a 3-shot prompt with alignment success/failure examples.
  • Implement the framework as a wrapper, ensuring minimal interference with the primary model’s original behavior.
  • Use iterative correction via a critique mechanism that can be applied multiple times, though current evaluation uses a single invocation.

Experimental results

Research questions

  • RQ1Can a secondary LLM effectively detect and correct unsafe content in both prompts and responses of a primary LLM without fine-tuning?
  • RQ2How does the performance of the Bergeron framework vary across models with different levels of pre-existing alignment (e.g., GPT-3.5 vs. Mistral-7B)?
  • RQ3What is the impact of model size and pre-existing alignment on the effectiveness of the conscience-based framework?
  • RQ4Which adversarial prompting techniques are most effective at bypassing the framework, and why?
  • RQ5How does the framework’s performance compare to the raw model across diverse attack types like shell emulation, list completion, and always machiavellian prompts?

Key findings

  • The Bergeron framework reduced failure rates across all evaluated models, with the most significant improvement seen in GPT-3.5, where the failure rate dropped substantially on all attack types.
  • Llama2-7B showed higher vulnerability to list completion attacks, while GPT-3.5 was more susceptible to shell emulation prompts, but Bergeron mitigated both effectively.
  • Mistral-7B, despite minimal alignment fine-tuning, showed a 4% to 11% reduction in failure rates, indicating the framework’s effectiveness even on under-aligned models.
  • The framework performed best on large, closed-source models with strong pre-existing alignment, suggesting synergy between weight-based and conscience-based alignment.
  • The conscience model successfully identified and corrected unsafe content in 100% of cases where GPT-4 judged the output as unsafe, demonstrating high detection accuracy.
  • The framework maintained performance across diverse attack types, including Always Machiavellian, Shell Emulation, and List Completion, indicating broad robustness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.