Fast Differentiable Clipping-Aware Normalization and Rescaling

07/15/2020
by   Jonas Rauber, et al.
6

Rescaling a vector δ⃗∈ℝ^n to a desired length is a common operation in many areas such as data science and machine learning. When the rescaled perturbation ηδ⃗ is added to a starting point x⃗∈ D (where D is the data domain, e.g. D = [0, 1]^n), the resulting vector v⃗ = x⃗ + ηδ⃗ will in general not be in D. To enforce that the perturbed vector v is in D, the values of v⃗ can be clipped to D. This subsequent element-wise clipping to the data domain does however reduce the effective perturbation size and thus interferes with the rescaling of δ⃗. The optimal rescaling η to obtain a perturbation with the desired norm after the clipping can be iteratively approximated using a binary search. However, such an iterative approach is slow and non-differentiable. Here we show that the optimal rescaling can be found analytically using a fast and differentiable algorithm. Our algorithm works for any p-norm and can be used to train neural networks on inputs with normalized perturbations. We provide native implementations for PyTorch, TensorFlow, JAX, and NumPy based on EagerPy.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/18/2019

On the perturbation series for eigenvalues and eigenprojections

A standard perturbation result states that perturbed eigenvalues and eig...
research
02/02/2023

Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspective

The top-k operator returns a k-sparse vector, where the non-zero values ...
research
05/31/2017

Spectral Norm Regularization for Improving the Generalizability of Deep Learning

We investigate the generalizability of deep learning based on the sensit...
research
04/20/2023

Certified Adversarial Robustness Within Multiple Perturbation Bounds

Randomized smoothing (RS) is a well known certified defense against adve...
research
02/25/2021

Fast Minimum-norm Adversarial Attacks through Adaptive Norm Constraints

Evaluating adversarial robustness amounts to finding the minimum perturb...
research
01/18/2019

On Estimation under Noisy Order Statistics

This paper presents an estimation framework to assess the performance of...
research
02/16/2020

Differentiable Top-k Operator with Optimal Transport

The top-k operation, i.e., finding the k largest or smallest elements fr...

Please sign up or login with your details

Forgot password? Click here to reset