Vision Transformers convert images to sequences by slicing them into patches. The size of these patches controls a speed/accuracy tradeoff, with smaller patches leading to higher accuracy at greater computational cost, but changing the patch size typically requires retraining the model. In this paper, we demonstrate that simply randomizing the patch size at training time leads to a single set of weights that performs well across a wide range of patch sizes, making it possible to tailor the model to different compute budgets at deployment time. We extensively evaluate the resulting model, which we call FlexiViT, on a wide range of tasks, including classification, image-text retrieval, open-world detection, panoptic segmentation, and semantic segmentation, concluding that it usually matches, and sometimes outperforms, standard ViT models trained at a single patch size in an otherwise identical setup. Hence, FlexiViT training is a simple drop-in improvement for ViT that makes it easy to add compute-adaptive capabilities to most models relying on a ViT backbone architecture. Code and pre-trained models are available at https://github.com/google-research/big_vision
translated by 谷歌翻译
Explainability has become a central requirement for the development, deployment, and adoption of machine learning (ML) models and we are yet to understand what explanation methods can and cannot do. Several factors such as data, model prediction, hyperparameters used in training the model, and random initialization can all influence downstream explanations. While previous work empirically hinted that explanations (E) may have little relationship with the prediction (Y), there is a lack of conclusive study to quantify this relationship. Our work borrows tools from causal inference to systematically assay this relationship. More specifically, we measure the relationship between E and Y by measuring the treatment effect when intervening on their causal ancestors (hyperparameters) (inputs to generate saliency-based Es or Ys). We discover that Y's relative direct influence on E follows an odd pattern; the influence is higher in the lowest-performing models than in mid-performing models, and it then decreases in the top-performing models. We believe our work is a promising first step towards providing better guidance for practitioners who can make more informed decisions in utilizing these explanations by knowing what factors are at play and how they relate to their end task.
translated by 谷歌翻译
Although self-/un-supervised methods have led to rapid progress in visual representation learning, these methods generally treat objects and scenes using the same lens. In this paper, we focus on learning representations for objects and scenes that preserve the structure among them. Motivated by the observation that visually similar objects are close in the representation space, we argue that the scenes and objects should instead follow a hierarchical structure based on their compositionality. To exploit such a structure, we propose a contrastive learning framework where a Euclidean loss is used to learn object representations and a hyperbolic loss is used to encourage representations of scenes to lie close to representations of their constituent objects in a hyperbolic space. This novel hyperbolic objective encourages the scene-object hypernymy among the representations by optimizing the magnitude of their norms. We show that when pretraining on the COCO and OpenImages datasets, the hyperbolic loss improves downstream performance of several baselines across multiple datasets and tasks, including image classification, object detection, and semantic segmentation. We also show that the properties of the learned representations allow us to solve various vision tasks that involve the interaction between scenes and objects in a zero-shot fashion. Our code can be found at \url{https://github.com/shlokk/HCL/tree/main/HCL}.
translated by 谷歌翻译
在许多图像分类任务中,诸如夹子之类的开放式摄影模型具有高精度。但是,在某些设置中,他们的零拍摄性能远非最佳。我们研究模型修补程序,目的是提高对特定任务的准确性,而不会在表现已经足够的任务上降低准确性。为了实现这一目标,我们引入了油漆,这是一种修补方法,该方法在微调之前使用模型的权重与要修补的任务进行微调后的权重。在零机夹的性能差的九个任务上,油漆可将精度提高15至60个百分点,同时将ImageNet上的精度保留在零拍模型的一个百分点之内。油漆还允许在多个任务上修补单个模型,并通过模型刻度进行改进。此外,我们确定了广泛转移的案例,即使任务不相交,对一个任务进行修补也会提高其他任务的准确性。最后,我们研究了超出常见基准的应用程序,例如计数或减少印刷攻击对剪辑的影响。我们的发现表明,可以扩展一组任务集,开放式摄影模型可实现高精度,而无需从头开始重新训练它们。
translated by 谷歌翻译
在这项工作中,我们研究了对象检测模型的自我监督预审计的不同方法。我们首先设计一个通用框架,通过随机采样和投射框来学习从图像中学习空间一致的密集表示,并将其投影到每个增强视图,并最大程度地提高相应的盒子功能之间的相似性。我们研究文献中的现有设计选择,例如盒子生成,功能提取策略,并使用其在实例级图像表示学习技术上获得成功启发的多种视图。我们的结果表明,该方法对超参数的不同选择是可靠的,并且使用多个视图不如实例级图像表示学习所显示的那样有效。我们还设计了两个辅助任务,以通过(1)通过使用对比度损失从采样设置中预测盒子中的一个视图中的框来预测框,并且(2)使用变压器预测盒子坐标,这可能会受益。下游对象检测任务。我们发现,在标记数据上预审计的模型时,这些任务不会导致更好的对象检测性能。
translated by 谷歌翻译
医疗人工智能(AI)的最新进展已提供了可以达到临床专家水平绩效的系统。但是,当在与训练环境不同的临床环境中评估时,这种系统往往会证明次优的“分布式”性能。一种常见的缓解策略是使用特定地点数据为每个临床环境开发单独的系统[1]。但是,这很快变得不切实际,因为医疗数据很耗时,可以注释且昂贵[2]。因此,“数据有效概括”的问题给医学AI开发带来了持续的困难。尽管代表性学习的进展显示出希望,但并未对其好处进行严格的研究,特别是用于分布的设置。为了应对这些挑战,我们提出了RESEDIS,这是一种统一的代表学习策略,以提高医学成像AI的鲁棒性和数据效率。雷雷迪斯使用大规模监督转移学习与自我监督学习的通用组合,几乎不需要特定于任务的自定义。我们研究各种医学成像任务,并使用回顾性数据模拟三个现实的应用程序场景。 RESEDIS表现出明显改善的分布性能,而在强有力的基线上,诊断准确性相对相对提高了11.5%。更重要的是,我们的策略会导致对医学成像AI的强大数据有效的概括,并使用跨任务的1%至33%的重新培训数据匹配强有力的监督基线。这些结果表明,Repedis可以显着加速医学成像AI开发的生命周期,从而为医学成像AI提供了重要的一步,以产生广泛的影响。
translated by 谷歌翻译
最大化模型准确性的常规配方是(1)具有各种超参数的多个模型,以及(2)选择在固定验证集中表现最佳的单个模型,从而丢弃其余部分。在本文中,我们在微调大型预训练的模型的背景下重新审视了该过程的第二步,其中微调模型通常位于单个低误差盆地中。我们表明,平均多种模型的权重以不同的超参数配置进行了微调通常提高准确性和鲁棒性。与传统的合奏不同,我们可能会平均许多模型,而不会产生任何其他推理或记忆成本 - 我们将结果称为“模型汤”。当微调大型预训练的模型,例如夹子,Align和VIT-G在JFT上预先训练的VIT-G时,我们的汤食谱可为ImageNet上的超参数扫描中的最佳模型提供显着改进。所得的VIT-G模型在Imagenet上达到90.94%的TOP-1准确性,实现了新的最新状态。此外,我们表明,模型汤方法扩展到多个图像分类和自然语言处理任务,改善分发性能,并改善新下游任务的零局部性。最后,我们通过分析将权重平衡和与logit浓度的性能相似与预测的损失和信心的平坦度联系起来,并经过经验验证这种关系。代码可从https://github.com/mlfoundations/model-soups获得。
translated by 谷歌翻译
预训练(PT),然后进行微调(FT)是培训神经网络的有效方法,并导致许多域中的显着性能改进。 PT可以包含各种设计选择,如任务和数据重新免除策略,增强政策和噪声模型,所有这些都可以显着影响所学到的陈述的质量。因此,必须适当地调整这些策略引入的超级参数。但是,设置这些超参数的值是具有挑战性的。大多数现有方法都努力缩放到高维度,太慢和内存密集,或者不能直接应用于两级PT和FT学习过程。在这项工作中,我们提出了一种基于渐变的梯度的算法,以Meta-Learn PT HyperParameters。我们将PT HyperParameter优化问题正式化,并提出了一种通过展开优化结合隐式分化和反向来获得PT超级参数梯度的新方法。我们展示了我们的方法可以提高两个真实域的预测性能。首先,我们优化高维任务加权超参数,用于多任务对蛋白质 - 蛋白质相互作用图进行培训,并将Auroc提高至3.9%。其次,我们在心电图数据上优化用于SIMCLR的SIMCLR的数据增强神经网络,并将Auroc提高到1.9%。
translated by 谷歌翻译
了解生物和人造网络的运作仍然是一个艰难而重要的挑战。为了确定一般原则,研究人员越来越有兴趣测量培训的大量网络,或者在培训或生物学地适应类似的任务。现在需要一种标准化的分析工具来确定网络级协变量 - 例如架构,解剖脑区和模型生物 - 影响神经表示(隐藏层激活)。在这里,我们通过定义量化代表性异化的广泛的公制空间,为这些分析提供严格的基础。使用本框架,我们根据规范相关分析修改现有的代表性相似度量,以满足三角形不等式,制定致扫描层中的感应偏差的新型度量,并识别使网络表示能够结合到基本上的近似的欧几里德嵌入物。货架机学习方法。我们展示了来自生物学(Allen Institute脑观测所)和深度学习(NAS-BENCH-101)的大规模数据集的这些方法。在这样做时,我们识别在解剖特征和模型性能方面可解释的神经表现之间的关系。
translated by 谷歌翻译
执行零摄像推理时(即,在特定数据集上不进行微调)时,大型预训练的模型(例如剪辑或ALIGN)在一系列数据分布中提供一致的精度。尽管现有的微调方法显着提高了给定目标分布的准确性,但它们通常会降低分配变化的稳健性。我们通过引入一种简单有效的方法来提高鲁棒性,同时进行微调:结合零拍和微调模型(Wise-ft)的重量。与标准的微调相比,Wise-FT在分配变化下提供了巨大的准确性提高,同时保留了目标分布的高精度。在Imagenet和五个派生的分布变化上,Wise-FT在先前的工作中提高了分布转移的准确性4至6个百分点(PP),同时将Imagenet精度提高1.6pp。Wise-ft的稳健性相似(2至23 pp),明智之前与七个常用的转移学习数据集的标准微调相比,在一组进一步的分配转移的各种集合中,准确性增长率为0.8至3.3 pp。这些改进在微调或推理期间没有任何额外的计算成本。
translated by 谷歌翻译