Skip to main content
QUICK REVIEW

[Paper Review] On the Safety of Open-Sourced Large Language Models: Does Alignment Really Prevent Them From Being Misused?

Hangfan Zhang, Zhimeng Guo|arXiv (Cornell University)|Oct 2, 2023
Topic ModelingComputer Science5 citations
TL;DR

This paper introduces ProMan, a model-hacking attack that manipulates the probability distribution during text generation in open-sourced, aligned large language models (LLMs), enabling them to produce harmful or private content without complex prompt engineering. The method successfully bypasses alignment safeguards across four LLMs, demonstrating that current alignment techniques are insufficient to prevent misuse.

ABSTRACT

Large Language Models (LLMs) have achieved unprecedented performance in Natural Language Generation (NLG) tasks. However, many existing studies have shown that they could be misused to generate undesired content. In response, before releasing LLMs for public access, model developers usually align those language models through Supervised Fine-Tuning (SFT) or Reinforcement Learning with Human Feedback (RLHF). Consequently, those aligned large language models refuse to generate undesired content when facing potentially harmful/unethical requests. A natural question is "could alignment really prevent those open-sourced large language models from being misused to generate undesired content?''. In this work, we provide a negative answer to this question. In particular, we show those open-sourced, aligned large language models could be easily misguided to generate undesired content without heavy computations or careful prompt designs. Our key idea is to directly manipulate the generation process of open-sourced LLMs to misguide it to generate undesired content including harmful or biased information and even private data. We evaluate our method on 4 open-sourced LLMs accessible publicly and our finding highlights the need for more advanced mitigation strategies for open-sourced LLMs.

Motivation & Objective

  • To investigate whether alignment in open-sourced LLMs truly prevents misuse for generating harmful or private content.
  • To develop a practical attack method that exploits the generation process of open-sourced LLMs without requiring heavy computation or prompt engineering.
  • To demonstrate that even aligned LLMs remain vulnerable to misuse through direct manipulation of probability distributions.
  • To propose potential countermeasures for pre-training and post-training stages to mitigate such model-hacking threats.

Proposed method

  • ProMan directly manipulates the probability distribution of tokens during the autoregressive generation process of open-sourced LLMs.
  • It forces the model to generate specific, affirmative tokens (e.g., 'Absolutely! Here’s') at the beginning of responses to malicious prompts.
  • The attack uses a differentiable optimization process to adjust the logits of target tokens, increasing their probability to near certainty.
  • A key hyperparameter δ controls the magnitude of the probability shift, with δ = 200 used in experiments to ensure reliable token generation.
  • The method targets the first few output tokens to 'unlock' the model’s generation for harmful or private content.
  • It is applied without modifying model weights, making it a lightweight, post-alignment attack.

Experimental results

Research questions

  • RQ1Can open-sourced, aligned LLMs still be misused to generate harmful content despite alignment techniques like SFT and RLHF?
  • RQ2Is it possible to bypass alignment safeguards through direct manipulation of the generation process rather than prompt engineering?
  • RQ3How effective is ProMan in eliciting private data or harmful content from multiple open-sourced LLMs?
  • RQ4What are the limitations of current alignment strategies in preventing model-hacking attacks?
  • RQ5What post-training or pre-training countermeasures could mitigate such attacks?

Key findings

  • ProMan achieved a 100% attack success rate (ASR-P) on Vicuna, Llama-2-LoRA, and Marcoroni, and 95% on ChatGLM when requesting private data.
  • The attack success rate for harmful content was 91% on Vicuna and 95% on Llama-2-LoRA, indicating strong effectiveness across models.
  • ProMan outperformed heuristic and optimization-based baselines in all evaluated LLMs, with higher ASR-P and ASR-A scores.
  • The method successfully generated real, authentic private data such as phone numbers and email addresses, as confirmed by regular expression matching in case studies.
  • Current alignment is insufficient to prevent privacy leakage, as evidenced by higher ASR-A for private data than for harmful content.
  • The study reveals that model-hacking via probability manipulation poses a serious, underappreciated threat to open-sourced LLM safety.

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.