20260625:很多新内容
This commit is contained in:
48
concepts/selective-copy.md
Normal file
48
concepts/selective-copy.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: "Selective Copying"
|
||||
created: 2026-06-18
|
||||
updated: 2026-06-18
|
||||
type: concept
|
||||
tags: ["synthetic-task", "sequence-modeling", "content-awareness"]
|
||||
sources: ["https://arxiv.org/abs/2312.00752"]
|
||||
---
|
||||
|
||||
# Selective Copying
|
||||
|
||||
## 定义
|
||||
|
||||
Selective Copying(选择性复制)是 Mamba 论文中用于诊断序列模型内容感知能力的合成任务。它修改了经典的 Copying 任务(Arjovsky et al., 2016),使待复制 token 的位置**随机变化**,要求模型根据 token 内容判断"哪些该记住、哪些该忽略"。
|
||||
|
||||
## 任务设置
|
||||
|
||||
给定一个输入序列,其中:
|
||||
- **有色 token**(如蓝色/红色)是需要复制的目标
|
||||
- **白色 token** 是需要忽略的填充
|
||||
|
||||
输出:仅复制有色 token,跳过白色 token。与经典 Copying 的关键区别:有色 token 之间的间距是**随机且变化的**。
|
||||
|
||||
## 为什么揭示 LTI 弱点
|
||||
|
||||
- 经典 Copying 的 token 间距固定 → 全局卷积可以学习固定的"延迟"模式 → LTI(时间不变)模型能解决
|
||||
- Selective Copying 的间距随机 → 卷积核无法捕捉变化的时间模式 → **只有内容感知(时间变化)的模型能解决**
|
||||
|
||||
```
|
||||
经典 Copying: [A] . . . . [A] [B] . . . . [B] ← 固定间距
|
||||
Selective: [A] . . [B] . . . . [A] . . . [B] ← 随机间距
|
||||
```
|
||||
|
||||
## 在 Mamba 中的作用
|
||||
|
||||
Mamba 论文将此作为核心动机之一:S4(LTI)无法解决 Selective Copying,而 S6(选择性,通过 [[selective-state-space]])不仅解决了,还能**无限外推**到超过 1M token——因为模型学会了内容感知的泛化规则,而非仅学习固定时间模式。
|
||||
|
||||
## 相关概念
|
||||
|
||||
- [[induction-heads]] — 另一个诊断 LLM 能力的合成任务
|
||||
- [[content-based-reasoning]] — Selective Copying 测试的核心能力
|
||||
- [[selective-state-space]] — Mamba 解决此任务的关键机制
|
||||
- [[structured-state-space-models]] — S4(LTI)在此任务上失败
|
||||
|
||||
## 参考
|
||||
|
||||
- Arjovsky et al. (2016) — 原始 Copying 任务
|
||||
- [[gu-mamba|Mamba]] (Gu & Dao, 2024) Section 3.1
|
||||
Reference in New Issue
Block a user