[论文解读] Sparse Spatial Transformers for Few-Shot Learning
该论文提出了一种基于稀疏空间变换器的新型Transformer架构——SSFormers,用于少样本学习。该方法通过提取密集的局部图像块,利用稀疏空间变换器层在查询图像和支撑图像中选择与任务相关的图像块,并采用块匹配模块进行相似性计算,从而增强特征表示。通过联合建模任务特定的上下文信息并抑制无关特征,该方法在少样本学习基准上取得了当前最优性能。
Learning from limited data is challenging because data scarcity leads to a poor generalization of the trained model. A classical global pooled representation will probably lose useful local information. Many few-shot learning methods have recently addressed this challenge using deep descriptors and learning a pixel-level metric. However, using deep descriptors as feature representations may lose image contextual information. Moreover, most of these methods independently address each class in the support set, which cannot sufficiently use discriminative information and task-specific embeddings. In this paper, we propose a novel transformer-based neural network architecture called sparse spatial transformers (SSFormers), which finds task-relevant features and suppresses task-irrelevant features. Particularly, we first divide each input image into several image patches of different sizes to obtain dense local features. These features retain contextual information while expressing local information. Then, a sparse spatial transformer layer is proposed to find spatial correspondence between the query image and the full support set to select task-relevant image patches and suppress task-irrelevant image patches. Finally, we propose using an image patch-matching module to calculate the distance between dense local representations, thus determining which category the query image belongs to in the support set. Extensive experiments on popular few-shot learning benchmarks demonstrate the superiority of our method over state-of-the-art methods. Our source code is available at \url{https://github.com/chenhaoxing/ssformers}.
研究动机与目标
- 解决全局特征和深度描述子在少样本学习中的局限性,后者会丢失局部或上下文信息。
- 通过利用任务级上下文信息,克服现有度量学习方法中独立处理各类别的低效性。
- 设计一种机制,以识别并强调查询图像和支撑图像中与任务相关的图像块。
- 利用查询图像与支撑图像之间的空间对应关系,构建任务特定的原型,以提升特征判别能力。
- 设计一种块匹配模块,以比标准余弦相似度更有效地计算块级相似性。
提出的方法
- 将输入图像划分为多种尺寸的图像块,以提取密集的局部特征,同时保留上下文信息。
- 引入一种稀疏空间变换器层(SSTL),利用交叉注意力机制在查询块与完整支撑集之间寻找空间对应关系,选择与任务相关的块并抑制无关块。
- 应用互近邻函数识别与支撑集特征具有强相关性的查询块,实现选择性特征聚合。
- 通过SSTL对齐的最相关查询块与支撑集特征,聚合生成任务特定的原型。
- 实现一种块匹配模块(PMM),计算每个查询块与其在每个对齐支撑原型中最近邻的相似性得分,并累积得分以进行最终分类。
- 采用非参数化方法在查询图像与支撑图像之间匹配块,避免依赖参数化的相似度度量。
实验结果
研究问题
- RQ1在少样本学习中,基于Transformer的机制能否有效识别查询图像与支撑图像之间的任务相关图像块?
- RQ2与按类别处理相比,建模查询图像与完整支撑集之间的空间对应关系是否能提升特征判别能力?
- RQ3块级相似性计算能否在少样本识别中超越全局或像素级度量?
- RQ4与现有基于注意力的模型相比,该方法在分布偏移和对抗性攻击下的表现如何?
- RQ5与全局特征或深度描述子相比,结合空间注意力的密集局部表示能否实现更好的泛化性能?
主要发现
- SSFormers在mini-ImageNet上达到当前最优性能,优于CANs、FEAT和RENet等现有方法。
- 模型在各种数据损坏下保持高度鲁棒性,高斯模糊下准确率仅下降6.7%,而Rethink-D的下降幅度达40.0%。
- 块匹配模块相比直接使用余弦相似度,实现了更高的分类准确率,证明其在块级匹配中的有效性。
- t-SNE可视化结果表明,SSFormers生成的特征嵌入更具判别性且分离度更高,即使在未见类别上也表现优异。
- 定性结果表明,稀疏空间变换器能成功突出相关图像区域,并在查询图像和支撑图像中有效抑制背景或无关特征。
- 尽管增加了块处理,但由于采用了高效的稀疏注意力机制,该方法的推理速度与CANs相当,时间复杂度较低。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。