1.8 KiB
1.8 KiB
title, created, updated, type, tags, sources
| title | created | updated | type | tags | sources | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| AND-OR 交互 (AND-OR Interactions) | 2026-06-03 | 2026-06-03 | concept |
|
|
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)。