Title: CERTIFYING NEURAL NETWORK AUDIO CLASSIFIERS

Abstract: We present the first end-to-end verifier of audio classifiers. Compared to existing methods, our approach enables analysis of both, the entire audio processing stage as well as recurrent neural network architectures (e.g., LSTM). The audio processing is verified using novel convex relaxations tailored to feature extraction operations used in audio (e.g., Fast Fourier Transform) while recurrent architectures are certified via a novel binary relaxation for the recurrent unit update. We show the verifier scales to large networks while computing significantly tighter bounds than existing methods for common audio classification benchmarks: on the challenging Google Speech Commands dataset we certify 95% more inputs than the interval approximation (only prior scalable method), for a perturbation of -90dB.

1. INTRODUCTION:

Recent advances in deep learning have enabled replacement of traditional voice recognition systems with a single neural network trained from data (Graves et al., 2013; Hannun et al., 2014; Amodei et al., 2016) . Wide adoption of these networks in consumer devices poses a threat to their safety when exposed to a malicious adversary. Indeed, it was recently shown that an adversary can inject noise unrecognizable to a human and force the network to misclassify (Szegedy et al., 2013; Goodfellow et al., 2014; Zhang et al., 2017; Carlini & Wagner, 2018; Carlini et al., 2016; Qin et al., 2019; Neekhara et al., 2019; Yang et al., 2019; Esmaeilpour et al., 2019) , exposing a serious security flaw.

Ideally, when deploying an automated speech recognition system we would like to guarantee that the system is robust against noise injected by an adversary. There has been substantial recent work on certifying robustness of computer vision models (Katz et al., 2017; Ehlers, 2017; Bunel et al., 2018; Ruan et al., 2018; Tjeng et al., 2019; Anderson et al., 2018; Wong et al., 2018; Dvijotham et al., 2018; Raghunathan et al., 2018; Dvijotham et al., 2019; Weng et al., 2018; Zhang et al., 2018; Salman et al., 2019; Gehr et al., 2018; Singh et al., 2018; 2019a; Wang et al., 2018; Singh et al., 2019b) . However, the audio domain poses unique challenges not addressed by prior certification work for vision.

Differences between audio and vision models Concretely, while an input to a vision model is a raw image, audio models typically come with a complex preprocessing stage (that involves non-trivial non-linear operations such as logarithm) which extracts relevant features from the signal. Additionally, audio systems typically use recurrent architectures (Chiu et al., 2017) which computer vision verifiers do not handle as they focus on fully-connected, convolutional and residual architectures.

s (i) DCT FB FFT ReLU LSTM x (i) h (i-1) h (i)

s (T ) ReLU DCT This work We address both of these challenges and propose an end-to-end verification method for neural network based audio classifiers and an implementation of this method in a system called DAC (Deep Audio Certifier). Our threat model assumes an attacker can introduce a noise-based perturbation to the raw audio input signal. The goal then is to certify that, for any signal that the attacker can produce, the neural network classifies the signal to the correct label. We perform verification of this property using the framework of abstract interpretation (Gehr et al., 2018) . At a high level, the idea is to maintain an abstraction capturing all possible behaviors of both the audio processing stage and the neural network. The flow of DAC is shown in Fig. 1 where all abstractions are dark blue shapes.

Here, all possible signals an attacker can obtain are captured using an abstraction s (i) (a convex relaxation). This abstraction is then propagated through the audio processing stage (shown in green boxes).

The key components of this step are abstract transformers. For each audio processing operation (e.g. FFT) we create an abstract transformer which receives an abstraction representing an approximation of all possible inputs to the operation and outputs a new abstraction which approximates all possible outputs of the operation. The result of the audio processing stage is the abstraction x (i) .

The shape x (i) is then used as input to the recurrent LSTM unit (light blue) which maintains an abstraction of a hidden state h (i-1) . LSTM consists of multiple operations and we create a custom abstract transformer for each of those. The result of the transformers in LSTM is a new hidden state h (i) . If this was the last frame in the signal (meaning i = T ), then hidden state h (T ) is passed through the fully connected layer of the neural network and, again using the abstract transformer, the final abstract shape a is obtained at the output (at the right of Fig. 1 ). Finally, to certify the property we check if each concrete output in the abstraction a classifies to the correct label (this is typically easy).

If this is true, the output of the network is correct for all inputs that the attacker can create.

Related work on RNN certification:

The work of (Ko et al., 2019) proposes the POPQORN verifier for recurrent neural networks (RNN). We note that POPQORN does not handle the audio preprocessing pipeline. Even though POPQORN cannot directly verify audio classifiers, their approximations for LSTM non-linearities can be integrated in DAC. This results in ≈ 200× slowdown with small decrease in the volume of the approximation. The massive slowdown makes their approximations unsuitable for certifying audio classifiers. In contrast, using our custom abstract transformers for LSTM non-linearities, DAC can precisely certify end-to-end robustness of challenging audio classifiers in few minutes.

Our main contributions are:

1. A novel and efficient method to certify robustness of neural network audio classifiers to noise-based perturbations. The method is based on new abstract transformers which handle non-linear operations used in both audio processing and recurrent architectures. 2. An implementation of both verification and provably robust training in a system called DAC. We evaluated DAC on common audio classification benchmarks, showing it scales to realistic networks and is far more precise (97% to 2%) than the next best scalable method.

2. BACKGROUND:

We first define a threat model that we work with and then present all operations that are part of the verification procedure, including audio processing (MFCC) and LSTM updates. We also discuss the type of verification method we employ.

Threat model We follow the same attacker threat model as Carlini & Wagner (2018) . The assumption is that the attacker can add noise δ to the original signal s so to obtain a perturbed signal s = s + δ.

The measure of signal distortion are decibels (dB) defined as:

dB(s) = max i 20 • log 10 (|s i |); dB s (δ) = dB(δ) -dB(s)

Note that the quieter the noise is, the smaller the decibel of perturbation dB s (δ) (it is usually a negative value as it is quieter than the signal). We assume the attacker can generate noise δ such that dB s (δ) < where is a constant defined by the threat model. Our goal is to verify whether the neural network classifies s correctly for each small perturbation δ (as constrained above).

Mel-Frequency Cepstral Coefficients (MFCC) Though there have been number of works which operate directly on the raw signal (Pascual et al., 2017; Sainath et al., 2015) , Mel-Frequency Cepstrum (MFC) is traditionally preferred for audio preprocessing in speech recognition systems e.g., Deep-Speech (Hannun et al., 2014) . The idea of MFC is to model non-linear human acoustic perception as power spectrum filters based on certain frequencies, called Mel-frequencies. The final result of the transformation is a vector of coefficients whose elements contain log-scaled values of filtered spectra, one for every Mel-frequency. This resulting vector is a feature representation of the original signal and can now be used in a downstream task such as audio classification. Sahidullah & Saha (2012) presented an approach to represent MFCC computation using several matrix operations which we integrate with our verification framework. Given T frames of audio signals of

the length N = 2 k , represented as matrix S = [s (1) • • • s (T )

] tr ∈ R T ×N (tr for transpose), audio preprocessing with MFCC is calculated using the following steps:

1. Pre-emphasizing and Windowing: Y = S(I N -c pe I +1 N ) H Transform the signal with the pre-emphasizing and applying the Hamming window. Here,

I +1 N ∈ R N ×N is the shifted diagonal identity matrix (I +1 i,j = 1 if i + 1 = j, otherwise 0), H ∈ R T ×N

is the Hamming window, and c pe is the pre-emphasizing constant.

2.. Power Spectrum of Fast Fourier Transform (FFT:

): Θ = (Y W ) (Y W )

Perform FFT on the windowed data and square it to get the real-value spectrum. We can denote FFT on discrete domain (DFT) with the multiplication of Y and W ∈ C N ×N/2 . 3. Filter Bank Log Energy: Ψ = log(ΘΛ)

Apply the Mel frequency filter bank to the power spectrum and get the log value of them. Λ ∈ R N/2×p is the filter bank given the number of filters p, and log is applied entry-wise.

4. DCT(Discrete Cosine Transformation): X = ΨD Perform DCT on the previous result. Again, this can be formulated using matrix multiplication. We use the resulting

X = [x (1) • • • x (T )

] tr as the input for the neural network.

Long-Short Term Memory (LSTM) LSTM architectures (Hochreiter & Schmidhuber, 1997 ) are a key part in modern state-of-the-art speech recognition systems (Hannun et al., 2014; Amodei et al., 2016) . In our work, we consider the following definitions of updates in the LSTM unit.

f (t) 0 = [x (t) , h (t-1) ]W f + b f i (t) 0 = [x (t) , h (t-1) ]W i + b i c (t) = σ(f (t) 0 ) c (t-1) + σ(i (t) 0 ) tanh(c (t) 0 ) o (t) 0 = [x (t) , h (t-1) ]W o + b o c(t) 0 = [x (t) , h (t-1) ]W c + b c h (t) = σ(o (t) 0 ) tanh(c (t) )

where [•, •] is the horizontal concatenation two row vectors, W • and b • are kernel and bias of the cell, respectively. At timestep t, vectors f

EQUATION

) 0 represent pre-activations of the forget, input, and output gate, respectively, and the pre-calculation of cell state. Cell state c (t) and hidden state h (t) computed at timestep t are propagated to the LSTM unit at the next timestep, thus allowing it to maintain states. This recurrent architecture allows inputs with arbitrary length, making it especially suited for audio inputs.

Robustness certification:

In this work, our goal will be to certify the robustness of an audio classification pipeline (including the LSTM) to noise perturbations of the input. To build such a verifier, we leverage the general method of abstract interpretation suggested by Cousot & Cousot (1977) , successfully employed by some of the most recent state-of-the-art verifiers of neural networks (Gehr et al., 2018; Singh et al., 2019a) . The basic idea here will be to propagate the possible perturbations (captured by a convex region) through the operations of the entire audio pipeline and to then use the final output region to certify the robustness property. The most challenging step of this approach is defining efficient yet precise approximations of the non-linear operations (called abstract transformers) used in the audio pipeline. In this work, we will introduce a number of such new abstract transformers that handle the non-linear operations used in audio processing. Specifically, our over-approximations will be expressed in the recent DEEPPOLY abstraction (Singh et al., 2019a ) (a restricted form of convex polyhedra) which aims to balance efficiency and precision. That is, the abstract transformer of a non-linear function will take as input a convex polyhedra element expressible in DEEPPOLY and output another polyhedra which over-approximates the behavior of the non-linear operation when invoked with any concrete point inside the original polyhedra.

3. OVERVIEW OF VERIFICATION PROCESS:

We now explain the workings of our verifier on a (toy) example from the point where sound enters the processing stage to where the output of the classifier is certified as robust under any allowed perturbation of the threat model. Our goal is to provide an intuitive understanding, formal details are provided later.

Audio preprocessing Unlike in standard computer vision tasks where the input is fed directly to the neural network, audio models typically first perform MFCC preprocessing to extract useful features from the signal. We represent all preprocessing operations as green boxes in Fig. 2 . The calculation follows steps described formally in Section 2, using the same notation for resulting vectors.

FFT FB DCT 0 ≤ s (t) 1 ≤ 1 -2 ≤ s (t) 2 ≤ -1 y (t) 1 = s (t) 1 -s (t) 2 ≤ 0.03 ψ(t) 2 + 2.50 ψ (t) = log( ψ(t) ) x(t) 1 = ψ (t) 1 -ψ (t) 2 + 4 x(t) 1 = 4ψ (t) 1 -ψ (t) 2 x (t) 1 = x(t) 1 x (t) 2 = x(t) 2 ReLU c (t) 1 ≥ 0.18f (t) 1 + 0.03c (t) 1 -0.33 c (t) 1 ≤ 0.16f (t) 1 + 0.39c (t) 1 + 0.86 h (t) 1 ≥ 0.48c (t) 1 -0.08 h (t) 1 ≤ 0.14c (t) 1 + 0.45 LSTM l 1 = h (t) 1 + 0.24 l 2 = h (t) 2

Fast Fourier transform The first operation is Fast Fourier Transform (FFT) of the pre-emphasized input signal. It is a two-step process shown in dashed boxes in Fig. 2 . We decompose it into affine and square operations which transform signal s (t) into an intermediate representation θ (t) . Using our novel and optimal abstract transformer for the square operation, formally defined in Section 4 and visualized in Fig. 3b , we obtain linear bounds on θ (t) .

Filterbank transform The next operation is Filterbank transform (FB) which consists of affine and logarithm operations, shown in solid boxes in Fig. 2 . Note that if the approximations from the square transformer allows negative values, then the entire analysis will fail as the logarithm operation is undefined for negative inputs. Our transformers are carefully designed to avoid this scenario. To obtain bounds on the output of the logarithm we apply our novel and optimal logarithm transformer, also formally described in Section 4 and visualized in Fig. 3a , and obtain linear upper and lower bounds on the log energy of the filtered power spectrum, ψ (t) . Logarithm operation is followed by Discrete Cosine Transform (DCT) resulting in a vector x(t) which is then used as an input to the fully connected layer of the neural network followed by a ReLU. Our analysis (detailed calculation in Appendix C) produces .17, 12.8 ]. Since all the values are positive, the following ReLU has no effect on its input and thus we set x (t) = x(t) . Using the back-substitution technique we describe later, we derive x

x(t) 1 ∈ [0.87, 5.56], x(t) 2 ∈ [0

(t) 1 ∈ [0.87, 5.56], x (t)

2 ∈ [0.17, 12.83]. In the next paragraph we describe bound propagation through LSTM in more detail.

LSTM bound propagation Here we provide a technical overview of our LSTM transformer, formalized in Section 5 and visualized in Fig. 4 , by calculating the result of the transformation on the first neuron of the LSTM hidden layer. We provide detailed mathematical basis of this process in Appendix D. For our toy example, let the gates be updated as f

(t) 1 = x (t) 1 /4, input gate i (t) 1 = 2h (t-1) 2 , output gate o (t) 1 = h (t-1) 1 and cell state c(t) = h (t-1) 1 -x (t)

2 /4. Also, assume the previous states are bounded by: h

(t-1) 1 , h (t-1) 2 , c (t-1) 1 , c (t-1) 2 ∈ [0.90, 1.00].

We now apply our σ(x) • tanh(y) and σ(x) • y transformers to get bounds of the cell state c

(t) 1 = σ(f (t) 1 ) • c (t-1) 1 + σ(i (t) 1 ) • tanh(c (t) 1 ). 0.18f (t) 1 + 0.45 ≤ σ(f (t) 1 )•c (t-1) 1 ≤ 0.16f (t) 1 + 0.58 0.03c (t) 1 -0.78 ≤ σ(i (t) 1 )• tanh(c (t) 1 ) ≤ 0.39c (t) 1 + 0.28

Summing up the inequalities above results in c 36, 1.46] . For the hidden state h

(t) 1 ∈ [-0.

(t) 1 = σ(o (t) 1 ) • tanh(c (t)

1 ), we again apply our abstract transformer and obtain 0.48c

(t) 1 -0.08 ≤ σ(o (t) 1 ) • tanh(c (t) 1 ) ≤ 0.14c (t) 1 + 0.45 y l = log lx + x-lx ux-lx log ux lx y u = 2x ux+lx -1 + log ux+lx 2 l x u x

(a) Log abstract transformer. i.e., h

EQUATION

1 ∈ [-0.25, 0.65]. An analogous computation is performed for h (t) 2 . For this example, we assume the computation results in h (t) 2 = 0. Robustness certification using DeepPoly The hidden states in the LSTM at the final timestep are passed through a fully connected layer without activation. In our example we assume that logits after the layer are obtained with the following formula:

l 1 = h (t) 1 + 0.24 and l 2 = h (t)

2 . These are shown in the final box of Fig. 2 . To certify that the neural network classifies the input to class 1, we need to prove that l 1 -l 2 > 0. We now apply the back-substitution technique as in Singh et al. (2019a) upto the input to the LSTM:

l 1 -l 2 = h (t) 1 -h (t) 2 + 0.24 ≥ 0.48(0.18f (t) 1 + 0.03c (t) 1 -0.33) -0.08 + 0.24 = 0.09f (t) 1 + 0.01c (t) 1 + 0.01 = 0.09(x (t) 1 /4) + 0.01(h (t-1) 1 -x (t) 2 /4) + 0.01 ≥ 0.006

As this value is greater than 0, robustness is established. The process above, of replacing a variable with its constraints, is called back-substitution. Here, we replaced l 1 with h

(t) 1 + 0.24, then h (t) 1 with 0.18f (t) 1 + 0.03c (t)

1 -0.33 and so on. In Appendix C we show more detailed calculations to obtain tighter bound 0.0375 by also back-substituting in the preprocessing pipeline. For our experiments in Section 6, we tune the number of back-substitution steps to achieve a good tradeoff between speed and precision. Note that robustness cannot be proved if one concretizes the expression above to an interval, instead of performing back-substitution of linear bounds. For instance, if we concretize h

(t) 1 to [-0.25, 0.65], we obtain l 1 -l 2 ≥ h (t) 1 -h (t)

2 + 0.24 ≥ -0.01 which is imprecise and fails to certify robustness. Note that if t is not the last timestep, the hidden state and the cell state are passed to the next analysis timestep instead of computing the final output.

4. AUDIO PROCESSING TRANSFORMERS:

As illustrated earlier, the first part of the verification process involves handling of the audio processing stage (performed using MFCC). Here, most matrix multiplication parts can be captured exactly by our abstraction, but MFCC also includes the square operation in the FFT and the logarithm operation in the computation of energy from filterbanks. Thus, to handle these non-linear operations, we need to create new abstract transformers, which we present next. To ensure a minimal loss of precision, our abstract transformers minimize the area between the lower and upper bounds in the input-output plane. This approach of minimizing the area has been used before for other transformers and has been shown to be practically effective in Singh et al. (2018; 2019a) .

We denote the set of all variables in the analysis as X . For an element x ∈ X , we denote the functions corresponding to its linear lower and upper bound as x l and x u , respectively. These are scalar functions defined on R k where k is the number of other variables used to compute x. For every element, we also maintain interval bounds, x ∈ [l x , u x ]. For ease of explanation, we introduce the log transformer followed by the square transformer.

Log abstract transformer:

The logarithm operation is an assignment y := log(x) where x, y ∈ X . The output of this operation cannot be captured exactly and we need to carefully introduce an approximation. Here, we first compute the minimum l y = log(l x ) and the maximum u y = log(u x ), which we use as interval approximation. We define linear lower and upper bound functions y l , y u : R → R. Using concavity of the logarithm on any subset of the domain, the lower bound function is a line connecting the points (l x , log(l x )) and (u x , log(u x )). The upper bound function is chosen as the tangent line to the function minimizing the area between the lower and the upper bound. As a result, we obtain the following bounds as depicted in Fig. 3a :

y l (x) = log l x + x -l x u x -l x log u x l x y u (x) = 2x u x + l x -1 + log u x + l x 2

Note that if l x ≤ 0, y l (x) = -∞ since the function is not defined on that domain. We make an exception when u x -l x < 10 -4 to use interval bound for y l for avoiding the unstable floating point calculation caused by large denominator of x coefficient.

Square abstract transformer:

The square operation is an assignment y := x 2 where x, y ∈ X . Similar to logarithm, this operation is non-linear and cannot be captured exactly in the abstraction.

We first compute the interval bounds of the output l y and u y , and set the minimum value l y to 0 when 0 ∈ [l x , u x ] and min(l 2 x , u 2 x ) otherwise. The maximum value u y is simply max(l 2 x , u 2 x ). Next, we define linear lower and upper bound functions y l , y u : R → R. Using the convexity of the square function, we set the upper bound function y u to the linear function connecting (l x , l 2

x ) and (u x , u 2

x ). For the lower bound function y l , we have to be delicate: since x 2 : R → R ≥0 , our y l should also be greater or equal than 0 within any domain. With the principle of minimizing the area between the bounds, we obtain the following bounds for cases as shown in Fig. 3b :

y l (x) =          4l x x -4l 2 x 0 ≤ l x < u x /3 4u x x -4u 2 x 0 ≥ 3u x > l x 0 l x ≤ 0 ≤ u x (u x + l x )x -((u x + l x )/2) 2 otherwise y u (x) = (u x + l x )x -u x l x

5. LSTM TRANSFORMERS:

Most prior work on verification of neural networks focuses on feed-forward or convolutional architectures whose operations consist of a sequence of affine transforms and activation functions. However, to perform verification of recurrent architectures, one needs to handle the updates of the recurrent unit. Following the equations updating the LSTM presented in Section 2, we can observe that pre-activations of gates are affine transforms which can be captured exactly in our abstraction. However, the operations updating the cell and hidden states are non-linear and require approximation.

Overall, we have three elementwise products -two are between a sigmoid and a tanh and one between a sigmoid and the identity. A straightforward approach to handling such transforms would be to concretize the polyhedra DeepPoly element to an interval and perform the multiplication using intervals. However, this approach would lose all relations between inputs and incur precision loss in future operations of the analysis. Instead, we design custom binary approximation transformers specifically tailored to handle the elementwise product in the update of the recurrent unit.

Sigmoid Tanh abstract transformer We define elementwise multiplication between sigmoid and tanh as an assignment z := σ(x) tanh(y), where x, y, z ∈ X . As before, our aim is to construct linear bounds z l , z u . Unlike the previously defined DeepPoly transformers which take as input a single abstract element, this transformer is the first which receives two abstract elements as operands.

Hence, the bound functions have the form z l , z u : R 2 → R.

Let z = f (x, y) = σ(x) • tanh(y). Our goal is to bound this function between two planes such that the volume between the planes is as small as possible (following our previous heuristic). We first divide the computation into 3 cases based on the signs of l y and u y . To simplify notation, we introduce the variable assignment in Table 1 so that we can reuse notation across all cases. We first define an anchor point a: a point in the box [l x , u x ] × [l y , u y ] where function f attains the max/min value defined upon the case. Also we need reference point r whereas the plane would meet a u x , u y u x , u y l x , l y l x , l y r l x , u y u x , l y u x , l y l x , u y l y < 0 ≤ u y Φ min min max min a u x , u y u x , u y u x , l y u x , l y r l x , u y l x , l y l x , l y l x , u y u y < 0 Φ max min max min a l x , u y l x , u y u x , l y u x , l y r u x , u y l x , l y l x , l y u y , u y Table 1 : Variable reference for the σ(x) • tanh(y) approximation.

-1 -0. first among the four corners if it is tilted in given direction, other than the anchor. Our transformer computes two candidates planes for the upper bound (z u

x , z u y ) and two for the lower bound (z l x , z l y ) as:

(z u |z l ) x = Φ D i f (a), f (a) -f (r) a x -r x (x -a x ) + f (a) (z u |z l ) y = Φ D j f (a), f (a) -f (r) a y -r y (y -a y ) + f (a)

where D i f = ∂f ∂x , D j f = ∂f ∂y , and Φ, a, r are chosen from Table 1 . Finally, we choose bounds from two candidates which minimize the volume between the planes. Fig. 4 is the visualization of this result. We note that Sigmoid Identity transformer is handled in the same manner (we can directly apply the same transformer by replacing f (x, y) with σ(x) • y). Theorem 1. Our Sigmoid Tanh transformer is optimal (it minimizes the volume between the lower and upper plane) under the assumptions: (1) bounding planes are tangent to the curve at the respective anchor points, (2) bounding planes are parallel to either x or y axis. Planes computed using our transformer result in a volume strictly smaller than those computed using interval analysis.

We show the proof in Appendix B. Our assumptions are based on the following reasoning. The first assumption is need so that our transformer produces bounds strictly better than interval analysis. Unless z u passes through the point (u x , u y ), the concrete upper bound would be larger than σ(u x ) • tanh(u y ), making it worse than an interval bound(analogously for the lower bound). The second assumption enables computation of optimal planes in O(1) while without this assumption one needs to solve a non-convex optimization problem which is not feasible at the scale of networks we consider.

6. EXPERIMENTS:

We now evaluate the effectiveness of DAC on several datasets and neural architectures. All our transformers are implemented in C (for performance) and exposed to the verifier using a Python interface. We will publicly release the datasets, trained networks and source code of DAC. Verification is performed on a Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz using 6 cores for each instance.

Experimental setup We evaluate on audio classification benchmarks: Free Spoken Digit Dataset (FSDD) (Jackson, 2019) and Google Speech Commands (GSC) (Warden, 2018) . FSDD contains 2,000 samples of spoken digits while GSC is a more complex dataset containing 65,000 utterances of 30 short words spoken by thousands of different people. State-of-the-art accuracy on GSC is 96.9% by de Andrade et al. (2018) using attention RNN, while our verified model achieves 89%. Singh et al. (2019b) , we define success rate of verification as the ratio between certified samples and correctly predicted ones. We randomly shuffled the test data and then, for every experiment, inferred labels one by one until the number of correctly classified samples reached 100. We report the number of provably correct samples out of these 100 as our provability. As a baseline, we consider a verification method based on interval analysis, which only derives neuronwise lower and upper bounds using the previous layer's bounds. We used networks with Figure 5 : Robustness evaluation on FSDD and GSC datasets, using DAC and Interval analysis.

Robustness evaluation Following:

h = 40 hidden neurons and p = 10 filters for both FSDD and GSC. Our results are shown in Fig. 5 . They suggest that DAC substantially outperforms interval analysis due to better approximations of key functions in both audio preprocessing and neural network stages. Effect of back-substitution depth In this experiment, we vary the depth of back-substitution used in DAC and study its effect on our performance. We run this experiment on an FSDD network and report the results in Table 2 . We observe that increasing the back-substitution depth increases the provability. This is due to the fact that we benefit from cancellation of common terms in the propagated expressions, as demonstrated in our example in Section 3. However, this comes at a cost of exponential increase in runtime. Thus, we choose to use depth 3 in order to get high verification rate while still having reasonable verification speed.

Provable defense for audio classifiers We also for the first time trained audio classifiers to be provably robust against noise-based perturbations. Our training follows Mirman et al. (2018) ; Gowal et al. (2018) -we perturb the input signal and propagate interval bounds through the audio processing and LSTM stages. To train, we combine standard loss with the worst case loss obtained using interval propagation. The resulting network shown in Fig. 5b achieves 80% of provability for -80 dB even with the imprecise intervals, outperforming the undefended network. Even though this network was specifically trained to be verifiable using intervals, DAC still outperforms intervals and proves significantly more robustness properties. Also note that defended network has lower accuracy of 95%, compared to the 98% accuracy of the baseline.

Experimental comparison with prior work POPQORN (Ko et al., 2019 ) also proposes a method to certify recurrent neural networks by propagating linear bounds. One of the key differences with our work is the approximation of σ(x) • tanh(y) using linear bounds. We found that, in practice, optimization approach used by POPQORN produces approximations of slightly smaller volume than our LSTM transformer (although non-comparable). However, this smaller volume comes at a high cost in runtime. We tried to integrate POPQORN bounds into our verification framework, however we found it not feasible for our audio tasks as it increased our end-to-end runtime 200× on one of the smaller networks. In contrast, DAC takes only 1-2 minutes on average to verify a single example containing multiple frames. Indeed, our observation is consistent with the evaluation of POPQORN in the paper where it takes hours on a GPU for verifying NLP and vision tasks only for a single frame.

7. CONCLUSION:

We presented the first verifier for certifying audio classifiers. The key idea was to create abstract transformers for non-linear operations used in the audio processing stage and the recurrent network. These transformers compute an optimal (area-wise) approximation under assumptions representable in the underlying convex relaxation and enable sound handling of the entire pipeline. Our evaluation shows that DAC is practically effective and achieves high verification rates on different datasets.

A SOUNDNESS PROOF OF SIGMOID TANH ABSTRACT TRANSFORMER Suppose x and y are the abstract variable bounded by [l x , u x ], [l y , u y ] respectively. This suggested transformer finds the bounding planes of the function f (x, y) = σ(x) tanh(y). Let D i f = ∂f ∂x and D j f = ∂f ∂y .

1. l y ≥ 0 Choose the upper bound of the function between z u x and z u y , where

z u x (x, y) = min D i f (u x , u y ), f (u x , u y ) -f (l x , u y ) u x -l x (x -u x ) -f (u x , u y ) z u y (x, y) = min D j f (u x , u y ), f (u x , u y ) -f (u x , l y ) u y -l y (y -u y ) -f (u x , u y )

by the smaller volume under the each plane.

Claim 1: z u x (x, y) ≥ f (x, y) in (x, y) ∈ [l x , u x ] × [l y , u y ]. Let x 1 < x 2 ∈ [l x , u x ] and y 1 < y 2 ∈ [l y , u y ]. Then for any x, y, f (x, y 1 ) < f (x, y 2 ) and f (x 1 , y) < f (x 2 , y). Thus, since z u x is independent to y, it is sufficient to show z u x (x, •) ≥ f (x, u y ).

We can easily know that f (x, u y ) is concave at x ≥ 0 and convex at x ≤ 0 by the second derivation of f .

(a) Consider the case of u x > 0. Let x 0 be the x coordinate of the crossing of f (x, u y ) and

EQUATION

> f (0, u y ), and g (x) > 0, there exists a single x 0 < 0. If l x > x 0 , the slope of z u x (x, •) becomes D i f (u x , u y ), and z u x and g become identical. Hence,

f (x, u y ) ≤ g(x) = z u x (x, •). If l x ≤ x 0 , the slope of z u x (x, •) becomes f (ux,uy)-f (lx,uy) ux-lx

. Then z u

x and g shares a point of u x but z u x has smaller slope, so g(x)

≤ z u x (x, •) in [l x , u x ]. Also from f (l x , u y ) = z u x (l x , •) and f (0, u y ) < z u x (0, •), f (x, u y ) ≤ z u x (x, •).

Thus, the claim holds when u x > 0.

(b) Another case of u x ≤ 0, x coefficient of z u

x will always be

f (ux,uy)-f (lx,uy) ux-lx . Again, by convexity of f (x, u y ), z u x (x, •) ≥ f (x, u y ). Hence z u x (x, •) ≥ f (x, u y ) ≥ f (x, y) holds in (x, y) ∈ [l x , u x ] × [l y , u y ].

Claim proved. With analogous steps, z u y can be shown to cover above the curve. Choosing the plane with smaller volume underneath it allows to minimize the expected difference between the true curve and the upper bound plane under the randomly chosen domain. For the lower bound, choose the upper bound of the function between z l

x and z l y , where

z l x (x, y) = min D i f (l x , l y ), f (l x , l y ) -f (u x , l y ) l x -u x (x -l x ) -f (l x , l y ) z l y (x, y) = min D j f (l x , l y ), f (l x , l y ) -f (l x , u y ) l y -u y (y -l y ) -f (l x , l y )

by the larger volume under the each plane.

Claim 2: z l x (x, y) ≤ f (x, y) in (x, y) ∈ [l x , u x ] × [l y , u y ]. It is sufficient to show z l x (x, •) ≥ f (x, l y ) since f (x, y 1 ) ≤ f (x, y 2 ) for y 1 ≤ y 2 . (a)

Consider the case of l x < 0. Let x 0 be the x coordinate of the crossing of f (x, l y ) and g

(x) = D i f (l x , l y )(x -l x ) -f (l x , l y ).

From the concavity of f (x, l y ) in x > 0, g(0) < f (0, l y ), and g (x) > 0, there exists a single x 0 > 0. If l x < x 0 , the slope of z l x (x, •) becomes D i f (l x , l y ), and z l x and g become identical. Hence,

f (x, l y ) ≤ g(x) = z l x (x, •). If l x ≥ x 0 , the slope of z l x (x, •) becomes f (lx,ly)-f (ux,ly) lx-ux

. Then z l

x and g shares a point of l x but z l x has smaller slope, so g(x)

≥ z l x (x, •) in [l x , u x ]. Also from f (u x , l y ) = z l x (u x , •) and f (0, l y ) > z l x (0, •), f (x, l y ) ≥ z l x (x, •).

Thus, the claim holds when u x < 0.

(b) Another case of l x ≥ 0, x coefficient of z l x will always be

f (lx,ly)-f (ux,ly) lx-ux . Again, by convexity of f (x, l y ), z l x (x, •) ≤ f (x, l y ). Hence z l x (x, •) ≤ f (x, l y ) ≥ f (x, y) holds in (x, y) ∈ [l x , u x ] × [l y , u y ].

Claim proved. With analogous steps, z l y can be shown to lie under the curve. Choosing the plane with larger volume underneath it allows to minimize the expected difference between the true curve and the lower bound plane under the randomly chosen domain.

2. l y ≤ 0 ≤ u y

The proof of upper bounds will follow the same steps with the first case. z u

x in this case is exactly same as before, but since f (x, y) goes below 0 when y < 0, z u y has to anchor at (l x , l y ) instead of (u x , l y ) since f (l x , l y ) ≥ f (u x , l y ) and convexity of f in the region. The proof steps do not differ much from the previous proofs. Again, the proof for lower bound is similar as before, but note that z l

x needs to choose maximum between the two slopes. This is due to the sign of the values. Since f (u x , l y ) < 0 is the minimum in the region and it grows along x gets smaller, both D i f (u x , l y ) and f (ux,ly)-f (lx,ly) ux-lx are less than zero.

3.. 0 ≥ u y:

We will not provide the proof since this case is symmetric to the first case.

B PROOF OF THEOREM 1:

Theorem 1. (copied) Our Sigmoid Tanh transformer is optimal (it minimizes the volume between the lower and upper plane) under the assumptions: (1) bounding planes are tangent to the curve at the respective anchor points, (2) bounding planes are parallel to either x or y axis. Planes computed using our transformer result in a volume strictly smaller than those computed using interval analysis.

Proof. First note that z u x , z u y , z l x , z l y are sound bounds by Appendix A. Assume z u x is chosen as the upper bound. W.l.o.g., suppose there exists another sound candidate upper bound ζ u

x , satisfying (1) and (2), with smaller volume underneath it than z u

x . Then ζ u x would have larger absolute slope on x than z u

x . However, the slope of z u x is chosen as stiff as possible while remaining the soundness (Appendix A to see in detail). Hence, ζ u x would not be sound anymore with larger absolute coefficient. Contradict to the existence of sound ζ u

x . Other cases can be proved with similar logic as well.

C VERIFICATION BY EXAMPLE:

We assume the last sound frame s (t) consists of two elements s

(t)

1 and s

(t)

2 such that:

s (t) 1 ∈ [0, 1] and s (t) 2 ∈ [-2, -1].

These constraints capture a noise perturbation of the sound and are depicted in the white box in the left part of Fig. 2 . We describe analysis only at the last timestep t (the same process is repeated for every timestep).

We note that the DeepPoly abstraction (which we build on in this work) maintains four constraints for every element: a lower and upper constraints which are linear in terms of the previous elements as well as two interval constraints. This abstraction is exact for affine transformations, however, to handle non-linear operations, one has to create new abstract transformers. In our work we introduce such transformers and formally describe their operation in the next sections. In what follows, we show their effect on our running example. For the presentation below, our figure shows the linear constraints obtained by the verifier, but to avoid visual clutter, we do not show the two interval constraints (however, we do list them in the text).

Fast Fourier Transform The first operation in the audio processing stage is the Fast Fourier Transform (FFT) of the pre-emphasized input signal. It is a two-step process shown in dashed boxes in Fig. 2 . The preemphasis is in fact an affine transform so we perform it jointly with the affine transform in the FFT. As the composition of two affine transforms is again affine, this amounts to a single affine transform on the input. In our example, the composed affine transform is y

(t) 1 = s (t) 1 -s (t) 2 and y (t) 2 = 2s (t)

2 . Affine transforms can be captured exactly and here we obtain e.g., s

(t) 1 -s (t) 2 ≤ y (t) 1 ≤ s (t) 1 -s (t)

2 . We also obtain the interval bounds y

(t) 1 ∈ [1, 3] and y (t) 2 ∈ [-4, -2].

The next step in the computation of FFT is elementwise square of y (t) . We denote this operation as θ

(t) 1 = (y (t) 1 ) 2 and θ (t) 2 = (y (t)

2 ) 2 . The square operation is non-linear and cannot be captured exactly which means that we need to decide how to lose precision. Here, we apply our new square abstract transformer (formally defined in Section 4) which provides an optimal linear lower and upper bounds of the square function in terms of area. After applying this transformer, we obtain the bounds:

4y (t) 1 -4 ≤ θ (t) 1 ≤ 4y (t) 1 -3 -6y (t) 2 -9 ≤ θ (t) 2 ≤ -6y (t) 2 -8

The interval bounds are calculated by: [3, 16] . Note those bounds are not exact but sound; even y

θ (t) 1 ≥ 4y (t) 1 -4 = 4(s (t) 1 -s (t) 2 ) -4 ≥ 4(0 -(-1)) -4 = 0 θ (t) 1 ≤ 4y (t) 1 -3 = 4(s (t) 1 -s (t) 2 ) -3 ≤ 4(1 -(-2)) -3 = 9 θ (t) 2 ≥ -6y (t) 2 -9 = -6(2s (t) 2 ) -9 ≥ -6(2 • (-1)) -9 = 3 θ (t) 2 ≤ -6y (t) 2 -8 = -6(2s (t) 2 ) -8 ≤ -6(2 • (-2)) -8 = 16 Hence, θ (t) 1 ∈ [0, 9] and θ (t) 2 ∈

(t) 1 ∈ [1, 3] and y (t) 2 ∈ [-4, -2],

DAC calculates the concrete lower and upper bound with the expression to be consistent with other transformers, so the bounds might not be exact as [1, 9] and [4, 16] . In practice, FFT is followed by another affine transform which adds together the real and complex component of each element, but we omit this for clarity as it is captured as before, without loss of precision.

Filterbanks Transform Our analysis continues with the computation of filter banks of the input, shown in solid boxes in Fig. 2 . The first step is an affine transform and in our example we use: The interval bounds are calculated by:

EQUATION

ψ (t) 1 ≥ 0.0783 ψ(t) 1 + 0.8637 = 0.0783(2θ (t) 1 + θ (t)

2 ) + 0.8637 ≥ 0.0783(2(4y

(t) 1 -4) + (-6y (t) 2 -9)) + 0.8637 = 0.0783(2(4(s (t) 1 -s (t) 2 ) -4) + (-6(2s (t) 2 ) -9) + 0.8637 = 0.6264s (t) 1 -1.566s (t) 2 -0.4674 ≥ 1.0986 ψ (t) 1 ≤ 0.0541 ψ(t) 1 + 1.9178 = 0.0541(2θ (t) 1 + θ (t) 2 ) + 1.9178 ≤ 0.0541(2(4y (t) 1 -3) + (-6y (t) 2 -8)) + 1.9178 = 0.0541(2(4(s (t) 1 -s (t) 2 ) -3) + (-6(2s (t) 2 ) -8)) + 1.9178 = 0.4328s (t) 1 -1.082s (t) 2 + 1.1604 ≤ 3.7572

that the bounds of h (t) and c (t-1) are given constant. In practice, we recursively apply the process for those vectors to express the bounds in terms of x (t) , x (t-1) , • • • .

The next hidden state is computed as h

(t) 1 = σ(o (t) 1 ) • tanh(c (t)

1 ). We apply our abstract transformer for the σ(x) • tanh(y) expression, we obtain: 

EQUATION

Robustness certification using DeepPoly:

The hidden states in the LSTM at the final timestep are passed through a fully connected layer without activation. In our example we assume that logits after the layer are obtained with the following formula:

l 1 = h (t) 1 + 0.24 and l 2 = h (t)

2 . These are shown in the final box of Fig. 2 . To certify that the neural network classifies the input to class 1, we need to prove that l 1 -l 2 > 0. We now apply the same back-substitution technique as Singh et al. (2019a) :

l 1 -l 2 = h (t) 1 -h (t) 2 + 0.24 ≥ 0.4906(0.1891f (t) 1 + 0.0341c (t) 1 -0.3271) -0.0764 + 0.24 = 0.0927f (f ) 1 + 0.0167c (t) 1 + 0.0031 = 0.0927(x (t) 1 /4) + 0.0167(h (t-1) 1 -x (t) 2 /4) + 0.0031 (applying concrete bound to h (t-1) 1 for demonstration) ≥ 0.0231x (t) 1 -0.0042x (t) 2 + 0.0181 = 0.0231(ψ (t) 1 -ψ (t) 2 + 4) -0.0042(4ψ (t) 1 -ψ (t)

2 ) + 0.0181 = 0.0063ψ For the purpose of demonstration, we stop here and plug in previously obtained interval bounds for ψ (t) . As this value is greater than 0, robustness is established.

D MATHEMATICAL DERIVATION OF LSTM TRANSFORMER:

LSTM cell receives not only the resulting neurons from the pre-processing stage but a hidden state and a cell state from the previous timestep. To incorporate with all those incoming values, we extend the scope of the LSTM equations defined in Section 2. Let d be the dimension of the input and h be the dimension of states of the cell. To standardize the operations performed within the LSTM cell, we append 0 d×d = [0] d×d and 0 d = [0] d below to each kernel and bias respectively to express the formula as t) , h (t-1) , c (t-1) ]W f + b f i t) , h (t-1) , c (t-1) ]W i + b i o (t) 0 = [x (t) , h (t-1) , c (t-1) ]W o + b o c(t) 0 = [x (t) , h (t-1) , c (t-1) ]W c + b c

f (t) 0 = [x (

(t) 0 = [x (

(1) Then the cell state and hidden state computations can be rewritten as t) , h (t-1) , c (t-1) ]W f + b f ) ([x (t) , h (t-1) , c (t-1) ][0 h×(d+h) , I h ] T ) + σ ([x (t) , h (t-1) , c (t-1) ]W i + b i ) tanh ([x (t) , h (t-1) , c (t-1) ]W c + b c)

c (t) = σ(f (t) 0 ) c (t-1) + σ(i (t) 0 ) tanh(c (t) 0 ) = σ([x (

(2)

EQUATION

As is described in detail in Section 5, f (x, y) = σ(x) • tanh(y) and g(x, y) = σ(x) • y can be bounded with two planes regarding the operands' lower and upper bounds. In other words, for any given two real values, x, y ∈ R, x ∈ [l x , u x ], y ∈ [l y , u y ], our finding guarantees the planar bounds of f and g with the coefficients built by linear combination of l x , u x , l y , u y . For a single neuron c (t) j in c (t) , the upper bound can be expressed from Eq. (2): t) , h (t-1) , c (t-1) ][W f ] :,j + [b f ] j ) • ([x (t) , h (t-1) , c (t-1) ][0 d+h , [I h ] j,: ] T ) + σ ([x (t) , h (t-1) , c (t-1) ][W i ] :,j + [b i ] j ) • tanh ([x (t) , h (t-1) , c (t-1) ][W c ] :,j + [b c] j )

EQUATION

≤ A u ([x (t) , h (t-1) , c (t-1) ][W f ] :,j + [b f ] j ) + B u ([x (t) , h (t-1) , c (t-1) ][0 d+h , [I h ] j,: ] T ) + C u + D u ([x (t) , h (t-1) , c (t-1) ][W i ] :,j + [b i ] j ) + E u ([x (t) , h (t-1) , c (t-1) ][W c ] :,j + [b c] j ) + F u = x (t) w x + h (t-1) w h + c (t-1) w c + b (4)

where A u , • • • , F u are calculated real values by Section 5, and w • and b are the simplified linear coefficients of each vector and bias term, respectively. We also can get the upper bound of h (t) j by plugging Eq. ( 4) in Eq. ( 3), and similarly for the lower bounds of those states. Note these linear bounds makes possible to recursively apply this step to get desired bounds, and can be branched in any depth for the trade-off between the precision and the complexity.

E COMPARISON BETWEEN DAC AND POPQORN:

In this subsection we provide in-depth comparison between our approach and POPQORN (Ko et al., 2019) which provides another way to bound σ(x) • tanh(y) and σ(x) • y non-linearities. Before the experiments, we discuss comparability between three methods to bound the non-linearities: interval, DAC and POPQORN. Then, we perform three different experiments. First, we compare volume of bounds produced by both POPQORN and DAC on a set of synthetic test cases. As these test cases do not reflect the actual test cases which occur during the verification of audio benchmarks, in the second set of experiments we compare the methods on a set of test cases from one of our benchmarks. Finally, in the third experiment we plug in POPQORN bounds into our framework and show its certification performance on the audio benchmarks.

:



Figures and Tables:

Figure 1: End-to-End Audio Certification Flow using DAC.

Figure 2: Robustness verification illustrated on a toy example. Each box shows the constraints computed by the verifier after processing a given operation (shown on edges). Green color denotes elements of the MFCC audio processing stage: the Fast Fourier Transform (FFT), the Filterbank Transform (FB), and the Discrete Cosine Transform (DCT). Blue color denotes components of the network: ReLU layer, LSTM and Fully Connected layer. Approximations computed with this work are shown in the bottom row. The operations which the abstract transformers handle are shown next to the downward edges. Edges without labels represent affine transforms.

b) Square abstract transformer.

Figure 3: Our DeepPoly approximations of (a) the natural logarithm and (b) the square function. Blue lines represent the valid (in case of square, non-negative) upper and lower bounds which minimize the area between the planes under the given domain [l x , u x ]. The red bound on (b) grants smaller area, but contains the negative value, which occurs the analysis failure in the audio processing pipeline.

Figure 4: Visualization of the bounding planes and σ(x) • tanh(y) curve.

halt the computation and plug in the bounds ≥ 0.0063 • 1.0986 -0.0189 • 4.2236 + 0.1105 ≥ 0.0375

Figure 6: σ(x) • tanh(y) boundings on [-30.7, 107] × [-9.87, -0.02]. Orange plane is obtained from POPQORN and blue plane is from DAC.

Effect of back-substitution depth on the performance.

Table content: <table><tr><td colspan="3">Depth Provability(%) Run Time(s)</td></tr><tr><td>0</td><td>27</td><td>8.33</td></tr><tr><td>1</td><td>35</td><td>18.95</td></tr><tr><td>2</td><td>37</td><td>40.83</td></tr><tr><td>3</td><td>39</td><td>87.92</td></tr><tr><td>4</td><td>40</td><td>166.19</td></tr><tr><td>5</td><td>41</td><td>328.92</td></tr></table>

The final step in this transform is the elementwise logarithm of the input. We denote the operation as ψ

Table content: <table><tr><td/><td/><td colspan="3">t) 2 . Our abstraction is again exact here and additionally computes</td></tr><tr><td>interval bounds</td><td colspan="2">ψ(t) 1 ∈ [3, 34] and</td><td>ψ(t)</td></tr><tr><td/><td/><td/><td/><td>(t) 1 = log(</td><td>ψ(t) 1 ) and ψ 2 = log( (t)</td><td>ψ(t) 2 ). As this is</td></tr><tr><td colspan="5">again a non-linear operation, we apply our new log transformer so to obtain:</td></tr><tr><td/><td>0.0783</td><td colspan="2">ψ(t) 1 + 0.8637 ≤ ψ</td><td>(t) 1 ≤ 0.0541</td><td>ψ(t) 1 + 1.9178</td></tr><tr><td/><td>0.0384</td><td colspan="2">ψ(t) 2 + 1.8511 ≤ ψ</td><td>(t) 2 ≤ 0.0303</td><td>ψ(t) 2 + 2.4965</td></tr></table>

Peer review (iclr2020):
This paper proposes an approach for the certification of speech classification neural networks against adversarial perturbations. The network is based on a simple pipeline starting from MFCC to make an utterance level classifier via a last hidden state of an LSTM acoustic model. This approach can perform analysis through this pipeline. I feel that this paper is very difficult to follow because of the lack of background technique explanations based on neural network certification, and the lack of technical surveys of speech recognition and related areas. This paper requires such major restructuring and more surveys to make it in good shape. Comments - The authors only list CTC related techniques as state-of-the-art ASR, but state-of-the-art ASR is still based on the HMM/DNN hybrid system or attention-based encoder-decoder/RNN transducer. They seriously lack the surveys o this area. Also several technical terminologies are not common in the speech recognition are (e.g., automated speech recognition --> automatic speech recognition) - *Additionally, audio systems typically use recurrent architectures (Chiu et al., 2017)*: There are a lot of state-of-the-art ASR systems including TDNN (Kaldi), CNN, and transformer. Again the paper does not have enough surveys. - The font size of the characters in figure 1 is too small. - I cannot understand why the paper uses MFCC. The community was already moved from MFCC to log mel filterbank. We don*t need final DCT. - Section 2. Threat model: what kind of noises are using? - Page 3, power operation: Either side must be a conjugate to get the power spectrum.