域的概括旨在学习一个可以很好地概括在看不见的测试数据集(即分布数据集)上的模型,该数据与培训数据集不同。为了解决计算机视觉中的领域概括,我们将损失景观理论引入该领域。具体而言,我们从损失景观的角度从四个方面(包括骨干,正则化,训练范式和学习率)引起了深度学习模型的概括能力。我们通过进行广泛的消融研究和可视化来验证有关NICO ++,PAC和VLCS数据集的提议理论。此外,我们将该理论应用于ECCV 2022 NICO挑战1,并在不使用任何域不变方法的情况下获得第三名。
translated by 谷歌翻译
知识蒸馏是将“知识”从大型模型(教师)转移到更紧凑的(学生)的过程,通常在模型压缩的背景下使用。当两个模型都具有相同的体系结构时,此过程称为自distillation。几项轶事表明,一个自灭的学生可以在持有的数据上胜过老师的表现。在这项工作中,我们系统地研究了许多设置。我们首先表明,即使有一个高度准确的老师,自我介绍也使学生在所有情况下都可以超越老师。其次,我们重新审视了(自我)蒸馏的现有理论解释,并确定矛盾的例子,揭示了这些解释的可能缺点。最后,我们通过损失景观几何形状的镜头为自我鉴定的动态提供了另一种解释。我们进行了广泛的实验,以表明自我验证会导致最小化的最小值,从而导致更好的概括。
translated by 谷歌翻译
We introduce submodel co-training, a regularization method related to co-training, self-distillation and stochastic depth. Given a neural network to be trained, for each sample we implicitly instantiate two altered networks, ``submodels'', with stochastic depth: we activate only a subset of the layers. Each network serves as a soft teacher to the other, by providing a loss that complements the regular loss provided by the one-hot label. Our approach, dubbed cosub, uses a single set of weights, and does not involve a pre-trained external model or temporal averaging. Experimentally, we show that submodel co-training is effective to train backbones for recognition tasks such as image classification and semantic segmentation. Our approach is compatible with multiple architectures, including RegNet, ViT, PiT, XCiT, Swin and ConvNext. Our training strategy improves their results in comparable settings. For instance, a ViT-B pretrained with cosub on ImageNet-21k obtains 87.4% top-1 acc. @448 on ImageNet-val.
translated by 谷歌翻译
Binary neural networks are the extreme case of network quantization, which has long been thought of as a potential edge machine learning solution. However, the significant accuracy gap to the full-precision counterparts restricts their creative potential for mobile applications. In this work, we revisit the potential of binary neural networks and focus on a compelling but unanswered problem: how can a binary neural network achieve the crucial accuracy level (e.g., 80%) on ILSVRC-2012 ImageNet? We achieve this goal by enhancing the optimization process from three complementary perspectives: (1) We design a novel binary architecture BNext based on a comprehensive study of binary architectures and their optimization process. (2) We propose a novel knowledge-distillation technique to alleviate the counter-intuitive overfitting problem observed when attempting to train extremely accurate binary models. (3) We analyze the data augmentation pipeline for binary networks and modernize it with up-to-date techniques from full-precision models. The evaluation results on ImageNet show that BNext, for the first time, pushes the binary model accuracy boundary to 80.57% and significantly outperforms all the existing binary networks. Code and trained models are available at: https://github.com/hpi-xnor/BNext.git.
translated by 谷歌翻译
Image classification with small datasets has been an active research area in the recent past. However, as research in this scope is still in its infancy, two key ingredients are missing for ensuring reliable and truthful progress: a systematic and extensive overview of the state of the art, and a common benchmark to allow for objective comparisons between published methods. This article addresses both issues. First, we systematically organize and connect past studies to consolidate a community that is currently fragmented and scattered. Second, we propose a common benchmark that allows for an objective comparison of approaches. It consists of five datasets spanning various domains (e.g., natural images, medical imagery, satellite data) and data types (RGB, grayscale, multispectral). We use this benchmark to re-evaluate the standard cross-entropy baseline and ten existing methods published between 2017 and 2021 at renowned venues. Surprisingly, we find that thorough hyper-parameter tuning on held-out validation data results in a highly competitive baseline and highlights a stunted growth of performance over the years. Indeed, only a single specialized method dating back to 2019 clearly wins our benchmark and outperforms the baseline classifier.
translated by 谷歌翻译
少量学习,特别是几秒钟的图像分类,近年来受到了越来越多的关注,并目睹了重大进展。最近的一些研究暗示表明,许多通用技术或“诀窍”,如数据增强,预训练,知识蒸馏和自我监督,可能大大提高了几次学习方法的性能。此外,不同的作品可以采用不同的软件平台,不同的训练计划,不同的骨干架构以及甚至不同的输入图像大小,使得公平的比较困难,从业者与再现性斗争。为了解决这些情况,通过在Pytorch中的同一单个代码库中重新实施17个最新的框架,提出了几次射门学习(Libfewshot)的全面图书馆。此外,基于libfewshot,我们提供多个基准数据集的全面评估,其中包含多个骨干架构,以评估不同培训技巧的常见缺陷和效果。此外,鉴于近期对必要性或未培训机制的必要性怀疑,我们的评估结果表明,特别是当与预训练相结合时,仍然需要这种机制。我们希望我们的工作不仅可以降低初学者的障碍,可以在几次学习上工作,而且还消除了非动力技巧的影响,促进了几枪学习的内在研究。源代码可从https://github.com/rl-vig/libfewshot获取。
translated by 谷歌翻译
旨在概括在源域中训练的模型来看不见的目标域,域泛化(DG)最近引起了很多关注。 DG的关键问题是如何防止对观察到的源极域的过度接收,因为在培训期间目标域不可用。我们调查过度拟合不仅导致未经看不见的目标域的普遍推广能力,而且在测试阶段导致不稳定的预测。在本文中,我们观察到,在训练阶段采样多个任务并在测试阶段产生增强图像,很大程度上有利于泛化性能。因此,通过处理不同视图的任务和图像,我们提出了一种新颖的多视图DG框架。具体地,在训练阶段,为了提高泛化能力,我们开发了一种多视图正则化元学习算法,该算法采用多个任务在更新模型期间产生合适的优化方向。在测试阶段,为了减轻不稳定的预测,我们利用多个增强图像来产生多视图预测,这通过熔断测试图像的不同视图的结果显着促进了模型可靠性。三个基准数据集的广泛实验验证了我们的方法优于几种最先进的方法。
translated by 谷歌翻译
Recently, large-scale pre-trained models have shown their advantages in many tasks. However, due to the huge computational complexity and storage requirements, it is challenging to apply the large-scale model to real scenes. A common solution is knowledge distillation which regards the large-scale model as a teacher model and helps to train a small student model to obtain a competitive performance. Cross-task Knowledge distillation expands the application scenarios of the large-scale pre-trained model. Existing knowledge distillation works focus on directly mimicking the final prediction or the intermediate layers of the teacher model, which represent the global-level characteristics and are task-specific. To alleviate the constraint of different label spaces, capturing invariant intrinsic local object characteristics (such as the shape characteristics of the leg and tail of the cattle and horse) plays a key role. Considering the complexity and variability of real scene tasks, we propose a Prototype-guided Cross-task Knowledge Distillation (ProC-KD) approach to transfer the intrinsic local-level object knowledge of a large-scale teacher network to various task scenarios. First, to better transfer the generalized knowledge in the teacher model in cross-task scenarios, we propose a prototype learning module to learn from the essential feature representation of objects in the teacher model. Secondly, for diverse downstream tasks, we propose a task-adaptive feature augmentation module to enhance the features of the student model with the learned generalization prototype features and guide the training of the student model to improve its generalization ability. The experimental results on various visual tasks demonstrate the effectiveness of our approach for large-scale model cross-task knowledge distillation scenes.
translated by 谷歌翻译
In real teaching scenarios, an excellent teacher always teaches what he (or she) is good at but the student is not. This method gives the student the best assistance in making up for his (or her) weaknesses and becoming a good one overall. Enlightened by this, we introduce the approach to the knowledge distillation framework and propose a data-based distillation method named ``Teaching what you Should Teach (TST)''. To be specific, TST contains a neural network-based data augmentation module with the priori bias, which can assist in finding what the teacher is good at while the student are not by learning magnitudes and probabilities to generate suitable samples. By training the data augmentation module and the generalized distillation paradigm in turn, a student model that has excellent generalization ability can be created. To verify the effectiveness of TST, we conducted extensive comparative experiments on object recognition (CIFAR-100 and ImageNet-1k), detection (MS-COCO), and segmentation (Cityscapes) tasks. As experimentally demonstrated, TST achieves state-of-the-art performance on almost all teacher-student pairs. Furthermore, we conduct intriguing studies of TST, including how to solve the performance degradation caused by the stronger teacher and what magnitudes and probabilities are needed for the distillation framework.
translated by 谷歌翻译
通过在多个观察到的源极域上培训模型,域概括旨在概括到无需进一步培训的任意看不见的目标领域。现有的作品主要专注于学习域不变的功能,以提高泛化能力。然而,由于在训练期间不可用目标域,因此前面的方法不可避免地遭受源极域中的过度。为了解决这个问题,我们开发了一个有效的基于辍学的框架,可以扩大模型的注意力,这可以有效地减轻过度的问题。特别地,与典型的辍学方案不同,通常在固定层上进行丢失,首先,我们随机选择一层,然后我们随机选择其通道以进行丢弃。此外,我们利用进步方案增加训练期间辍学的比率,这可以逐步提高培训模型的难度,以增强模型的稳健性。此外,为了进一步缓解过度拟合问题的影响,我们利用了在图像级和特征级别的增强方案来产生强大的基线模型。我们对多个基准数据集进行广泛的实验,该数据集显示了我们的方法可以优于最先进的方法。
translated by 谷歌翻译
本文描述了机器学习中“一般周期性训练”的原则,在该原理中,培训以“易于训练”开始和结束,而“硬训练”发生在中间时期。我们提出了几种训练神经网络的表现,包括算法示例(通过超参数和损失功能),基于数据的示例和基于模型的示例。具体而言,我们介绍了几种新技术:周期性重量衰减,周期性批量尺寸,周期性局灶性损失,周期性软度温度,周期性数据增强,周期性梯度剪辑和周期性的半监督学习。此外,我们证明了周期性的重量衰减,周期性软度温度和周期性梯度剪辑(作为该原理的三个示例)对训练有素的模型的测试准确性性能有益。此外,我们从一般周期性培训的角度讨论了基于模型的示例(例如预处理和知识蒸馏),并建议对典型培训方法进行一些更改。总而言之,本文定义了一般的周期性培训概念,并讨论了该概念可以应用于训练神经网络的几种特定方式。本着可重复性的精神,我们的实验中使用的代码可在\ url {https://github.com/lnsmith54/cfl}上获得。
translated by 谷歌翻译
Recently, neural networks purely based on attention were shown to address image understanding tasks such as image classification. These highperforming vision transformers are pre-trained with hundreds of millions of images using a large infrastructure, thereby limiting their adoption.In this work, we produce competitive convolution-free transformers by training on Imagenet only. We train them on a single computer in less than 3 days. Our reference vision transformer (86M parameters) achieves top-1 accuracy of 83.1% (single-crop) on ImageNet with no external data.More importantly, we introduce a teacher-student strategy specific to transformers. It relies on a distillation token ensuring that the student learns from the teacher through attention. We show the interest of this token-based distillation, especially when using a convnet as a teacher. This leads us to report results competitive with convnets for both Imagenet (where we obtain up to 85.2% accuracy) and when transferring to other tasks. We share our code and models.
translated by 谷歌翻译
Convolutional neural networks have been widely deployed in various application scenarios. In order to extend the applications' boundaries to some accuracy-crucial domains, researchers have been investigating approaches to boost accuracy through either deeper or wider network structures, which brings with them the exponential increment of the computational and storage cost, delaying the responding time.In this paper, we propose a general training framework named self distillation, which notably enhances the performance (accuracy) of convolutional neural networks through shrinking the size of the network rather than aggrandizing it. Different from traditional knowledge distillation -a knowledge transformation methodology among networks, which forces student neural networks to approximate the softmax layer outputs of pre-trained teacher neural networks, the proposed self distillation framework distills knowledge within network itself. The networks are firstly divided into several sections. Then the knowledge in the deeper portion of the networks is squeezed into the shallow ones. Experiments further prove the generalization of the proposed self distillation framework: enhancement of accuracy at average level is 2.65%, varying from 0.61% in ResNeXt as minimum to 4.07% in VGG19 as maximum. In addition, it can also provide flexibility of depth-wise scalable inference on resource-limited edge devices. Our codes will be released on github soon.
translated by 谷歌翻译
The focus of recent meta-learning research has been on the development of learning algorithms that can quickly adapt to test time tasks with limited data and low computational cost. Few-shot learning is widely used as one of the standard benchmarks in meta-learning. In this work, we show that a simple baseline: learning a supervised or selfsupervised representation on the meta-training set, followed by training a linear classifier on top of this representation, outperforms state-of-the-art few-shot learning methods. An additional boost can be achieved through the use of selfdistillation. This demonstrates that using a good learned embedding model can be more effective than sophisticated meta-learning algorithms. We believe that our findings motivate a rethinking of few-shot image classification benchmarks and the associated role of meta-learning algorithms.
translated by 谷歌翻译
Knowledge Distillation (KD) is a commonly used technique for improving the generalization of compact Pre-trained Language Models (PLMs) on downstream tasks. However, such methods impose the additional burden of training a separate teacher model for every new dataset. Alternatively, one may directly work on the improvement of the optimization procedure of the compact model toward better generalization. Recent works observe that the flatness of the local minimum correlates well with better generalization. In this work, we adapt Stochastic Weight Averaging (SWA), a method encouraging convergence to a flatter minimum, to fine-tuning PLMs. We conduct extensive experiments on various NLP tasks (text classification, question answering, and generation) and different model architectures and demonstrate that our adaptation improves the generalization without extra computation cost. Moreover, we observe that this simple optimization technique is able to outperform the state-of-the-art KD methods for compact models.
translated by 谷歌翻译
常规的几杆分类(FSC)旨在识别出有限标记的数据的新课程中的样本。最近,已经提出了域泛化FSC(DG-FSC),目的是识别来自看不见的域的新型类样品。 DG-FSC由于基础类(用于培训)和新颖类(评估中遇到)之间的域移位,对许多模型构成了巨大的挑战。在这项工作中,我们为解决DG-FSC做出了两个新颖的贡献。我们的首要贡献是提出重生网络(BAN)情节培训,并全面研究其对DG-FSC的有效性。作为一种特定的知识蒸馏形式,已证明禁令可以通过封闭式设置来改善常规监督分类的概括。这种改善的概括促使我们研究了DG-FSC的禁令,我们表明禁令有望解决DG-FSC中遇到的域转移。在令人鼓舞的发现的基础上,我们的第二个(主要)贡献是提出很少的禁令,FS-Ban,这是DG-FSC的新型禁令方法。我们提出的FS-BAN包括新颖的多任务学习目标:相互正则化,不匹配的老师和元控制温度,这些目标都是专门设计的,旨在克服DG-FSC中的中心和独特挑战,即过度拟合和领域差异。我们分析了这些技术的不同设计选择。我们使用六个数据集和三个基线模型进行全面的定量和定性分析和评估。结果表明,我们提出的FS-BAN始终提高基线模型的概括性能,并达到DG-FSC的最先进的准确性。
translated by 谷歌翻译
为了提高性能,深度神经网络需要更深入或更广泛的网络结构,以涉及大量的计算和记忆成本。为了减轻此问题,自我知识蒸馏方法通过提炼模型本身的内部知识来规范模型。常规的自我知识蒸馏方法需要其他可训练的参数或取决于数据。在本文中,我们提出了一种使用辍学(SD-Dropout)的简单有效的自我知识蒸馏方法。 SD-Dropout通过辍学采样来提炼多个模型的后验分布。我们的方法不需要任何其他可训练的模块,不依赖数据,只需要简单的操作。此外,这种简单的方法可以很容易地与各种自我知识蒸馏方法结合在一起。我们提供了对远期和反向KL-Diverence在工作中的影响的理论和实验分析。对各种视觉任务(即图像分类,对象检测和分布移动)进行的广泛实验表明,所提出的方法可以有效地改善单个网络的概括。进一步的实验表明,所提出的方法还提高了校准性能,对抗性鲁棒性和分布外检测能力。
translated by 谷歌翻译
随着机器学习的应用程序价值的增加,深神经网络(DNN)的知识产权(IP)权利正在越来越关注。通过我们的分析,大多数现有的DNN水印方法都可以抵抗微调和修剪攻击,但蒸馏攻击。为了解决这些问题,我们提出了一个新的DNN水印框架,统一的软标签扰动(USP),与探测器与要水印的模型配对,并定制了软标签扰动(CSP),通过将watermark嵌入WaterMark,将摄入量嵌入到水中模型输出概率分布。实验结果表明,我们的方法可以抵抗所有水印去除攻击,并且在蒸馏攻击中表现跑赢大盘。此外,我们在主要任务和水印之间还取决了出色的权衡,达到98.68%的水印准确性,而仅影响主要任务准确性0.59%。
translated by 谷歌翻译
无数据知识蒸馏(DFKD)的目的是在没有培训数据的情况下培训从教师网络的轻量级学生网络。现有方法主要遵循生成信息样本的范式,并通过针对数据先验,边界样本或内存样本来逐步更新学生模型。但是,以前的DFKD方法很难在不同的训练阶段动态调整生成策略,这反过来又很难实现高效且稳定的训练。在本文中,我们探讨了如何从课程学习(CL)的角度来教学学生,并提出一种新方法,即“ CUDFKD”,即“使用课程的无数据知识蒸馏”。它逐渐从简单的样本到困难的样本学习,这类似于人类学习的方式。此外,我们还提供了对主要化最小化(MM)算法的理论分析,并解释了CUDFKD的收敛性。在基准数据集上进行的实验表明,使用简单的课程设计策略,CUDFKD可以在最先进的DFKD方法和不同的基准测试中实现最佳性能,例如CIFAR10上RESNET18模型的95.28 \%TOP1的精度,这是更好的而不是从头开始培训数据。训练很快,在30个时期内达到90 \%的最高精度,并且训练期间的差异稳定。同样在本文中,还分析和讨论了CUDFKD的适用性。
translated by 谷歌翻译
Masked image modeling (MIM) performs strongly in pre-training large vision Transformers (ViTs). However, small models that are critical for real-world applications cannot or only marginally benefit from this pre-training approach. In this paper, we explore distillation techniques to transfer the success of large MIM-based pre-trained models to smaller ones. We systematically study different options in the distillation framework, including distilling targets, losses, input, network regularization, sequential distillation, etc, revealing that: 1) Distilling token relations is more effective than CLS token- and feature-based distillation; 2) An intermediate layer of the teacher network as target perform better than that using the last layer when the depth of the student mismatches that of the teacher; 3) Weak regularization is preferred; etc. With these findings, we achieve significant fine-tuning accuracy improvements over the scratch MIM pre-training on ImageNet-1K classification, using all the ViT-Tiny, ViT-Small, and ViT-base models, with +4.2%/+2.4%/+1.4% gains, respectively. Our TinyMIM model of base size achieves 52.2 mIoU in AE20K semantic segmentation, which is +4.1 higher than the MAE baseline. Our TinyMIM model of tiny size achieves 79.6% top-1 accuracy on ImageNet-1K image classification, which sets a new record for small vision models of the same size and computation budget. This strong performance suggests an alternative way for developing small vision Transformer models, that is, by exploring better training methods rather than introducing inductive biases into architectures as in most previous works. Code is available at https://github.com/OliverRensu/TinyMIM.
translated by 谷歌翻译