【ICLR23论文】Can CNNs Be More Robust Than Transformers?

news2024/9/26 5:15:27

文章目录

  • 0 Abstract
  • 1 Introduction
  • 2 Related Works
  • 3 Settings
    • 3.1 CNN Block Instantiations
    • 3.2 Computational Cost
    • 3.3 Robustness Benchmarks
    • 3.4 Training Recipe
    • 3.5 Baseline Results
  • 4 Component Diagnosis
    • 4.1 Patchief Stem
    • 4.2 Large Kernel Size
    • 4.3 Reducing Activation And Normalization Layers
  • 5 Components Combination
  • 6 Knowledge Distillation
  • 7 Larger Models
  • 8 Conclusion
  • Acknowledgement
  • Reference

Article Reading Record

在这里插入图片描述

0 Abstract

  • Transformers are inherently (本质上) more robust than CNNs
  • we question that belief by closely examining the design of Transformers
  • simple enough to be implemented in several lines of code, namely a) patchifying(修补) input images, b) enlarging kernel size, and c) reducing activation layers and normalization layers.

1 Introduction

  • ViT offers a completely different roadmap—by applying the pure self-attention-based architecture to sequences of image patches, ViTs are able to attain competitive performance on a wide range of visual benchmarks compared to CNNs.

在这里插入图片描述
dubbed (被称为) vanilla(普通)

2 Related Works

  • Vision Transformers.
  • CNNs striking back ( 反击 )
  • ConvNeXt, shifting the study focus from standard accuracy to robustness
  • Out-of-distribution (分布) robustness.

ResNet Bottleneck block

counterpart (对口/对应方/同行)

在这里插入图片描述

corruption (腐败/堕落) rendition (再现) inherently (本质)

  • we show CNNs can in turn outperform Transformers in out-of-distribution robustness.

3 Settings

thoroughly (彻底)

3.1 CNN Block Instantiations

(实例化)

在这里插入图片描述

3.2 Computational Cost

mitigate (减轻) the computational cost loss

roughly(大约)

3.3 Robustness Benchmarks

extensively (广泛) evaluate

contains synthesized (合成) images with shape-texture(纹理) conflicting cues

image corruption(损坏)

which contains natural renditions (再现) of ImageNet object classes with different textures and local image statistics(统计)

3.4 Training Recipe

deliberately (故意) apply the standard 300-epoch DeiT training recipe

3.5 Baseline Results

we use “IN”, “S-IN”, “IN-C”, “IN-R”, and “IN-SK” as abbreviations(缩写) for “ImageNet”, “Stylized-ImageNet”, “ImageNet-C”, “ImageNet-R”, and “ImageNet-Sketch”.

4 Component Diagnosis

( 组件 )( 诊断 )

These designs are as follows: 1) patchifying
input images (Sec. 4.1), b) enlarging the kernel size (Sec. 4.2), and finally, 3) reducing the number
of activation layers and normalization layers (Sec. 4.3)

4.1 Patchief Stem

ViT adopts a much more aggressive down-sampling strategy by partitioning (分区) the input image into p×p non-overlapping (非重叠) patches and projects each patch with a linear layer

have investigated (调查) the importance of

when employing (使用) the 8×8 patchify stem

albeit (尽管) potentially (潜在) at the cost of clean accuracy

is boosted (提高) by at least 0.6%

play a vital(重要) role in closing the robustness gap between CNNs and Transformers.

在这里插入图片描述

4.2 Large Kernel Size

One critical(关键) property (性质) that distinguishes the self-attention operation from the classic convolution operation is its ability to operate on the entire input image or feature map, resulting in a global receptive(接收) field.

The importance of capturing long-range (远程)dependencies (依赖)has been demonstrated (证明) for CNNs even

In this section, we aim to mimic (模仿) the behavior of the self-attention block

the performance gain gradually saturates(饱和)

an unfair(不公平的) comparison to some extent.(程度)

在这里插入图片描述

在这里插入图片描述

4.3 Reducing Activation And Normalization Layers

(规范化层)

在这里插入图片描述

在这里插入图片描述

The optimal (最优) position

在这里插入图片描述
在这里插入图片描述

5 Components Combination

explore the impact of combining all the proposed components on the model’s performance.

along with the corresponding (相应) optimal (最优) position for placing the normalization and activation layer

An exception (异常) here is ResNet-Inverted-DW

we empirically (经验) found that using a too-large kernel size

6 Knowledge Distillation

when the model roles are switched (互换), the student model DeiT-S remarkably outperforms the teacher model ResNet-50 on a range of robustness benchmarks

7 Larger Models

To demonstrate (演示) the effectiveness of our proposed models on larger scales
在这里插入图片描述

8 Conclusion

By incorporating (合并) these designs into ResNet,
we have developed a CNN architecture that can match or even surpass (超越) the robustness of a Vision Transformer model of comparable size.

We hope our findings prompt researchers to reevaluate(重新评估)the robustness comparison between Transformers and CNNs, and inspire further investigations (调查) into
developing more resilient (弹性) architecture designs

Acknowledgement

This work is supported by a gift from Open Philanthropy (慈善), TPU Research Cloud (TRC) program, and Google Cloud Research Credits program.

Reference

https://github.com/UCSC-VLAA/RobustCNN

https://arxiv.org/pdf/2206.03452.pdf


欢迎在评论区提问和讨论原Paper

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1133575.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

安装 tensorflow==1.15.2 遇见的问题

一、直接安装 命令:pip install tensorflow1.15.2 二、换 阿里云 镜像源 命令:pip install -i http://mirrors.aliyun.com/pypi/simple tensorflow1.15.2 三、换 豆瓣 镜像源 命令:pip install http://pypi.douban.com/simple tensorflow1…

Android Glide判断图像资源是否缓存onlyRetrieveFromCache,使用缓存数据,Kotlin

Android Glide判断图像资源是否缓存onlyRetrieveFromCache,使用缓存数据,Kotlin import android.graphics.Bitmap import android.os.Bundle import android.util.Log import android.widget.ImageView import androidx.appcompat.app.AppCompatActivity…

“第五十天” 机组--数据的表示

数据的表示和运算: 进位计数制: 对于我们现在使用的如十进制计数法,二进制计数法等,符号反映权重,比如十进制的0~9,9这个符号的权重和0是不一样的,而且现在的计数法符号所在位置也反映权重&am…

去雨去雪去雾算法运行问题汇总记录

在进行去雨去雪去雾算法过程中,遇到了一个问题,这在先前的电脑运行是都没有出现过,但在博主新买的电脑上却出现了,讲道理是有点小抑郁的。 RuntimeWarning: invalid value encountered in scalar divideret ret.dtype.type(ret …

基于Or-Tools的线性规划问题求解

画出可行域如图所示: Python调用ortools求解 导入求解器 # 导入(或包含)or - tools线性求解器包装器,这是MIP求解器和线性求解器的接口,如下所示 from ortools.linear_solver import pywraplp声明线性规划求解器 MPsolver is a wrapper …

js双向绑定

题目来源: 双向绑定_牛客题霸_牛客网 (nowcoder.com) JS37 双向绑定 描述 请补全JavaScript代码,要求如下: 1. 监听对象属性的变化 2. 当"person"对象属性发生变化时,页面中与该属性相关的数据同步更新 3. 将输入框中…

【C++面向对象】8. 继承

文章目录 【 1. 基本原理 】【 2. 派生类的访问权限 】【 3. 派生类继承得到的成员的权限 】【 4. 多继承 】 继承允许我们依据另一个类来定义一个类,这使得创建和维护一个应用程序变得更容易。这样做,也达到了 重用代码功能 和 提高执行时间 的效果。当…

【Qt之QSetting】介绍及使用

概述 QSettings类提供了一种持久的、与平台无关的应用程序设置存储功能。 用户通常期望一个应用能在不同会话中记住其设置(窗口大小和位置,选项等)。在Windows上,这些信息通常存储在系统注册表中;在macOS和iOS上&…

MySQL数据库 #4

文章目录 一、MySQL外键基本概念1. 表与表之间的关系1.一对多的表关系2.多对多3.一对一注意事项 2.多表查询1.子查询2.数据准备3.连表查询(重点) 二、多表查询练习题1.习题试题的SQL文件2.Navicata可视化软件1.连接数据库2 操作数据库3.导入备份4.查询数…

01. 板载硬件资源和开发环境

一、板载硬件资源 STM32F4VGT6-DISCOVERY硬件资源如下: (1). STM32F407VGT6微控制器有1M的FLASH存储器,192K的RAM,LQFP100封装 (2). 板上的ST-LINK_V2可以使用选择的方式把套件切换成一个独立的ST-LINK/V2来 使用(可以使用SWD…

UML中类之间的六种主要关系

UML中类之间的六种主要关系: 继承(泛化)(Inheritance、Generalization), 实现(Realization),关联(Association),聚合(Aggregation),组…

Java架构师内功嵌入式技术

目录 1 导学2 嵌入式微处理体系结构3 微处理器分类4 多核处理器5 嵌入式软件6 嵌入式系统6.1 系统组成7 嵌入式实时操作系统8 嵌入式软件设计9 软件开发工具想学习架构师构建流程请跳转:Java架构师系统架构设计 1 导学 嵌入式技术对软件架构的作用主要体现在以下几个方面: …

搜索二叉树实现(非递归版本)

目录 一,搜索二叉树是个啥? 二,搜索二叉树的实现 1.前期工作 2.方法实现 1.插入 2,查找 3.删除 三,实现二叉搜索树的全部代码 一,搜索二叉树是个啥? 话不多所,先给各位来一个…

查看linux下dns信息并修改

cat /etc/resolv.conf 查看dns 常用dns nameserver 114.114.114.114 nameserver 100.125.0.250 nameserver 8.8.8.8 nameserver 8.8.4.4 nameserver 192.168.122.1 nameserver 100.125.1.250 nameserver 100.125.1.251 nameserver 223.5.5.5 可以用vi 修改,修改后 …

【云原生】portainer管理多个独立docker服务器

目录 一、portainer简介 二、安装Portainer 1.1 内网环境下: 1.1.1 方式1:命令行运行 1.1.2 方式2:通过compose-file来启动 2.1 配置本地主机(node-1) 3.1 配置其他主机(被node-1管理的节点服务器&…

spring常见问题汇总

1. 什么是spring? Spring是一个轻量级Java开发框架,最早有Rod Johnson创建,目的是为了解决企业级应用开发的业务 逻辑层和其他各层的耦合问题。它是一个分层的JavaSE/JavaEE full-stack(一站式)轻量级开源框架, 为开…

【LeetCode刷题日志】189.轮转数组

目录 1.题目描述 2.解题思路代码实现 方法一:使用额外的数组 解题思路: 代码实现: 方法二:环状替换 解题思路: 代码实现: 方法三:数组翻转 解题思路: 代码实现&#xff1a…

跨平台开发技术

目录 1.Qt1.简介2.优势3.劣势 2.NET CoreVue1.简介2.优点 3.Flutter1.简介2.优点3.缺点 4.Maui1.简介2.优点3.缺点 5.Avalonia1.简介2.优点3.缺点 6. Cordova1.简介2.优点3.缺点 7.Electron1.简介2.优点3.缺点 个人搜集资料并总结了一些跨平台开发技术,如有不足欢迎…

实战!RPA厂商选型分享

企业发展,必先科技先行,通过科技来提升内部运营、业务效率,从而达到降本、提质、增效的目标。但无论在技术选型亦或者厂商选择,都需要漫长的对比和调研,方能选择适合自身企业发展解决问题的技术和长期合作的技术伙伴。…