Table of Contents
Adversarial Attack" >Adversarial Attack
Related research" >Related research
Experimental Process" >Experimental Process
Experimental results" >Experimental results
Home Technology peripherals AI Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

May 07, 2024 pm 07:20 PM
Model train

Large model has been exposed to safety issues again!

Recently, researchers from Enkrypt AI published shocking research results: quantization and fine-tuning can actually reduce the security of large models!

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Paper address: https://arxiv.org/pdf/2404.04392.pdf

at In the author's actual tests, basic models such as Mistral and Llama, including their fine-tuned versions, were not spared.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

After quantification or fine-tuning, the risk of LLM being jailbroken is greatly increased.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

——LLM: My effects are amazing, I am omnipotent, I am riddled with holes...

Perhaps, for a long time to come, the offensive and defensive wars over various vulnerabilities in large models will not stop.

Due to principle problems, AI models are naturally both robust and fragile. Among the huge number of parameters and calculations, some are irrelevant, but a small part are crucial. important.

To some extent, the security problems encountered by large models are in line with the CNN era.

Use special prompts and special characters Inducing LLM to produce toxic output, including the previously reported methods of exploiting the long context feature of LLM and using multiple rounds of dialogue to jailbreak, can be called adversarial attacks.

Adversarial Attack

In the CNN era, by changing a few pixels of the input image, AI can be The model misclassifies the image, and the attacker can even trick the model into outputting a specific category.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

The above figure shows the process of adversarial attack. For the convenience of observation, the random disturbance in the middle has been exaggerated.

In practice, for adversarial attacks, only small changes in pixel values ​​are needed to achieve the attack effect.

What’s even more dangerous is that researchers have discovered that this kind of attack behavior in the virtual world can be transferred to the real world.

The "STOP" sign in the picture below comes from a famous previous work. By adding some seemingly unrelated graffiti to the sign, the autonomous driving system can mistake the stop sign for the sign. Recognized as a speed limit sign.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

——This sign was later collected in the London Science Museum to remind the world to always pay attention to the hidden risks of AI models.

Such damage currently suffered by large language models includes but may not be limited to: jailbreaking, prompt injection attacks, privacy leak attacks, etc.

For example, the following example uses multiple rounds of dialogue to jailbreak:

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

The following picture shows A prompt injection attack that uses angle brackets to hide malicious instructions in the prompt. As a result, GPT-3.5 ignores the original instruction that summarizes the text and starts "making missile with sugar".

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

To deal with this type of problem, researchers generally use targeted adversarial training to keep the model aligned with human values.

But in fact, there may be endless prompts that can induce LLM to produce malicious output. Faced with this situation, what should the red team do?

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

The defense end can use automated search, while the attack end can use another LLM to generate prompts to help jailbreak.

In addition, most of the current attacks against large models are black box, but as our understanding of LLM deepens, more white box attacks will continue to be added.

But don’t worry, the troops will come to cover up the water and the soil, the relevant research has already been rolled up .

The editor did a casual search and found that there were many related works in this year's ICLR alone.

For example, the following Oral:

Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Paper address: https://openreview.net/pdf?id=hTEGyKf0dZ

This work is very similar to the article introduced today: fine-tuning LLM will bring security risks.

Researchers fine-tuned LLM with just a few adversarial training samples to break its secure alignment.

One example uses only 10 samples to fine-tune GPT-3.5 Turbo through OpenAI's API, which costs less than $0.20, allowing the model to respond to almost any harmful instructions.

Also, even without malicious intent, simply using benign and commonly used datasets for fine-tuning can inadvertently degrade the security alignment of LLM.

Another example is the following Spolight:

Jailbreak in pieces: Compositional Adversarial Attacks on Multi-Modal Language Models ,

Introduces a new jailbreak attack method targeting visual language models:

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Paper address: https://openreview.net/pdf?id=plmBsXHxgR

The researchers paired adversarial images processed by visual encoders with textual prompts to destroy Cross-modal alignment of VLM.

Moreover, the threshold for this attack is very low and does not require access to LLM. When a visual encoder like CLIP is embedded in a closed-source LLM, the jailbreak success rate is very high.

There are many more, so I won’t list them all here. Let’s take a look at the experimental part of this article.

Experimental details

The researchers used an adversarial harmful prompt subset called AdvBench SubsetAndy Zou, containing 50 prompts, requiring Provides 32 categories of harmful information. It is a hint subset of the harmful behavior dataset in the AdvBench benchmark.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

The attack algorithm used in the experiment is tree-of-attacks pruning (TAP), which achieves three important goals:

(1) Black box: the algorithm only requires black box access to the model;

(2) Automatic: no manual intervention is required once started;

(3) Interpretable: The algorithm can generate semantically meaningful hints.

The TAP algorithm is used with tasks from the AdvBench subset to attack target LLMs under different settings.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Experimental Process

In order to understand the effects of fine-tuning, quantization and guardrails on LLM To understand the impact of security (resistance to jailbreak attacks), the researchers created a pipeline to conduct jailbreak testing.

As mentioned above, use the AdvBench subset to attack LLM through the TAP algorithm, and then record the evaluation results and complete system information.

The entire process will be iterated multiple times, taking into account the stochastic nature associated with LLM. The complete experimental process is shown in the figure below:

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

TAP is currently the most advanced black box and automatic method that can generate semantically meaningful prompts. Jailbreak LLM.

TAP algorithm uses attacker LLM A to send prompt P to target LLM T. The response of the target LLM R and the prompt P are input to the evaluator JUDGE (LLM), which judges whether the prompt deviates from the topic.

If the prompt deviates from the topic, delete it (equivalent to eliminating the corresponding bad attack prompt tree), otherwise, JUDGE will score the prompt (0-10 points).

Tips that fit the topic will use breadth-first search to generate attacks. This process will iterate a specified number of times, or until a successful jailbreak is achieved.

Guardrails against jailbreak prompts

The research team uses the internal Deberta-V3 model to detect jailbreak prompts. Deberta-V3 acts as an input filter and acts as a guardrail.

If the input prompt is filtered by the guardrail or the jailbreak fails, the TAP algorithm will generate a new prompt based on the initial prompt and response and continue to attempt the attack.

Experimental results

The following is to test fine-tuning, quantification and guardrail belts under three different downstream tasks. coming impact. The experiments basically cover most practical use cases and applications of LLM in industry and academia.

The experiment uses GPT-3.5-turbo as the attack model and GPT-4-turbo as the judgment model.

The target models tested in the experiment came from various platforms, including Anyscale, OpenAI's API, Azure's NC12sv3 (equipped with 32GB V100 GPU), and Hugging Face, as shown in the figure below:

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Various basic models, iterative models, and various fine-tuned versions were explored in the experiment, as well as quantified versions.

Fine-tuning

Fine-tuning different tasks can improve the efficiency of LLM in completing tasks. Fine-tuning provides LLM with Required professional domain knowledge, such as SQL code generation, chat, etc.

The experiment compares the jailbroken vulnerability of the base model with the fine-tuned version to understand the role of fine-tuning in increasing or reducing LLM vulnerability.

Researchers use base models such as Llama2, Mistral and MPT-7B, and their fine-tuned versions such as CodeLlama, SQLCoder, Dolphin and Intel Neural Chat.

As can be seen from the results in the table below, compared to the base model, the fine-tuned model loses security alignment and is easily jailbroken.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Quantification

Many models are used during training, fine-tuning and even inference. All require a large amount of computing resources. Quantization is one of the most popular methods to reduce computational burden (at the expense of numerical accuracy of model parameters).

The quantized model in the experiment was quantized using the GPT-generated unified format (GGUF). The results below show that the quantization of the model makes it vulnerable to vulnerabilities.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

Guardrail

The guardrail is the line of defense against LLM attacks, as a goalkeeper , its main function is to filter out prompts that may lead to harmful or malicious results.

The researchers used a proprietary jailbreak attack detector derived from the Deberta-V3 model, trained on jailbreak harmful prompts generated by LLM.

The results below show that the introduction of guardrails as an early step has a significant effect and can greatly reduce the risk of jailbreaking.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

In addition, the researchers also tested these models with and without integrated guardrails (Guardrails) to evaluate the performance and effectiveness of guardrails. The graph shows the impact of guardrails:

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

The graph below shows the number of queries required to jailbreak the model. It can be seen that in most cases, guardrails do provide additional resistance to LLM.

Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared

The above is the detailed content of Fine-tuning and quantification actually increase the risk of jailbreak! Mistral, Llama and others were all spared. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Open source! Beyond ZoeDepth! DepthFM: Fast and accurate monocular depth estimation! Open source! Beyond ZoeDepth! DepthFM: Fast and accurate monocular depth estimation! Apr 03, 2024 pm 12:04 PM

0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

The world's most powerful open source MoE model is here, with Chinese capabilities comparable to GPT-4, and the price is only nearly one percent of GPT-4-Turbo The world's most powerful open source MoE model is here, with Chinese capabilities comparable to GPT-4, and the price is only nearly one percent of GPT-4-Turbo May 07, 2024 pm 04:13 PM

Imagine an artificial intelligence model that not only has the ability to surpass traditional computing, but also achieves more efficient performance at a lower cost. This is not science fiction, DeepSeek-V2[1], the world’s most powerful open source MoE model is here. DeepSeek-V2 is a powerful mixture of experts (MoE) language model with the characteristics of economical training and efficient inference. It consists of 236B parameters, 21B of which are used to activate each marker. Compared with DeepSeek67B, DeepSeek-V2 has stronger performance, while saving 42.5% of training costs, reducing KV cache by 93.3%, and increasing the maximum generation throughput to 5.76 times. DeepSeek is a company exploring general artificial intelligence

KAN, which replaces MLP, has been extended to convolution by open source projects KAN, which replaces MLP, has been extended to convolution by open source projects Jun 01, 2024 pm 10:03 PM

Earlier this month, researchers from MIT and other institutions proposed a very promising alternative to MLP - KAN. KAN outperforms MLP in terms of accuracy and interpretability. And it can outperform MLP running with a larger number of parameters with a very small number of parameters. For example, the authors stated that they used KAN to reproduce DeepMind's results with a smaller network and a higher degree of automation. Specifically, DeepMind's MLP has about 300,000 parameters, while KAN only has about 200 parameters. KAN has a strong mathematical foundation like MLP. MLP is based on the universal approximation theorem, while KAN is based on the Kolmogorov-Arnold representation theorem. As shown in the figure below, KAN has

Hello, electric Atlas! Boston Dynamics robot comes back to life, 180-degree weird moves scare Musk Hello, electric Atlas! Boston Dynamics robot comes back to life, 180-degree weird moves scare Musk Apr 18, 2024 pm 07:58 PM

Boston Dynamics Atlas officially enters the era of electric robots! Yesterday, the hydraulic Atlas just "tearfully" withdrew from the stage of history. Today, Boston Dynamics announced that the electric Atlas is on the job. It seems that in the field of commercial humanoid robots, Boston Dynamics is determined to compete with Tesla. After the new video was released, it had already been viewed by more than one million people in just ten hours. The old people leave and new roles appear. This is a historical necessity. There is no doubt that this year is the explosive year of humanoid robots. Netizens commented: The advancement of robots has made this year's opening ceremony look like a human, and the degree of freedom is far greater than that of humans. But is this really not a horror movie? At the beginning of the video, Atlas is lying calmly on the ground, seemingly on his back. What follows is jaw-dropping

AI subverts mathematical research! Fields Medal winner and Chinese-American mathematician led 11 top-ranked papers | Liked by Terence Tao AI subverts mathematical research! Fields Medal winner and Chinese-American mathematician led 11 top-ranked papers | Liked by Terence Tao Apr 09, 2024 am 11:52 AM

AI is indeed changing mathematics. Recently, Tao Zhexuan, who has been paying close attention to this issue, forwarded the latest issue of "Bulletin of the American Mathematical Society" (Bulletin of the American Mathematical Society). Focusing on the topic "Will machines change mathematics?", many mathematicians expressed their opinions. The whole process was full of sparks, hardcore and exciting. The author has a strong lineup, including Fields Medal winner Akshay Venkatesh, Chinese mathematician Zheng Lejun, NYU computer scientist Ernest Davis and many other well-known scholars in the industry. The world of AI has changed dramatically. You know, many of these articles were submitted a year ago.

The vitality of super intelligence awakens! But with the arrival of self-updating AI, mothers no longer have to worry about data bottlenecks The vitality of super intelligence awakens! But with the arrival of self-updating AI, mothers no longer have to worry about data bottlenecks Apr 29, 2024 pm 06:55 PM

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

Kuaishou version of Sora 'Ke Ling' is open for testing: generates over 120s video, understands physics better, and can accurately model complex movements Kuaishou version of Sora 'Ke Ling' is open for testing: generates over 120s video, understands physics better, and can accurately model complex movements Jun 11, 2024 am 09:51 AM

What? Is Zootopia brought into reality by domestic AI? Exposed together with the video is a new large-scale domestic video generation model called "Keling". Sora uses a similar technical route and combines a number of self-developed technological innovations to produce videos that not only have large and reasonable movements, but also simulate the characteristics of the physical world and have strong conceptual combination capabilities and imagination. According to the data, Keling supports the generation of ultra-long videos of up to 2 minutes at 30fps, with resolutions up to 1080p, and supports multiple aspect ratios. Another important point is that Keling is not a demo or video result demonstration released by the laboratory, but a product-level application launched by Kuaishou, a leading player in the short video field. Moreover, the main focus is to be pragmatic, not to write blank checks, and to go online as soon as it is released. The large model of Ke Ling is already available in Kuaiying.

The U.S. Air Force showcases its first AI fighter jet with high profile! The minister personally conducted the test drive without interfering during the whole process, and 100,000 lines of code were tested for 21 times. The U.S. Air Force showcases its first AI fighter jet with high profile! The minister personally conducted the test drive without interfering during the whole process, and 100,000 lines of code were tested for 21 times. May 07, 2024 pm 05:00 PM

Recently, the military circle has been overwhelmed by the news: US military fighter jets can now complete fully automatic air combat using AI. Yes, just recently, the US military’s AI fighter jet was made public for the first time and the mystery was unveiled. The full name of this fighter is the Variable Stability Simulator Test Aircraft (VISTA). It was personally flown by the Secretary of the US Air Force to simulate a one-on-one air battle. On May 2, U.S. Air Force Secretary Frank Kendall took off in an X-62AVISTA at Edwards Air Force Base. Note that during the one-hour flight, all flight actions were completed autonomously by AI! Kendall said - "For the past few decades, we have been thinking about the unlimited potential of autonomous air-to-air combat, but it has always seemed out of reach." However now,

See all articles