[论文解读] What Makes Convolutional Models Great on Long Sequence Modeling?
SGConv 提供一个简单高效的全局卷积核,具备多尺度子核和衰减权重,能够良好建模长程依赖,并在 Long Range Arena 上超越 S4,同时作为语言和视觉模型的即插即用模块更高效且更通用。
Convolutional models have been widely used in multiple domains. However, most existing models only use local convolution, making the model unable to handle long-range dependency efficiently. Attention overcomes this problem by aggregating global information but also makes the computational complexity quadratic to the sequence length. Recently, Gu et al. [2021] proposed a model called S4 inspired by the state space model. S4 can be efficiently implemented as a global convolutional model whose kernel size equals the input sequence length. S4 can model much longer sequences than Transformers and achieve significant gains over SoTA on several long-range tasks. Despite its empirical success, S4 is involved. It requires sophisticated parameterization and initialization schemes. As a result, S4 is less intuitive and hard to use. Here we aim to demystify S4 and extract basic principles that contribute to the success of S4 as a global convolutional model. We focus on the structure of the convolution kernel and identify two critical but intuitive principles enjoyed by S4 that are sufficient to make up an effective global convolutional model: 1) The parameterization of the convolutional kernel needs to be efficient in the sense that the number of parameters should scale sub-linearly with sequence length. 2) The kernel needs to satisfy a decaying structure that the weights for convolving with closer neighbors are larger than the more distant ones. Based on the two principles, we propose a simple yet effective convolutional model called Structured Global Convolution (SGConv). SGConv exhibits strong empirical performance over several tasks: 1) With faster speed, SGConv surpasses S4 on Long Range Arena and Speech Command datasets. 2) When plugging SGConv into standard language and vision models, it shows the potential to improve both efficiency and performance.
研究动机与目标
- 识别支撑 S4 在长程依赖建模中成功的最小原则。
- 提出一种更简单、直观的全局卷积核,保持长程建模能力。
- 展示 SGConv 在长程基准和常见下游任务上的经验性能。
- 展示 SGConv 作为语言和视觉架构中通用模块的可用性。
提出的方法
- 定义全局卷积的两个设计原则:高效的参数化(参数随序列长度亚线性扩展)和衰减的核结构(邻近位置权重更大)。
- 引入 SGConv:一种结构化全局卷积,使用从固定小参数集合上采样的多尺度子核并以衰减权重组合;通过 FFT 计算,复杂度为 O(L log L)。
- 给出一个具体的参数化 Cat(S),生成长度为 L 的核,参数为 O(log L);包括归一化 Z 和衰减因子 alpha。
- 在 Long Range Arena(LRA)和 Speech Commands 上对 SGConv、S4 及基线进行经验比较;对衰减速度 t 和尺度维度 d 进行消融;评估其在语言和视觉任务中的即插即用模块。
- 展示 SGConv 作为语言建模模块,以及在图像分类中作为 ConvNeXt 的替代模块;分析与基于注意力的和 S4 模块相比的速度和内存。
实验结果
研究问题
- RQ1哪些最小原则促成 S4 在长范围序列建模中的成功?
- RQ2一个更简单的、非 SSM 的全局卷积核是否能够达到与 S4 相媲美甚至更好的性能?
- RQ3SGConv 在参数和计算量上的扩展性如何,在 LRA、语音、语言和视觉任务上的表现如何?
- RQ4SGConv 能否在 NLP 与 CV 架构中作为通用模块使用?
主要发现
| 模型 | ListOps | 文本 | 检索 | 图像 | Pathfinder | Path-X | 平均值 |
|---|---|---|---|---|---|---|---|
| Transformer | 36.37 | 64.27 | 57.46 | 42.44 | 71.40 | ✗ | 54.39 |
| Sparse Trans. | 17.07 | 63.58 | 59.59 | 44.24 | 71.71 | ✗ | 51.24 |
| Linformer | 35.70 | 53.94 | 52.27 | 38.56 | 76.34 | ✗ | 51.36 |
| Reformer | 37.27 | 56.10 | 53.40 | 38.07 | 68.50 | ✗ | 50.67 |
| BigBird | 36.05 | 64.02 | 59.29 | 40.83 | 74.87 | ✗ | 55.01 |
| S4 (original) | 58.35 | 76.02 | 87.09 | 87.26 | 86.05 | 88.10 | 80.48 |
| S4 (Gu et al., 2022b) | 59.60 | 86.82 | 90.90 | 88.65 | 94.20 | 96.35 | 86.09 |
| SGConv | 61.45 | 89.20 | 91.11 | 87.97 | 95.46 | 97.83 | 87.17 |
- 在两条原则的指引下,SGConv 在 Long Range Arena 与 Speech Commands 基准测试上超越 S4,且速度更快。
- SGConv 在 LRA 的平均表现更强(表 1),在语音任务上与 SoTA 竞争,同时保持比 S4 更低的计算成本。
- 一个简单的 SGConv 核,具有多尺度上采样子核和衰减组合,实现参数量 O(log L) 和基于 FFT 的 O(L log L) 计算。
- 在语言模型中用 SGConv 替代 Transformer 注意力的部分,复杂性从 O(L^2) 降至 O(L log L),并在某些设定下保持性能。
- 在 ConvNeXt 中使用 SGConv(作为 SGConvNeXt)在 Some 配置下达到或超过 SoTA 模型在 ImageNet-1k 的表现,展示跨领域适用性。
- 研究显示 SGConv 区块在不同序列长度和硬件(CPU/GPU)下均比优化后的 S4 内核更快。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。