20260617:目前有914 页

This commit is contained in:
2026-06-17 15:02:40 +08:00
parent e96b955fda
commit 91fac5b6fc
423 changed files with 20687 additions and 34 deletions

View File

@@ -0,0 +1,43 @@
---
title: "AND-OR 交互 (AND-OR Interactions)"
created: 2026-06-03
updated: 2026-06-03
type: concept
tags: [interactions, interpretability, DNN, LLM]
sources:
- "[[zhang-reconciling-sft-interaction-2026]]"
---
# AND-OR 交互 (AND-OR Interactions)
## 定义
AND-OR 交互是 [[interaction-based-explanation|交互基解释]] 框架中用于分解 DNN 推理模式的两种基本交互类型。给定输入变量集合 $N = \{1, 2, ..., n\}$
- **AND 交互** $I_T^{\text{and}}$:当且仅当 $T \subseteq N$ 中**所有**变量同时存在于输入中时激活
- **OR 交互** $I_T^{\text{or}}$:当 $T \subseteq N$ 中**任一**变量存在于输入中时激活
## 在 LLM 中的语义
在 LLM 语境下,每个交互对应一个**短语模式**phrase pattern。例如
- 三个词 "laws"、"of"、"motion" 组成的 AND 交互:仅当三个词同时出现时,为预测 "acceleration" 贡献 +0.41
- 两个词 "force"、"mass" 组成的 OR 交互:任一词出现时即激活
## 数学形式
由 AND-OR 交互构建的 [[logical-model-interaction|逻辑模型]] $\phi(x')$ 为:
$$\phi(x') = \sum_{T \in \Omega^{\text{and}}} I_T^{\text{and}} \cdot \mathbb{1}(\text{AND}_T) + \sum_{T \in \Omega^{\text{or}}} I_T^{\text{or}} \cdot \mathbb{1}(\text{OR}_T) + b$$
其中 $b$ 为偏置标量,$\Omega^{\text{and}}$ 和 $\Omega^{\text{or}}$ 分别为 AND 和 OR 交互的集合。
## 提取方法
通过最小化 LASSO 类损失函数,将网络输出分解为 AND 和 OR 两个分量,分别提取对应的交互效应。详见 Chen et al. (2024) 和 Li & Zhang (2024)。
## 相关概念
- [[interaction-based-explanation|交互基解释]]
- [[logical-model-interaction|交互逻辑模型]]
- [[interaction-order|交互阶数]]
- [[interaction-types-sft|SFT 中的三类交互]]