# 第六章 数据与模型攻击

训练数据和模型本身是 LLM 系统的核心资产。针对数据和模型的攻击可能产生深远且难以检测的影响，是安全防护中不可忽视的威胁。

本章聚焦于数据与模型层面的攻击，主要内容包括：

* **6.1 训练数据投毒**：了解如何通过污染训练数据影响模型行为
* **6.2 后门攻击**：掌握后门的植入机制和检测方法
* **6.3 模型窃取与逆向工程**：理解模型知识产权面临的威胁
* **6.4 成员推理与隐私攻击**：认识训练数据隐私泄露的风险
* **6.5 离散对抗攻击与模型鲁棒性**：了解对抗样本生成与大模型鲁棒性威胁
* **6.6 微调与 PEFT 的安全风险**：分析 LoRA、QLoRA 等参数高效微调方法带来的对齐退化、数据投毒和隐私泄露风险

通过本章的学习，读者将全面了解 LLM 在数据和模型层面面临的安全威胁，以及微调环节的安全挑战。

> **⚠️ 道德边界**：数据投毒、后门、模型窃取与隐私攻击的描述用于让防御方理解威胁模型并设计相应的检测、监控与训练流程控制；不构成对第三方模型或数据集发起攻击的指引。完整声明见 [§4 章首道德边界与负责任披露说明](/ai_security_guide/di-er-bu-fen-gong-ji-pian/04_prompt_injection.md)。

```mermaid
flowchart TB
    subgraph "数据与模型攻击"
    A["训练阶段<br/>数据投毒/后门植入"] --> C["被污染的模型"]
    B["部署阶段<br/>模型窃取/隐私推理"] --> D["知识产权/隐私泄露"]
    end
```


---

# Agent Instructions: 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:

```
GET https://yeasy.gitbook.io/ai_security_guide/di-er-bu-fen-gong-ji-pian/06_data_model_attacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
