> For the complete documentation index, see [llms.txt](https://elwood.gitbook.io/foundation-model-sec/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elwood.gitbook.io/foundation-model-sec/llm-attack/chatgpt-as-an-attack-tool-stealthy-textual-backdoor-attack-via-blackbox-generative-model-trigger.md).

# ChatGPT as an Attack Tool: Stealthy Textual Backdoor Attack via Blackbox Generative Model Trigger

<figure><img src="/files/OUneEqH2Zov87NeE7nvG" alt=""><figcaption></figcaption></figure>

#### 1. 研究背景

文本后门攻击对现有系统构成实际威胁，它们通过在训练数据集中插入难以察觉的触发器并操纵标签来破坏模型。随着尖端生成模型（如GPT-4）的出现，这种攻击变得更加难以检测。本文对黑盒生成模型作为后门攻击工具的角色进行了全面研究，并强调了研究相关防御策略的重要性。

#### 2. 过去方案和缺点

* **样本不可知攻击**：通过在文本中插入可见触发器，但容易被防御。
* **句法攻击**：通过重构良性文本并使用选定的句法结构作为触发器，更隐蔽但分析句法结构耗时且可能被检测到。
* **反向翻译攻击**：使用Google翻译进行反向翻译来扰动良性文本，但未广泛探索且文本质量不佳。

#### 3. 本文方案和步骤

* **BGMAttack**：提出了一种基于生成模型的后门攻击方法，利用最先进的生成模型使后门触发器不易被发现。
* **方法**：使用外部黑盒生成模型作为触发函数，将良性样本转换为有毒样本，通过机器翻译、文本释义和文本摘要等传输技术实现。
* **质量控制**：引入质量检查模块，排除包含重复词或短语的生成样本。

<figure><img src="/files/OL1z5LSIdw3M1kN16WHo" alt=""><figcaption></figcaption></figure>

#### 4. 本文创新点与贡献

* 提出了一种新颖的**黑盒生成模型基础攻击方法（BGMAttack）**，无需显式触发器即可执行后门攻击。
* 利用生成模型的隐含触发器，提高了后门触发器的隐蔽性，改善了中毒样本的质量。
* 通过使用不同的现有零样本生成模型，能够创建隐蔽的中毒样本。

#### 5. 本文实验

* 在五个数据集上评估了BGMAttack的有效性，并进行了三种不同人类认知评估的补充。
* 使用了攻击成功率（ASR）、清洁准确率（CACC）等评估指标。
* 实验结果表明，BGMAttack在保持较高隐蔽性的同时，实现了与基线方法相当的攻击性能。

#### 6. 实验结论

* BGMAttack在所有五个数据集上至少达到了90%的攻击成功率，平均为97.35%，且对良性数据集的准确率仅下降了1.81%。
* 与其他方法相比，BGMAttack生成的中毒样本具有更低的句子困惑度、更少的语法错误，并且保持了较高的语义相似性。

#### 7. 全文结论

* 本文提出的BGMAttack方法，通过使用黑盒生成模型作为隐式触发器，成功实现了隐蔽的文本后门攻击。
* 实验结果支持了生成模型作为非鲁棒性触发器的适用性，即使没有显式特征，也能有效地对文本分类器执行后门攻击。

#### 阅读总结

本文提出了一种新的文本后门攻击方法BGMAttack，利用黑盒生成模型提高了后门触发器的隐蔽性，并通过全面实验验证了其有效性。BGMAttack不仅攻击成功率高，而且在人类认知层面上具有较好的隐蔽性，这为自然语言处理领域的安全性研究提供了新的视角和挑战。同时，本文也强调了对此类攻击方法的防御研究的重要性，并呼吁社区共同努力提高NLP应用的安全性。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://elwood.gitbook.io/foundation-model-sec/llm-attack/chatgpt-as-an-attack-tool-stealthy-textual-backdoor-attack-via-blackbox-generative-model-trigger.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
