<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Provable Defense Against Geometric Transformations</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2023 May</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10421479</idno>
					<idno type="doi"></idno>
					<title level='j'>11th International Conference on Learning Representations</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Rem Yang</author><author>Jacob Laurel</author><author>Sasa Misailovic</author><author>Gagandeep Singh</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Geometric image transformations that arise in the real world, such as scaling and rotation, have been shown to easily deceive deep neural networks (DNNs). Hence, training DNNs to be certifiably robust to these perturbations is critical. However, no prior work has been able to incorporate the objective of deterministic certified robustness against geometric transformations into the training procedure, as existing verifiers are exceedingly slow. To address these challenges, we propose the first provable defense for deterministic certified geometric robustness. Our framework leverages a novel GPU-optimized verifier that can certify images between 60× to 42,600× faster than existing geometric robustness verifiers, and thus unlike existing works, is fast enough for use in training. Across multiple datasets, our results show that networks trained via our framework consistently achieve state-of-the-art deterministic certified geometric robustness and clean accuracy. Furthermore, for the first time, we verify the geometric robustness of a neural network for the challenging, real-world setting of autonomous driving.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">INTRODUCTION</head><p>Despite the widespread success of deep neural networks (DNNs), they remain surprisingly susceptible to misclassification when small adversarial changes are applied to correctly classified inputs <ref type="bibr">(Goodfellow et al., 2015;</ref><ref type="bibr">Kurakin et al., 2018)</ref>. This phenomenon is especially concerning as DNNs are increasingly being deployed in many safety-critical domains, such as autonomous driving <ref type="bibr">(Bojarski et al., 2016;</ref><ref type="bibr">Sitawarin et al., 2018)</ref> and medical imaging <ref type="bibr">(Finlayson et al., 2019)</ref>.</p><p>As a result, there have been widespread efforts aimed at formally verifying the robustness of DNNs against norm-based adversarial perturbations <ref type="bibr">(Gehr et al., 2018;</ref><ref type="bibr">Singh et al., 2019;</ref><ref type="bibr">Weng et al., 2018;</ref><ref type="bibr">Zhang et al., 2018)</ref> and designing novel mechanisms for incorporating feedback from the verifier to train provably robust networks with deterministic guarantees <ref type="bibr">(Gowal et al., 2019;</ref><ref type="bibr">Mirman et al., 2018;</ref><ref type="bibr">Xu et al., 2020;</ref><ref type="bibr">Zhang et al., 2020)</ref>. However, recent works <ref type="bibr">(Dreossi et al., 2018;</ref><ref type="bibr">Engstrom et al., 2019;</ref><ref type="bibr">Hendrycks &amp; Dietterich, 2019;</ref><ref type="bibr">Kanbak et al., 2018;</ref><ref type="bibr">Liu et al., 2019)</ref> have shown that geometric transformations &#177; which capture real-world artifacts like scaling and changes in contrast &#177; can also easily deceive DNNs. No prior work has formulated the construction of a deterministic provable defense needed to ensure DNN safety against geometric transformations. Further, existing deterministic verifiers for geometric perturbations <ref type="bibr">(Balunovic et al., 2019;</ref><ref type="bibr">Mohapatra et al., 2020)</ref> are severely limited by their scalability and cannot be used during training for building provable defenses. Probabilistic geometric robustness verifiers <ref type="bibr">(Fischer et al., 2020;</ref><ref type="bibr">Hao et al., 2022;</ref><ref type="bibr">Li et al., 2021)</ref> are more scalable but may be inadequate for safety-critical applications like autonomous driving, since they may falsely label an adversarial region as robust. These limitations have prevented the development of deterministic provable defenses against geometric transformations thus far.</p><p>Challenges. Training networks to be certifiably robust against geometric transformations carries multiple challenges that do not arise with norm-based perturbations. First, geometric transformations are much more difficult to formally reason about than &#8467; p perturbations, as unlike an &#8467; p -ball, the adversarial region of a geometric transformation is highly nonuniform and cannot be directly represented as a symbolic formula encoding a convex shape. Computing this adversarial input region for geometric perturbations is indeed the main computational bottleneck faced by existing geometric robustness verifiers <ref type="bibr">(Balunovic et al., 2019;</ref><ref type="bibr">Mohapatra et al., 2020)</ref>, thus making the overall verification too expensive for use during training. Hence, training DNNs for deterministic certified robustness against geometric perturbations requires not only formulating the construction of a provable defense, but also completely redesigning geometric robustness verifiers for scalability. This Work. To address the outlined challenges, we propose Certified Geometric Training (CGT), a framework for training neural networks that are deterministically certified robust to geometric transformations. The framework consists of (1) the Fast Geometric Verifier (FGV), a novel method to perform geometric robustness certification that is orders of magnitude faster than the state-of-theart and (2) computationally efficient loss functions that embed FGV into the training procedure.</p><p>We empirically evaluate our method on the <ref type="bibr">MNIST (LeCun et al., 1998)</ref>, CIFAR10 <ref type="bibr">(Krizhevsky, 2009)</ref>, Tiny ImageNet <ref type="bibr">(Le &amp; Yang, 2015)</ref>, and Udacity self-driving car <ref type="bibr">(Udacity, 2016)</ref> datasets to demonstrate CGT's effectiveness. Our results show that CGT-trained networks consistently achieve state-of-the-art clean accuracy and certified robustness; furthermore, FGV is between 60&#215; to 42,600&#215; faster than the state-of-the-art verifier for certifying each image. We also achieve several breakthroughs: (1) FGV enables us to certify deterministic robustness against geometric transformations on entire test sets of 10,000 images, which is more than 50&#215; the number of images over existing works (100 in <ref type="bibr">Balunovic et al. (2019)</ref> and 200 in <ref type="bibr">Mohapatra et al. (2020)</ref>); (2) we are the first to scale deterministic geometric verification beyond CIFAR10; and (3) we are the first to verify a neural network for autonomous driving under realistic geometric perturbations. Our code is publicly available at <ref type="url">https://github.com/uiuc-arc/CGT</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">RELATED WORK</head><p>Geometric Robustness Certification. Certification of geometric perturbations (such as image rotations or scaling) going beyond &#8467; p -norm attacks have recently begun to be studied in the literature. There are two main approaches to formally verifying the geometric robustness of neural networks: deterministic and probabilistic. Most recent works on geometric robustness verification use randomized smoothing-based techniques to obtain probabilistic guarantees of robustness <ref type="bibr">(Fischer et al., 2020;</ref><ref type="bibr">Hao et al., 2022;</ref><ref type="bibr">Li et al., 2021)</ref>. While these approaches can scale to larger datasets, their analyses are inherently unsound, i.e., they may falsely label an adversarial region as robust. For safety-critical domains, this uncertainty may be undesirable. Furthermore, such guarantees are obtained over a smoothed version of a base network, which at inference time requires sampling (i.e., repeatedly evaluating) the network up to 10,000 times per image, thereby introducing significant runtime or memory overhead <ref type="bibr">(Fischer et al., 2020)</ref>. Our work focuses on deterministic verification, whose analysis is always guaranteed to be correct and whose certified network incurs no overhead during inference. In particular, this type of certificate always holds against any adaptive attacker. However, the existing deterministic geometric robustness verifiers <ref type="bibr">(Balunovic et al., 2019;</ref><ref type="bibr">Mohapatra et al., 2020)</ref> are exceedingly slow and thus unsuitable for training, due to the high cost of abstracting the geometric input region (even before propagating it through the network). <ref type="bibr">Singh et al. (2019)</ref> study deterministic robustness against rotations, but their results are subsumed by <ref type="bibr">Balunovic et al. (2019)</ref>. While some works have focused on scaling verifiers <ref type="bibr">(M&#200; uller et al., 2021;</ref><ref type="bibr">Xu et al., 2020)</ref>, they have not targeted geometric robustness as we do.</p><p>Provable Defenses Against Norm-based Perturbations. Prior works <ref type="bibr">(Gowal et al., 2019;</ref><ref type="bibr">Mirman et al., 2018;</ref><ref type="bibr">Xu et al., 2020;</ref><ref type="bibr">Zhang et al., 2020)</ref> incorporate verification explicitly into the training loop so that the trained networks become easier to verify. Typically, this task is accomplished by formulating a loss function that strikes a balance between the desired formal guarantees (i.e., high certified robustness) and clean accuracy (i.e., the network's accuracy on the original dataset). To ensure quick loss computation over a large set of training images, interval bound propagation (IBP) <ref type="bibr">(Gowal et al., 2019;</ref><ref type="bibr">Mirman et al., 2018)</ref> is the most popular technique. However, previous IBP works mainly consider norm-based perturbations, which do not capture the highly nonuniform adversarial input regions that characterize geometric transformations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">BACKGROUND</head><p>We denote a neural network as a function f : R C&#215;H&#215;W &#8594; R no from an H &#215; W image with C channels to n o real values. We focus on feedforward networks, but our approach is general and equally applicable to other architectures. Let x &#8712; R C&#215;H&#215;W denote an input image and y denote its corresponding label. For the remainder of the paper, we write interval variables with a tilde: e.g., x = [x, x] = {x : x &#8804; x &#8804; x} is an interval with x and x as lower and upper bounds, respectively. First, we detail the geometric transformations that our work considers.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">GEOMETRIC TRANSFORMATIONS</head><p>A geometric image perturbation is a function P : R C&#215;H&#215;W &#215; R |&#952;| &#8594; R C&#215;H&#215;W , which takes an input image x and parameters &#952; (e.g., angle of rotation, amount of brightness), then produces the geometrically perturbed image x &#8242; . We consider interpolated transformations &#177; rotation, translation, scaling, and shearing &#177; and pixelwise transformations &#177; contrast and brightness. For ease of expression, since these transformations (Eqs. 2 and 3 below) apply independently to each image channel, we write x i,j to denote x's pixel in the i th row and j th column of an arbitrary channel.</p><p>Interpolated Transformations. Interpolated transformations involve an affine transformation on each pixel's row and column indices, followed by an interpolation operation. As these operations are performed in the 2D plane, we first interpret the row and column indices (i, j) as points (u, v) &#8712; R 2 , where the u-axis is the horizontal axis and the v-axis is the vertical axis. Here, we define functions &#981; u (j) = j -(W -1)/2 and &#981; v (i) = (H -1)/2 -i, which convert zero-indexed i, j indices to u, v coordinates with respect to the center of an H &#215; W image. Let T &#952; : R 2 &#8594; R 2 be an invertible affine transformation (e.g., rotation, translation) parameterized by &#952; (e.g., rotation angle, amount of horizontal shift). The equations for each affine transformation are given in Eqs. 10-13 in Appendix A. To compose multiple perturbations, we compose their respective affine transformations; for example, scaling by &#955;, rotating by &#966;, then shearing by &#947; results in the transformation <ref type="bibr">v)</ref> where &#952; = (&#955;, &#966;, &#947;). Having converted row-column indices to R 2 , we compute for each location (&#981; u (j), &#981; v (i)) the (real-valued) coordinate that maps to this location under T &#952; ; we can obtain this coordinate as</p><p>, where T -1 &#952; is the inverse transformation. Since these transformed coordinates may not align exactly with integer-valued pixel indices, we must interpolate. We consider the bilinear interpolation kernel of <ref type="bibr">Jaderberg et al. (2015)</ref>, given as:</p><p>The value of each pixel in the interpolated image x &#8242; is then:</p><p>Pixelwise Transformations. The cumulative effects of contrast and brightness acting on the pixel x i,j are given by the respective contrast and brightness perturbation parameters &#945;, &#946; &#8712; R, as described in <ref type="bibr">Balunovic et al. (2019)</ref>; <ref type="bibr">Mohapatra et al. (2020)</ref>:</p><p>For each pixel in the input and each neuron in the DNN, verification with interval bound propagation (IBP) <ref type="bibr">(Gowal et al., 2019)</ref> associates an interval bounding its minimum and maximum values.</p><p>A sound verifier propagates intervals through the network from the input to the output layer by evaluating the network's layers using interval arithmetic; we detail these operations in Appendix B.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">CERTIFYING GEOMETRIC ROBUSTNESS USING IBP</head><p>We now show how to certify the geometric robustness of classification and regression networks.</p><p>Certified Classification Robustness Against Geometric Transformations. Given an interval x enclosing the set of possible perturbations on the input and a classifier f , we denote the worst-case output vector as f (x), where (interpreting all operations via interval arithmetic) the correct class's entry is the lower bound and all other entries are the upper bounds of the network's output:</p><p>We say that f is certifiably robust for x if, even in the worst case, we can still guarantee that the network classification is correct: y = arg max i fi (x). To certify geometric robustness on an image x requires computing its bounds as x = P (x, &#952;), where &#952; = [&#952;, &#952;] is an interval vector bounding the range of geometric perturbation parameters, and the geometric perturbation P is interpreted over interval arithmetic. However, for a given range of perturbation parameters &#952; for which we wish to verify robustness, the interval width &#952; -&#952; may be too large for the direct evaluation of f (P (x, &#952;)) to yield bounds that are precise enough for successful certification. Hence, like other geometric robustness verifiers <ref type="bibr">(Balunovic et al., 2019;</ref><ref type="bibr">Mohapatra et al., 2020)</ref>, we employ parameter splitting.</p><p>We subdivide the entire range of parameters &#952; into K smaller disjoint intervals { &#952;1 , &#952;2 , . . . , &#952;K } where &#952; = K k=1 &#952;k , and certify each split &#952;k independently. If verifying all splits succeeds, then certification holds on the entire parameter range &#952;. As interval bounds are constants and do not symbolically depend on the input parameters (unlike DeepG <ref type="bibr">(Balunovic et al., 2019)</ref>), propagating these bounds is highly efficient and can be done on a large number of parameter splits for improved precision. Accounting for splitting, we say that f is certifiably robust for P (x, &#952;) if:</p><p>Certified Regression Bound Against Geometric Transformations. Distinct from classifiers, as regression tasks do not have a strict notion of correctness, our goal is to verify whether a network's outputs are within a range close to the ground truth. Hence, our certification problem is to directly bound the network outputs. For a regression network f (interpreted over interval arithmetic), the certified output range over the input P (x, &#952;) is the smallest interval containing the union of all splits' output bounds:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">CERTIFIED GEOMETRIC TRAINING</head><p>We now describe the formulation of our provable defense and fast geometric verifier (FGV) that comprise our training framework for certified geometric robustness.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">ROBUST LOSS FOR CLASSIFICATION AND REGRESSION NETWORKS</head><p>Training Classification DNNs. The key to incorporating geometric robustness guarantees into training lies in formulating certification as part of the loss function. Since f represents the worstcase classification output under a range of perturbed inputs, we can use it in the training loss to guide the parameter updates toward obtaining provably robust DNNs. To account for parameter splitting during certification (which is unique to our geometric setting), we formulate our training loss to enforce local robustness at the level of individual input splits. To certify the network across the entire desired range &#952; = [&#952;, &#952;], we enforce this local property across all splits. Furthermore, similar to other works on certified training, we also need to enforce high clean accuracy. This yields the following formulation for the ideal robust classification loss:</p><p>where &#8467; can be any classification loss function (we use the cross-entropy loss) and &#954; &#8712; [0, 1] governs the relative weighting between the clean accuracy and geometric robustness terms (with higher &#954; prioritizing clean accuracy).</p><p>In practice, the loss in Eq. 7 is too computationally expensive, since the runtime scales linearly with the number of splits, which often needs to be large to ensure precise certification. As a remedy, we instead enforce the robustness property stochastically using data augmentation in conjunction with a randomized sampling of interval splits. We uniformly sample a scalar perturbation amount &#952; &#8764; U(&#952;, &#952;) and compute a local interval split &#952;l = [&#952; -&#957;, &#952; + &#957;], where &#957; is a hyperparameter vector governing the interval size of each perturbation parameter. We then compute the tractable robust classification loss as:</p><p>Since we sample a different &#952; for each mini-batch of training samples, this approach will, on average, effectively enforce local robustness over the entire parameter range (hence leading to global robustness). As in prior works <ref type="bibr">(Gowal et al., 2019;</ref><ref type="bibr">Xu et al., 2020;</ref><ref type="bibr">Zhang et al., 2020)</ref>, we can vary &#954; with the training iteration, temporally changing the weighting between clean accuracy and robustness. The hyperparameter vector &#957; is akin to &#1013; in the &#8467; &#8734; -norm case, but it governs the size of a geometric ball P (x, &#952;l ) rather than an &#1013;-ball; note that &#957; is a vector, since the interval size corresponding to each geometric transformation may be different. We show that this hyperparameter is easy to determine. Finally, while this loss function incorporates only IBP to propagate the geometric region through the network, it can be easily adapted to other provable training methods like CROWN-IBP <ref type="bibr">(Zhang et al., 2020)</ref> by substituting the &#1013;-balls in their loss functions with our formulation of local geometric balls.</p><p>Training Regression DNNs. Since our goal is to minimize both the width of the certified output bound as well as its distance to the ground truth, the ideal scenario would be when the certified lower and upper bounds coincide at the ground truth. Hence, we can essentially treat the certified bounds as worst-case network outputs and minimize both the lower and upper bounds' distances to the label. With similar insights gleaned from the classification loss function, we thus formulate the robust regression loss as:</p><p>where &#8467; can be any regression loss function (we use the mean squared error).</p><p>While we experimentally focus on the more common interpolated transformations, our loss formulations can also be used for other parameterized semantic perturbations on which interval overapproximations for each pixel can be computed, such as Gaussian blur or color space perturbations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">FAST GEOMETRIC VERIFIER</head><p>A key technical challenge arises during the computation of the loss functions in Eqs. 8 and 9: we need to perform geometric robustness certification on images at every iteration of training. Certification against geometric transformations requires two key steps: (1) obtaining bounds on the set of perturbed images obtainable after applying geometric perturbation P and (2) propagating these bounds through a neural network. The key bottleneck of existing geometric verifiers, which renders them unusable for training, lies in the first step (which we show in Section 5.3). This bottleneck stems from the fact that when computing the interpolation, the sequence of arithmetic computations performed at each pixel can be drastically different depending on the pixel location, which has precluded existing approaches from leveraging parallelism. Thus, a core part of our contribution is designing a novel and efficient GPU-parallelizable method for computing interpolated transformations over interval bounds: serving the dual purpose of speeding up verification and being able to utilize these bounds during training. Algorithm 1 presents the pseudocode. Additionally, we also show a running example in Appendix C.1. By default, areas of an interpolated image with no corresponding source pixel will be padded with zero, as in <ref type="bibr">Balunovic et al. (2019)</ref>. However, our algorithm is agnostic to the particular padding mode: we discuss how to handle other padding strategies (e.g., replicating the border pixel values) in Appendix C.2.</p><p>We mathematically decompose the interpolated transformations (Eqs. 1 and 2) into three parts which are all GPU-parallelizable: computing the coordinates of each pixel location under inverse transformation</p><p>, and finally obtaining the resulting interpolated images. Our key insight is that the first two steps are solely dependent on the transformation T &#952; and the height and width of the images, but not the image pixel values themselves. Hence, these computations need only be done once for a given transformation range, amortizing the cost for any number of images in a batch. We now detail each part.</p><p>Inverse Coordinates 1 . We first determine the inverse coordinates (&#361; &#8242; , &#7805;&#8242; ) = T -1 &#952; (&#981; u (j), &#981; v (i)) for each (i, j) pixel index, where 0 &#8804; i &lt; H and 0 &#8804; j &lt; W for images with height H and Algorithm 1 Fast interval interpolated transformation.</p><p>T&#952;, an interpolated transformation with interval parameters &#952;</p><p>g &#8592; flatten( G) 10:</p><p>q &#8592; get nonzero indices(g) 11:</p><p>w &#8592; g[q] 12:</p><p>(r, c) &#8592; (&#8970;(q mod HW )/W &#8971;, (q mod HW ) mod W ) 13:</p><p>return Gs &#8592; (r, c, w, z) 14: end procedure 15: 16: procedure INTERPOLATE(X, Gs) 17:</p><p>(r, c, w, z) &#8592; Gs 18:</p><p>width W . The inverse transformations (shown in Appendix A Eqs. 10-13) are pixelwise, hence this step can immediately be parallelized by defining the matrices U, V &#8712; R H&#215;W where U (i, j) = &#981; u (j) and V (i, j) = &#981; v (i), then applying T -1 &#952; over this whole grid of coordinates. Since T -1 &#952; is parameterized by an interval range of parameters &#952;, this inverse transformation and all subsequent arithmetic operations are interpreted via interval arithmetic.</p><p>Interpolation Grid 2 and Exploiting Sparsity 3 . For each (&#361; &#8242; , &#7805;&#8242; ), we next calculate the terms max(0, 1 -|&#7805;</p><p>Eq. 1; we call these terms interpolation distances and denote them d&#361; &#8242; ,&#7805; &#8242; n,m . Here lies a key difference between our interpolation formulation and that of sequential implementations. In the sequential case, one need only compute d&#361; &#8242; ,&#7805; &#8242; n,m for n where &#7805;&#8242; &#8804; &#981; v (n) &#8804; &#7805;&#8242; and m where &#361;&#8242; &#8804; &#981; u (m) &#8804; &#361;&#8242; ; this is because all other values of n, m will evaluate to a distance of 0. Yet since these ranges of n, m can be vastly different for each (&#361; &#8242; , &#7805;&#8242; ), the only way to parallelize the simultaneous computation of these distances for all inverse coordinates is to, for each (&#361; &#8242; , &#7805;&#8242; ), compute d&#361; &#8242; ,&#7805; &#8242; n,m for all 0 &#8804; n &lt; H, 0 &#8804; m &lt; W . We term these computed distances the interpolation grid G. However, since most of the entries in G will be 0 (i.e., the degenerate interval [0, 0]) &#177; typically more than 99% of them &#177; we design a custom sparse tensor representation of G so that when interpolating, only the nonzero entries will be multiplied with image pixel values (i.e., computing x n,m &#8226; d&#361; &#8242; ,&#7805; &#8242; n,m only when the distance is nonzero). First, for each nonzero d&#361; &#8242; ,&#7805; &#8242; n,m , we must know its location (i.e., n, m) so that we can multiply its value with the corresponding image pixels in the same location. To do so, we convert G to COO (coordinate) format, a 3-tuple of vectors: w which stores the nonzero values of G, and r, c which store the nonzero values' row and column indices n, m. However, once we actually interpolate across images and obtain the summands s&#361; &#8242; ,&#7805; &#8242; n,m = x n,m &#8226; d&#361; &#8242; ,&#7805; &#8242; n,m , we need to know which summands contribute to the same pixel (i.e., have the same &#361;&#8242; and &#7805;&#8242; ) and should thus be added together; this is challenging since the grid values have been flattened. To solve this issue, we store an additional vector z that records the number of nonzero interpolation distances for each (&#361; &#8242; , &#7805;&#8242; ).</p><p>Obtaining Interpolated Images 4 . After calling MAKEINTERPGRID (which only needs to be done once for a given set of transformations) and obtaining Gs = (r, c, w, z), we can now efficiently interpolate across any batch of images X. For all batch and channel dimensions, we obtain the pixel values at locations corresponding to the interpolation distances in w (by indexing the last two dimensions of X with r, c) and elementwise multiply with w to obtain S, which contains the values of all summands across all pixels. To recover the final pixel values, we sum the terms belonging to the same pixel (i.e., the s&#361; &#8242; ,&#7805; &#8242; n,m that have the same &#361;&#8242; , &#7805;&#8242; ) together. To do so, we split the last dimension of S into HW chunks {h i } HW i=1 , where each h i has length z i ; then, each chunk's sum is exactly the final pixel value. Since this last dimension has been flattened to take advantage of sparsity, we reshape it back to dimension H &#215; W to obtain the final interpolated images.</p><p>Finally, we use IBP (during both training and certification) to propagate the computed geometric bounds through the neural network.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">EVALUATION</head><p>We evaluate the effectiveness of CGT over multiple datasets, network architectures, and transformations. We implemented CGT atop PyTorch <ref type="bibr">(Paszke et al., 2019)</ref> and use auto_LiRPA <ref type="bibr">(Xu et al., 2020)</ref> to propagate our computed geometric perturbation bounds through neural networks.</p><p>Datasets and Architectures. We evaluate our approach on the MNIST, CIFAR10, Tiny ImageNet, and Udacity self-driving car datasets. The first three are image classification tasks, while the last is a regression task that predicts a steering angle given a driving scene image. On MNIST and CIFAR10, we use the same architectures from DeepG <ref type="bibr">(Balunovic et al., 2019)</ref> as to compare directly with their results. On Tiny ImageNet, we use the 7-layer convolutional network (CNN7) and WideResNet architectures from <ref type="bibr">Xu et al. (2020)</ref>. On Udacity, we use the classic Nvidia architecture from <ref type="bibr">Bojarski et al. (2016)</ref>. Details are in Appendix D.1.</p><p>Metrics. Our primary metrics for a classifier are (1) its clean accuracy, (2) its certified robustness under geometric transformations, and (3) the certification time on the test set. For a regression network, we utilize the analogous metrics of (1) mean absolute error (MAE), (2) certified MAE, i.e., the larger of the certified lower and upper bounds' MAEs, as well as (3) certification time. We also measure per-epoch runtime and GPU memory usage during training (shown in Appendix E.4).</p><p>Baselines. To the best of our knowledge, training a DNN via PGD <ref type="bibr">(Madry et al., 2018)</ref> combined with data augmentation (denoted PGD/A) and certifying it with DeepG produces the current stateof-the-art deterministic geometric robustness and accuracy. However, the DeepG verifier does not scale beyond CIFAR10; hence, we compare our approach to theirs on just the MNIST and CI-FAR10 datasets, using the sets of transformations from their work. Notably, DeepG only certifies 100 images (due to long runtimes), while we certify full test sets of 10,000 images. The work of Semantify-NN <ref type="bibr">(Mohapatra et al., 2020)</ref> is strictly less precise than DeepG and also only handles a single interpolated transformation (rotation); thus, we only compare certification with DeepG. However, they propose an algorithm to compute the interval over-approximation of images under rotation, and we provide an ablation study comparing the speed of Algorithm 1 to theirs.</p><p>Hyperparameters. We show the training and certification hyperparameters in Appendices D.2 and D.3 and explain how to tune these hyperparameters in Appendix D.4.</p><p>Hardware. We trained and certified all networks (except WideResNet) on a machine with a 2.40GHz 24-core Intel Xeon Silver 4214R CPU with 192GB of main memory and one Nvidia A100 GPU with 40GB of memory. All baseline results were also run on the same hardware for fair comparisons. For WideResNet, we used the same CPU with four A100 GPUs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1">MNIST AND CIFAR10</head><p>Table <ref type="table">1</ref> presents the comparison of our approach with DeepG; asterisks denote DeepG certification results over a subset of 100 images (since their approach takes too long to run on the full test set). Over a variety of challenging transformations on MNIST and CIFAR10, our approach consistently achieves state-of-the-art performance. On all MNIST experiments, our certified robustness is substantially higher than DeepG, while attaining comparable clean accuracy. Furthermore, our verifier Table 1: Comparison of network certification time and accuracy with the prior state-of-the-art on MNIST and CIFAR10. We denote R(&#966;) a rotation of &#177;&#966; degrees; T u (&#8710;u) and T v (&#8710;v) a translation of &#177;&#8710;u pixels horizontally and &#177;&#8710;v pixels vertically, respectively; Sc(&#955;) a scaling of &#177;&#955;%; Sh(&#947;) a shearing of &#177;&#947;%; C(&#945;) a contrast change of &#177;&#945;%; and B(&#946;) a brightness change of &#177;&#946;. Asterisk denotes that certification was measured on a subset of 100 test images. is several orders of magnitude faster. On CIFAR10, we achieve significantly better tradeoff between certified robustness and accuracy than the baseline for the first two cases, while obtaining similar results on the third transformation set; our certification time is considerably lower than DeepG. For the first and third CIFAR10 experiments, we attain 65% and 49% on the subset of 100 images used by DeepG (which are equal or better than their results), while the certifiability evaluated over the whole test set (presented in the table) is slightly lower. These results show that rather than using more precise abstractions on the input set to certify networks not trained to be provably robust, it is more effective to explicitly train networks to be certifiably robust and verify them with a less precise but faster verifier (with a large number of parameter splits). Using our custom loss formulation in Eq. 8 yields the best results on our verifier; Table <ref type="table">6</ref> in Appendix E.1 shows that other existing &#8467; &#8734; -based training methods (which cannot incorporate geometric bounds) do not perform as well. Our work can scale to larger datasets like Tiny ImageNet and a real-world autonomous driving dataset where previous approaches do not.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2">SCALABILITY TO LARGER DATASETS AND MODELS</head><p>Table <ref type="table">2</ref> presents our results on Tiny-ImageNet networks trained for the shear, scale, and rotation transformations. For both networks, we observe that our approach preserves a relatively high clean accuracy while obtaining substantial robustness guarantees. For context, in <ref type="bibr">Xu et al. (2020)</ref> for &#8467; &#8734; -robustness with &#1013; = 1/255, they attain 21.6% accuracy and 12.7% certified robustness on CNN7 and 27.8% accuracy and 15.9% certified robustness on WideResNet. Certification time is still fast, even though the images are much higher-definition than MNIST and CIFAR10, showcasing FGV's scalability. We also see that our approach scales well to large state-of-the-art models like WideResNet.  While there is an inherent tradeoff between certified robustness and network performance on the previous datasets, we find that, surprisingly, here we can scale our approach to obtain both high certifiability and improve network performance at the same time. To demonstrate this phenomenon, we train a network with (1) just the regular mean-squared error loss and input data augmentation of &#177;2 &#8226; rotation (Regular), (2) the first method with the addition of dropout on linear layers (Dropout), and (3) our CGT formulation in Eq. 9.</p><p>Table <ref type="table">3</ref> presents our results for the standard and certified errors of these training methods (lower is better). An interesting observation is that this task is prone to overfitting: we can observe that adding dropout significantly improves the standard error of the network. In this case, training with CGT's interval bounds actually acts as an effective regularizer that serves the dual purpose of combatting overfitting and enforcing certifiability. Training without CGT leads to trivial certification bounds (i.e., the certified steering angle can be anywhere in &#177;90 &#8226; ); conversely, training with CGT yields very tight certified bounds. Fig. <ref type="figure">1</ref> shows visualizations of the CGT-trained network's predictions and certified bounds.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.3">ABLATION STUDIES</head><p>Algorithm for Interval Interpolated Transformation. In Appendix E.3, we compare Algorithm 1 to Semantify-NN's algorithm for computing interval rotation bounds. We show that our algorithm is orders of magnitude faster, hence enabling our scalable training and verification approaches.</p><p>Effect of Parameter Split Size. We train a CIFAR10 and Tiny ImageNet network with various sizes of the hyperparameter &#957; and discuss how it affects certified and clean accuracy in Appendix E.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">CONCLUSION</head><p>We proposed Certified Geometric Training (CGT), a provable defense that leverages a novel fast geometric verifier to improve the deterministic certified robustness of neural networks with respect to geometric transformations. Our experiments across multiple datasets and perturbation sets showed that CGT consistently attains state-of-the-art certified deterministic geometric robustness and clean accuracy, while being highly scalable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D ADDITIONAL EXPERIMENTAL DETAILS D.1 NETWORK ARCHITECTURES</head><p>We detail the network architecture(s) used for each dataset below. We express a convolutional layer as a 4-tuple of (number of filters, kernel size, stride, padding).</p><p>&#8226; MNIST: 2 conv layers {(32, 4, 2, 1), (64, 4, 2, 1)} followed by 2 linear layers with {200, 10} neurons. All layers are followed by a ReLU activation, except for the final output layer. &#8226; CIFAR10: 3 conv layers {(32, 3, 1, 1), (32, 4, 2, 1), (64, 4, 2, 1)} followed by 2 linear layers with {150, 10} neurons. All layers are followed by a ReLU activation, except for the final output layer. &#8226; Tiny ImageNet: &#177; CNN7: 5 conv layers {(64, 3, 1, 1), (64, 3, 1, 1), (128, 3, 2, 1), (128, 3, 1, 1), (128, 3, 2, 1)} followed by 2 linear layers with {512, 200} neurons. Each conv layer is followed by a batch norm layer then a ReLU activation. The first linear layer is followed by a ReLU activation. &#177; WideResNet: Let Q x (p i , p o , s) denote the output after feeding x through this sequence of layers: batch norm with p i features, ReLU, conv(p o , 3, 1, 1), batch norm with p o features, ReLU, conv(p o , 3, s, 1); let S x (p i , p o , s) denote the output after feeding x into a conv(p o , 1, s, 0). Then, we define a wide basic block as the function</p><p>The architecture of the network is then: a conv layer (16, 3, 1, 1), W x (16, 160, 1), W x (160, 320, 2), W x (320, 640, 2), batch norm, ReLU, average pooling with a 7 &#215; 7 kernel, then finally a linear layer with 200 neurons. &#8226; Driving: 5 conv layers {(24, 5, 2, 0), (36, 5, 2, 0), (48, 5, 2, 0), (64, 3, 1, 0), (64, 3, 1, 0)} followed by 4 linear layers with {100, 50, 10, 1} neurons. All layers are followed by a ReLU activation, except for the final output layer. For the Dropout network, we add a dropout layer with p = 0.5 after the first 3 linear layers.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.2 ADDITIONAL TRAINING DETAILS</head><p>Training Schedule. We train the MNIST networks for 100 epochs with batch size 256, CIFAR10 networks for 120 epochs with batch size 128, Tiny ImageNet networks for 160 epochs with batch size 128 (CNN7) or 400 (WideResNet), and the self-driving network for 50 epochs with batch size 128. For the classifiers, we first train with only the cross-entropy loss during a warm-up period; we warm up for 15 epochs on MNIST and 30 epochs on CIFAR10 and Tiny ImageNet. For the selfdriving network, we directly use Eq. 9 from the start. In order to ensure convergence for the loss, we linearly decay &#954; from 1 to &#954; f = 0.5 and employ a linear ramp-up schedule to slowly increase the value of &#957; from 0 up to a final parameter size of &#957; f ; we ramp up across 50, 60, 80, and 50 epochs for MNIST, CIFAR10, Tiny ImageNet, and self-driving, respectively. We explain how to tune the hyperparameter &#957; f and provide the values of &#957; f for each experiment in Section D.4.</p><p>Data Preprocessing and Augmentation. For all networks, we augment the input images during training according to the set of transformations to which we want to be robust. In addition, for CIFAR10 and Tiny ImageNet, we also perform random horizontal flips and select random crops of 32 &#215; 32 with padding 4 (for CIFAR10) and random crops of 56 &#215; 56 (for Tiny ImageNet). At test time, we use a central crop of 56 &#215; 56 for Tiny ImageNet. For the self-driving dataset, we first crop the top of the 480 &#215; 640 input images to 280 &#215; 640, then resize them with bilinear interpolation to 66 &#215; 200; we also perform random horizontal flips. For all datasets, we normalize input images according to the channel statistics from the train set immediately before the first network layer.</p><p>Optimizer. We use the Adam optimizer (Kingma &amp; Ba, 2015) across all networks. For MNIST and CIFAR10, we use an initial learning rate of 10 -3 , which we decay by 0.1 at the 80th and 100th epoch, respectively. For Tiny ImageNet, we use an initial learning rate of 5 &#215; 10 -4 , which we decay by 0.1 after 120 and 150 epochs. For self-driving, we use an initial learning rate of 10 -3 , which we decay by 0.1 after 20 and 40 epochs. For all networks, we clip gradients at an &#8467; 2 -norm of 8.  8.94 &#215; 10 -3 2.82 &#215; 10 -2 4.52 &#215; 10 -3 1.42 &#215; 10 -2 Sc(1), R(1), C(1), B(0.001) 6.37 &#215; 10 -3 1.26 &#215; 10 -2 6.37 &#215; 10 -3 1.26 &#215; 10 -2 Tiny ImageNet Sh(2) 1.21 &#215; 10 -3 4.90 &#215; 10 -3 2.44 &#215; 10 -4 9.82 &#215; 10 -4 Sc(2)</p><p>2.39 &#215; 10 -3 8.76 &#215; 10 -3 4.81 &#215; 10 -4 1.76 &#215; 10 -3 R(5)</p><p>2.15 &#215; 10 -3 7.88 &#215; 10 -3 8.63 &#215; 10 -4 3.17 &#215; 10 -3</p><p>Driving R(2) 2.82 &#215; 10 -3 1.51 &#215; 10 -2 7.71 &#215; 10 -4 4.00 &#215; 10 -3</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.3 ADDITIONAL CERTIFICATION DETAILS</head><p>Batch Size. We use a batch size of 10,000, 10,000, 2,000, 400, and 3,000 during the certification of MNIST, CIFAR10, Tiny ImageNet CNN7, Tiny ImageNet WideResNet, and self-driving networks, respectively.</p><p>Parameter Splits. To ensure precise certification, we select parameter splits that are 1-5&#215; smaller in width than those used during training. The certification configurations for each experiment can be found in Section D.4.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.4 PARAMETER INTERVAL SIZES</head><p>In Table <ref type="table">4</ref>, we show the interval sizes of the geometric perturbation parameters that we use during training and certification for all experiments. In the Training column, we present the final (i.e., after ramp-up) interval size of each perturbation parameter used during training. Since we enforce a local geometric ball of up to &#177;&#957; f in Eqs. 8 and 9, the interval size of this ball is 2&#957; f (where &#957; f is the final parameter interval size after ramp-up, as discussed in Section D.2). In the Certification column, we present the interval size of each split used during robustness certification. For experiments with multiple perturbations, the ordering of the sizes corresponds with the ordering of the transformations in the Perturbations column.</p><p>We describe below the procedure to obtain the values of &#957; f shown in Table <ref type="table">4:</ref> 1. For a given set of n perturbations P with interval parameter ranges &#952; = [&#952;, &#952;], we first start with an arbitrary &#957; f such that &#957; f i &lt; &#952; i -&#952; i for all 1 &#8804; i &#8804; n.</p><p>2. Then, we uniformly sample 10 random scalar parameter values {&#952; k } 10 k=1 (where each &#952; k &#8764; U (&#952;, &#952;) as in Eqs. 8 and 9) and compute, over all train set images X &#8712; [0, 1] N &#215;C&#215;H&#215;W , the maximum pixel interval width of each image under perturbation of P with parameters</p><p>given X &#8242; i denotes the i th perturbed image in the train set. Essentially, in this step we are converting interval sizes in parameter space to pixel space to gauge the amount of overapproximation in the computed bounds (as it is the pixel's intervals that are ultimately propagated through the network). Now, we calculate the average maximum pixel interval width over all images and parameter samples, obtaining &#181; = mean{mean M k } 10 k=1 . We find that selecting &#957; f such that &#181; is close to typical values of &#1013; used in the &#8467; &#8734; -norm setting (e.g., 0.2 and 0.4 for MNIST, 4/255 and 8/255 for CIFAR10) yields both accurate and certifiable networks. If &#181; &gt; &#1013;, then we reduce &#957; f (hence reducing the amount of over-approximation) and recompute this step until &#181; &#8776; &#1013;. Note that this tuning requires no training, and &#181; can be computed in under a minute for all the datasets that we consider.</p><p>3. Once appropriate values of &#957; f have been determined from step (2), we can proceed to use them in training. We perform a 80-20 train-validation split of the train set, and use CGT to train a network to completion. If the validation accuracy and robustness are sufficiently high, then no further tuning is required. Else, we reduce &#957; f and repeat this step. We only had to do this step a few times, as the calculation of the pixel widths already provided a good heuristic for network performance.</p><p>After determining the appropriate parameter sizes during training time, selecting the certification split sizes is straightforward. We empirically find that selecting parameter sizes that are 2&#215; smaller than those used during training yields a good balance between certification rate and runtime. If faster certification time is desired, one can use the same parameter sizes at both training and certification time (as we do in the CIFAR10 experiment with scaling, rotation, contrast, and brightness). If higher certification rate is desired, one can use parameter sizes that are even smaller, at the cost of higher runtime (e.g., we find 5&#215; to be effective for Tiny ImageNet, while using parameter sizes that are even smaller has diminishing returns and does not appreciably increase certification rate).</p><p>Table <ref type="table">5</ref> shows the maximum pixel interval width during training and certification for each experiment. Additionally, we also show the average pixel interval width (i.e., Eq. 16 with the max operation replaced by mean) to demonstrate that geometric transformations produce highly nonuniform bounds, further motivating why supplying precise geometric bounds during training is crucial to achieving networks that are both accurate and certifiable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E ADDITIONAL RESULTS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.1 TRAINING METHODS</head><p>To demonstrate the benefit of our loss function, we compare CGT with three baseline training methods: (1) data augmentation, denoted Augment.;</p><p>(2) augmentation with PGD <ref type="bibr">(Madry et al., 2018)</ref>, denoted PGD+A; and (3) augmentation with IBP <ref type="bibr">(Gowal et al., 2019)</ref>, denoted IBP+A. We select these baselines because, to the best of our knowledge, they are the only training methods utilized in existing works on deterministic geometric robustness (as no work incorporates precise geometric regions into training as we do). For (1), the loss function is simply the cross-entropy loss, with input images augmented according to the perturbations we are trying to certify. For (2), we use PGD to generate adversarial examples of the augmented images. For (3), we employ the IBP loss, with interval &#1013;-balls placed around the augmented images. Table <ref type="table">6</ref> shows these comparisons on the MNIST translation and CIFAR10 rotation benchmarks. For the PGD and IBP-based baselines, we select &#1013; = 0.1 and &#1013; = 2/255 for MNIST and CIFAR10, respectively, which are commonly used in the literature <ref type="bibr">(Balunovic et al., 2019;</ref><ref type="bibr">Gowal et al., 2019;</ref><ref type="bibr">Zhang et al., 2020)</ref>. For PGD, we use a step size of 0.005 and 40 steps for MNIST and a step size of 0.002 and 7 steps for CIFAR10. When calculating the time and memory statistics for CGT and IBP+A, we only consider the epochs after warm-up (i.e., when we start computing the interval robustness loss term). We can observe that our approach, which can supply precise bounds that correspond to the geometric perturbations we are trying to certify, is able to attain the best certified accuracy while maintaining high clean accuracy and only using slightly more time and memory compared to the other approaches.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.2 EFFECT OF HYPERPARAMETER &#957;</head><p>Table <ref type="table">7</ref>: Variation of clean and certified accuracy as a function of &#957; f . c is the certification interval size, &#957; o is the value of &#957; f used in our main results, and g = &#957; o -c.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Benchmark</head><p>Accuracy Type As the size of the local geometric ball (controlled by &#957;) is a key training hyperparameter of our loss function in Eq. 8, we conduct an ablation study on a CIFAR10 network and Tiny ImageNet CNN7 on how varying &#957; f (i.e., the final parameter interval size after ramp-up, as discussed in Section D.2) affects the certified and clean accuracies of CGT-trained networks. Table <ref type="table">7</ref> presents these results.</p><p>In addition to the original value of &#957; f used in our benchmarks in Sections 5.1 and 5.2 (denoted &#957; o ), we select four additional settings for &#957; f and train with CGT for each of these values. We choose the smallest &#957; f to be equal to the interval size at certification time, c, and the largest &#957; f to be equal to c plus two times the difference between &#957; o and c. We certify all networks with the original size of c.</p><p>We can observe that generally, larger values of &#957; f lead to increased certified accuracy, at the cost of decreased clean accuracy. CGT thus allows one to explicitly tune the tradeoff between these metrics by varying &#957; f . The notable exception to this trend is the CIFAR10 network with the largest &#957; f ; in this case, using a &#957; f that is excessively large actually decreases certified robustness (since the clean accuracy drops considerably). There are diminishing returns to using larger intervals during training: while the certified accuracy increases significantly when using &#957; f = &#957; o compared to &#957; f = c, further increasing the size to &#957; f = &#957; o + g/2 or above only slightly increases certifiability.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.3 SPEED OF INTERVAL INTERPOLATED TRANSFORMATION ALGORITHM</head><p>We demonstrate why FGV is a necessary component of our framework. Table <ref type="table">8</ref> presents the comparison of Algorithm 1 to the state-of-the-art algorithm for computing interval geometric bounds in Semantify-NN <ref type="bibr">(Mohapatra et al., 2020)</ref>, which is sequential and CPU-only. To compute interval rotation bounds for a batch of training images (256 for MNIST and 128 for CIFAR10 and Tiny ImageNet), we are 8,000-20,000&#215; faster. Our end-to-end speedup when combining both the input geometric perturbation bound computation and the propagation of these bounds through the network is 3,000-5,000&#215;. For Tiny ImageNet, we use the CNN7 network in this experiment. These results show that without Algorithm 1, the overhead during training is too high to use our proposed loss functions in Eqs. 8 and 9.</p><p>As an ablation study, we run our algorithm under the same conditions as Semantify-NN's on the CPU and with a batch size of 1. As seen in Table <ref type="table">9</ref>, our runtime is still 100-200&#215; faster than Semantify-NN's. These results show that our speedup is not only due to the ability to leverage GPU hardware, but also due to fundamental algorithmic improvements that allow the computation of interpolated transformations to be efficiently parallelized.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.4 TRAINING STATISTICS</head><p>Table <ref type="table">10</ref> shows the training statistics of runtime per epoch and GPU memory usage for all of our networks. When calculating the time and memory statistics, we only consider the epochs after warm-up (i.e., when we start computing the interval robustness loss term). </p></div></body>
		</text>
</TEI>
