依靠这样的前提是,二进制神经网络的性能可以在很大程度上恢复,而完全精确的权重向量与其相应的二进制向量之间的量化错误,网络二线化的现有作品经常采用模型鲁棒性的想法以达到上述目标。但是,鲁棒性仍然是一个不明智的概念,而没有扎实的理论支持。在这项工作中,我们介绍了Lipschitz的连续性,即定义明确的功能特性,是定义BNN模型鲁棒性的严格标准。然后,我们建议将Lipschitz连续性保留为正规化项,以提高模型的鲁棒性。特别是,虽然流行的Lipschitz涉及正则化方法由于其极端稀疏而经常在BNN中崩溃,但我们将保留矩阵设计以近似于目标重量矩阵的光谱规范,可以将其作为BNN的Lipschitz常数的近似值部署精确的L​​ipschitz恒定计算(NP-HARD)。我们的实验证明,我们的BNN特异性正则化方法可以有效地增强BNN的鲁棒性(在Imagenet-C上作证),从而在CIFAR和Imagenet上实现最新性能。
translated by 谷歌翻译
神经网络二进制通过将其权重和激活量化为1位来加速深层模型。但是,二进制神经网络(BNN)与其完整精确(FP)对应物之间仍然存在巨大的性能差距。由于早期作品中权重二进制引起的量化误差已减少,因此激活二进化成为进一步提高准确性的主要障碍。 BNN表征了独特而有趣的结构,其中二进制和潜在的fp激活存在于同一正向通行证中(\ textit {i.e。} $ \ text {binarize}(\ mathbf {a} _f {a} _f)= \ mathbf {a a} _b $) 。为了减轻从FP到二元激活的二进化操作引起的信息降解,我们在通过互信息(MI)最大化的镜头训练BNN时建立了一种新颖的对比学习框架。将MI作为指标引入,以衡量二进制和FP激活之间共享的信息,这有助于对比度学习。具体而言,通过从相同输入样品中拉出二进制和FP激活的正对,以及从不同样品中推动负面对(负面对数的数量可以大大),从而极大地增强了BNN的表示能力。这使下游任务不仅有益于分类,而且还受益于分类和深度估计,〜\ textit {etc}。实验结果表明,我们的方法可以作为现有最新二元方法的堆积模块实现NYUD-V2的能力。
translated by 谷歌翻译
二进制神经网络(BNNS)将原始的全精度权重和激活为1位,带有符号功能。由于传统符号函数的梯度几乎归零,因此不能用于反向传播,因此已经提出了几次尝试来通过使用近似梯度来缓解优化难度。然而,这些近似损坏了事实梯度的主要方向。为此,我们建议使用用于训练BNN的正弦函数的组合来估计傅立叶频域中的符号功能的梯度,即频域近似(FDA)。该提出的方法不会影响占据大部分整体能量的原始符号功能的低频信息,并且将忽略高频系数以避免巨大的计算开销。此外,我们将噪声适配模块嵌入到训练阶段以补偿近似误差。关于多个基准数据集和神经架构的实验说明了使用我们的方法学习的二进制网络实现了最先进的准确性。代码将在\ texit {https://gitee.com/mindspore/models/tree/master/research/cv/fda-bnn}上获得。
translated by 谷歌翻译
模型二进制化是一种压缩神经网络并加速其推理过程的有效方法。但是,1位模型和32位模型之间仍然存在显着的性能差距。实证研究表明,二进制会导致前进和向后传播中的信息损失。我们提出了一个新颖的分布敏感信息保留网络(DIR-NET),该网络通过改善内部传播和引入外部表示,将信息保留在前后传播中。 DIR-NET主要取决于三个技术贡献:(1)最大化二进制(IMB)的信息:最小化信息损失和通过重量平衡和标准化同时同时使用权重/激活的二进制误差; (2)分布敏感的两阶段估计器(DTE):通过共同考虑更新能力和准确的梯度来通过分配敏感的软近似来保留梯度的信息; (3)代表性二进制 - 意识蒸馏(RBD):通过提炼完整精确和二元化网络之间的表示来保留表示信息。 DIR-NET从统一信息的角度研究了BNN的前进过程和后退过程,从而提供了对网络二进制机制的新见解。我们的DIR-NET中的三种技术具有多功能性和有效性,可以在各种结构中应用以改善BNN。关于图像分类和客观检测任务的综合实验表明,我们的DIR-NET始终优于主流和紧凑型体系结构(例如Resnet,vgg,vgg,EfficityNet,darts和mobilenet)下最新的二进制方法。此外,我们在现实世界中的资源有限设备上执行DIR-NET,该设备可实现11.1倍的存储空间和5.4倍的速度。
translated by 谷歌翻译
One of the challenges in the study of generative adversarial networks is the instability of its training. In this paper, we propose a novel weight normalization technique called spectral normalization to stabilize the training of the discriminator. Our new normalization technique is computationally light and easy to incorporate into existing implementations. We tested the efficacy of spectral normalization on CIFAR10, STL-10, and ILSVRC2012 dataset, and we experimentally confirmed that spectrally normalized GANs (SN-GANs) is capable of generating images of better or equal quality relative to the previous training stabilization techniques. The code with Chainer (Tokui et al., 2015), generated images and pretrained models are available at https://github.com/pfnet-research/sngan_ projection.
translated by 谷歌翻译
现代生成的对抗网络(GANS)主要使用判别者(或批评者)中的分段线性激活功能,包括Relu和Leaceryru。这些模型学习分段线性映射,其中每个部分处理输入空间的子集,每个子​​集的梯度​​是分段常数。在这样一类鉴别者(或批评者)函数下,我们呈现梯度标准化(Gran),一种新的输入相关标准化方法,可确保输入空间中的分段k-lipschitz约束。与光谱归一化相比,Gran不约束各个网络层的处理,并且与梯度惩罚不同,严格执行几乎无处不在的分段Lipschitz约束。凭经验,我们展示了多个数据集的改进了图像生成性能(包括Cifar-10/100,STL-10,LSUN卧室和Celeba),GaN丢失功能和指标。此外,我们分析了在几个标准GAN中改变了经常无核的Lipschitz常数K,而不仅仅是实现显着的性能增益,还可以在普通的ADAM优化器中找到K和培训动态之间的连接,特别是在低梯度损失平台之间。
translated by 谷歌翻译
Deep neural networks are notorious for being sensitive to small well-chosen perturbations, and estimating the regularity of such architectures is of utmost importance for safe and robust practical applications. In this paper, we investigate one of the key characteristics to assess the regularity of such methods: the Lipschitz constant of deep learning architectures. First, we show that, even for two layer neural networks, the exact computation of this quantity is NP-hard and state-of-art methods may significantly overestimate it. Then, we both extend and improve previous estimation methods by providing AutoLip, the first generic algorithm for upper bounding the Lipschitz constant of any automatically differentiable function. We provide a power method algorithm working with automatic differentiation, allowing efficient computations even on large convolutions. Second, for sequential neural networks, we propose an improved algorithm named SeqLip that takes advantage of the linear computation graph to split the computation per pair of consecutive layers. Third we propose heuristics on SeqLip in order to tackle very large networks. Our experiments show that SeqLip can significantly improve on the existing upper bounds. Finally, we provide an implementation of AutoLip in the PyTorch environment that may be used to better estimate the robustness of a given neural network to small perturbations or regularize it using more precise Lipschitz estimations.Recently, Lipschitz continuity was used in order to improve the state-of-the-art in several deep learning topics: (1) for robust learning, avoiding adversarial attacks was achieved in [15] by constraining local Lipschitz constants in neural networks. (2) For generative models, using spectral normalization on each layer allowed [13] to successfully train a GAN on ILRSVRC2012 dataset. (3) In deep 32nd Conference on Neural Information Processing Systems (NeurIPS 2018),
translated by 谷歌翻译
本文研究了重量和激活都将二进制神经网络(BNN)二进制为1位值,从而大大降低了记忆使用率和计算复杂性。由于现代深层神经网络具有复杂的设计,具有复杂的架构,其准确性,因此权重和激活分布的多样性非常高。因此,传统的符号函数不能很好地用于有效地在BNN中进行全精度值。为此,我们提出了一种称为Adabin的简单而有效的方法,可自适应获得最佳的二进制集$ \ {b_1,b_2 \} $($ b_1,b_1,b_2 \ in \ mathbb {r} $)的重量和激活而不是固定集(即$ \ { - 1,+1 \} $)。通过这种方式,提出的方法可以更好地拟合不同的分布,并提高二进制特征的表示能力。实际上,我们使用中心位置和1位值的距离来定义新的二进制量化函数。对于权重,我们提出了一种均衡方法,将对称分布的对称中心与实价分布相对,并最大程度地减少它们的kullback-leibler差异。同时,我们引入了一种基于梯度的优化方法,以获取这两个激活参数,这些参数以端到端的方式共同训练。基准模型和数据集的实验结果表明,拟议的Adabin能够实现最新性能。例如,我们使用RESNET-18体系结构在Imagenet上获得66.4 \%TOP-1的精度,并使用SSD300获得了Pascal VOC的69.4映射。
translated by 谷歌翻译
经认证的稳健性是安全关键应用中的深度神经网络的理想性质,流行的训练算法可以通过计算其Lipschitz常数的全球界限来认证神经网络的鲁棒性。然而,这种界限往往松动:它倾向于过度规范神经网络并降低其自然精度。绑定的Lipschitz绑定可以在自然和认证的准确性之间提供更好的权衡,但通常很难根据网络的非凸起计算。在这项工作中,我们通过考虑激活函数(例如Relu)和权重矩阵之间的相互作用,提出了一种有效和培训的\ emph {本地} Lipschitz上限。具体地,当计算权重矩阵的诱发标准时,我们消除了相应的行和列,其中保证激活函数在每个给定数据点的邻域中是常数,它提供比全局Lipschitz常数的可怕更严格的绑定神经网络。我们的方法可用作插入式模块,以拧紧在许多可认证的训练算法中绑定的Lipschitz。此外,我们建议夹住激活功能(例如,Relu和Maxmin),具有可读的上限阈值和稀疏性损失,以帮助网络实现甚至更严格的本地嘴唇尖端。在实验上,我们表明我们的方法始终如一地优于Mnist,CiFar-10和Tinyimagenet数据集的清洁和认证准确性,具有各种网络架构的清洁和认证的准确性。
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 谷歌翻译
Low-rankness plays an important role in traditional machine learning, but is not so popular in deep learning. Most previous low-rank network compression methods compress the networks by approximating pre-trained models and re-training. However, the optimal solution in the Euclidean space may be quite different from the one in the low-rank manifold. A well-pre-trained model is not a good initialization for the model with low-rank constraints. Thus, the performance of a low-rank compressed network degrades significantly. Compared to other network compression methods such as pruning, low-rank methods attracts less attention in recent years. In this paper, we devise a new training method, low-rank projection with energy transfer (LRPET), that trains low-rank compressed networks from scratch and achieves competitive performance. First, we propose to alternately perform stochastic gradient descent training and projection onto the low-rank manifold. Compared to re-training on the compact model, this enables full utilization of model capacity since solution space is relaxed back to Euclidean space after projection. Second, the matrix energy (the sum of squares of singular values) reduction caused by projection is compensated by energy transfer. We uniformly transfer the energy of the pruned singular values to the remaining ones. We theoretically show that energy transfer eases the trend of gradient vanishing caused by projection. Third, we propose batch normalization (BN) rectification to cut off its effect on the optimal low-rank approximation of the weight matrix, which further improves the performance. Comprehensive experiments on CIFAR-10 and ImageNet have justified that our method is superior to other low-rank compression methods and also outperforms recent state-of-the-art pruning methods. Our code is available at https://github.com/BZQLin/LRPET.
translated by 谷歌翻译
对于深层网络而言,这是一个非常理想的属性,可与小型输入更改保持强大。实现此属性的一种流行方法是设计具有小Lipschitz常数的网络。在这项工作中,我们提出了一种用于构建具有许多理想属性的Lipschitz网络的新技术:它可以应用于任何线性网络层(完全连接或卷积),它在Lipschitz常数上提供了正式的保证,它是易于实施和运行效率,可以与任何培训目标和优化方法结合使用。实际上,我们的技术是文献中第一个同时实现所有这些属性的技术。我们的主要贡献是基于重新的重量矩阵参数化,该参数保证每个网络层最多具有LIPSCHITZ常数,并且导致学习的权重矩阵接近正交。因此,我们称这种层几乎是正交的Lipschitz(AOL)。在图像分类的背景下,实验和消融研究具有认证的鲁棒精度证实,AOL层获得与大多数现有方法相当的结果。但是,它们更容易实现,并且更广泛地适用,因为它们不需要计算昂贵的矩阵正交化或反转步骤作为网络体系结构的一部分。我们在https://github.com/berndprach/aol上提供代码。
translated by 谷歌翻译
标准化技术已成为现代卷积神经网络(Convnets)中的基本组件。特别是,许多最近的作品表明,促进重量的正交性有助于培训深层模型并提高鲁棒性。对于Courmnets,大多数现有方法基于惩罚或归一化矩阵判断或施加卷积核的重量矩阵。这些方法经常摧毁或忽视核的良性卷积结构;因此,对于深扫描器来说,它们通常是昂贵或不切实际的。相比之下,我们介绍了一种简单富有高效的“卷积归一化”(ConvNORM)方法,可以充分利用傅立叶域中的卷积结构,并用作简单的即插即用模块,以方便地结合到任何围栏中。我们的方法是通过最近关于卷积稀疏编码的预处理方法的工作启发,可以有效地促进每个层的频道方向等距。此外,我们表明我们的判断可以降低重量矩阵的层状频谱标准,从而改善网络的嘴唇,导致培训更容易培训和改善深扫描器的鲁棒性。在噪声损坏和生成的对抗网络(GAN)下应用于分类,我们表明CONVNOMOL提高了常见扫描仪(如RENET和GAN性能)的稳健性。我们通过Cifar和Imagenet的数值实验验证了我们的研究结果。
translated by 谷歌翻译
将SVD元层插入神经网络中很容易使协方差不良,这可能会损害训练稳定性和概括能力中的模型。在本文中,我们系统地研究了如何通过对前SVD层的正交性来改善协方差调节。首先研究重量的现有正交治疗。但是,这些技术可以改善条件,但会损害性能。为了避免这种副作用,我们提出了最近的正交梯度(NOG)和最佳学习率(OLR)。我们方法的有效性在两个应用程序中得到了验证:非相关的批处理归一化(BN)和全局协方差池(GCP)。关于视觉识别的广泛实验表明,我们的方法可以同时改善协方差调节和概括。此外,与正交重量的组合可以进一步提高性能。
translated by 谷歌翻译
Although considerable progress has been obtained in neural network quantization for efficient inference, existing methods are not scalable to heterogeneous devices as one dedicated model needs to be trained, transmitted, and stored for one specific hardware setting, incurring considerable costs in model training and maintenance. In this paper, we study a new vertical-layered representation of neural network weights for encapsulating all quantized models into a single one. With this representation, we can theoretically achieve any precision network for on-demand service while only needing to train and maintain one model. To this end, we propose a simple once quantization-aware training (QAT) scheme for obtaining high-performance vertical-layered models. Our design incorporates a cascade downsampling mechanism which allows us to obtain multiple quantized networks from one full precision source model by progressively mapping the higher precision weights to their adjacent lower precision counterparts. Then, with networks of different bit-widths from one source model, multi-objective optimization is employed to train the shared source model weights such that they can be updated simultaneously, considering the performance of all networks. By doing this, the shared weights will be optimized to balance the performance of different quantized models, thus making the weights transferable among different bit widths. Experiments show that the proposed vertical-layered representation and developed once QAT scheme are effective in embodying multiple quantized networks into a single one and allow one-time training, and it delivers comparable performance as that of quantized models tailored to any specific bit-width. Code will be available.
translated by 谷歌翻译
二进制神经网络(BNNS)对现实世界中嵌入式设备显示出巨大的希望。作为实现强大BNN的关键步骤之一,规模因子计算在减少其实价对应物的性能差距方面起着至关重要的作用。然而,现有的BNN忽略了实价重量和尺度因子的固有双线关系,从而导致训练过程不足引起的亚最佳模型。为了解决这个问题,提出了复发性双线性优化,以通过将固有的双线性变量关联到背面传播过程中,以改善BNNS(RBONN)的学习过程。我们的工作是从双线性角度优化BNN的首次尝试。具体而言,我们采用经常​​性优化和密度 - 列表来依次回溯稀疏的实价过滤器,该过滤器将经过充分的训练并基于可控的学习过程达到其性能限制。我们获得了强大的rbonn,在各种模型和数据集上的最先进的BNN上表现出令人印象深刻的性能。特别是,在对象检测的任务下,rbonn具有出色的概括性能。我们的代码在https://github.com/stevetsui/rbonn上进行开源。
translated by 谷歌翻译
We show that standard ResNet architectures can be made invertible, allowing the same model to be used for classification, density estimation, and generation. Typically, enforcing invertibility requires partitioning dimensions or restricting network architectures. In contrast, our approach only requires adding a simple normalization step during training, already available in standard frameworks. Invertible ResNets define a generative model which can be trained by maximum likelihood on unlabeled data. To compute likelihoods, we introduce a tractable approximation to the Jacobian log-determinant of a residual block. Our empirical evaluation shows that invertible ResNets perform competitively with both stateof-the-art image classifiers and flow-based generative models, something that has not been previously achieved with a single architecture.
translated by 谷歌翻译
用于压缩神经网络的非均匀量化策略通常实现的性能比其对应于对应物,即统一的策略,因为其优越的代表性能力。然而,许多非均匀量化方法在实现不均匀量化的权重/激活时忽略了复杂的投影过程,这在硬件部署中引起了不可忽略的时间和空间开销。在这项研究中,我们提出了非均匀致均匀的量化(N2UQ),一种方法,其能够保持非均匀方法的强表示能力,同时硬件友好且有效地作为模型推理的均匀量化。我们通过学习灵活的等距输入阈值来实现这一目标,以更好地拟合潜在的分布,同时将这些实值输入量化为等距输出电平。要使用可学习的输入阈值训练量化网络,我们将广义直通估计器(G-STE)介绍,用于难以应答的后向衍生计算W.r.t.阈值参数。此外,我们考虑熵保持正则化,以进一步降低重量量化的信息损失。即使在这种不利约束的施加均匀量化的重量和激活的情况下,我们的N2UQ也经历了最先进的非均匀量化方法,在想象中达到了0.7〜1.8%,展示了N2UQ设计的贡献。代码将公开可用。
translated by 谷歌翻译
神经体系结构搜索(NAS)促进了神经体系结构的自动发现,从而实现了图像识别的最新精度。尽管NAS取得了进展,但到目前为止,NAS对理论保证几乎没有关注。在这项工作中,我们研究了NAS在统一框架下的概括属性,从而实现(深)层跳过连接搜索和激活功能搜索。为此,我们从搜索空间(包括混合的激活功能,完全连接和残留的神经网络)的(包括)有限宽度方向上得出了神经切线核的最小特征值的下(和上)边界。由于在统一框架下的各种体系结构和激活功能的耦合,我们的分析是不平凡的。然后,我们利用特征值边界在随机梯度下降训练中建立NAS的概括误差界。重要的是,我们从理论上和实验上展示了衍生结果如何指导NAS,即使在没有培训的情况下,即使在没有培训的情况下,也可以根据我们的理论进行无训练的算法。因此,我们的数值验证阐明了NAS计算有效方法的设计。
translated by 谷歌翻译
Although weight and activation quantization is an effective approach for Deep Neural Network (DNN) compression and has a lot of potentials to increase inference speed leveraging bit-operations, there is still a noticeable gap in terms of prediction accuracy between the quantized model and the full-precision model. To address this gap, we propose to jointly train a quantized, bit-operation-compatible DNN and its associated quantizers, as opposed to using fixed, handcrafted quantization schemes such as uniform or logarithmic quantization. Our method for learning the quantizers applies to both network weights and activations with arbitrary-bit precision, and our quantizers are easy to train. The comprehensive experiments on CIFAR-10 and ImageNet datasets show that our method works consistently well for various network structures such as AlexNet, VGG-Net, GoogLeNet, ResNet, and DenseNet, surpassing previous quantization methods in terms of accuracy by an appreciable margin. Code available at https://github.com/Microsoft/LQ-Nets
translated by 谷歌翻译