\newcommand{\teddy}[1]{{\color{blue}#1}}
\newcommand{\revision}[1]{#1}
\newcommand{\karim}[1]{{\color{green    }#1}}
\newcommand{\old}[1]{{\color{red} ** {\tiny OLD} : \, \,  #1 **} }
\newcommand{\new}[1]{{\color{green}** {\tiny new}: \, \, #1 **} }

\newcommand{\p}[1]{ \left(#1\right) }
\renewcommand{\b}[1]{ \left [#1\right ] }

\newcommand{\ball}[3]{\mathcal{B}_{#1,#2}(#3)}
\newcommand{\s}[2]{\iota(#1|#2)}
\newcommand{\score}[2]{h(#1|#2)}
\newcommand{\model}[1]{\mathsf{M}_{#1}}
%\newcommand{\inputs}[1]{\mathrm{i}_{#1}}
\newcommand{\inputs}[1]{\vecx_{0,#1}}
\newcommand{\ind}[1]{\mathbbm{1}\left[#1\right]}
%\newcommand{\ind}[1]{\mathbb{1}_{#1}}
\newcommand{\ExpN}[2]{\mathbb{E}_{\pi^N_{#1}}\left[#2\right]}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\newcommand{\pfail^{\text{FORM}}[]{}
\newcommand{\irow}[1]{% inline row vector
  \begin{smallmatrix}(#1)\end{smallmatrix}%
}


\def\Rerror{\mathrm{RE}}
%\newcommand{\defeq}{\vcentcolon=}
\def\etc{etc.\@\xspace}
\def\ie{\textit{i.e.}\@\xspace}
\def\eg{\textit{e.g.}\@\xspace}
\def\R{\mathbb{R}}
\def\E{\mathbb{E}}
\def\x{\mathbf{x}}
\def\g{\mathbf{g}}
\def\N{\mathbf{N}}
\def\G{\mathbf{G}}
\def\U{\mathbf{U}}
\def\xx{\tilde{\mathbf{x}}}
\def\XX{\tilde{\mathbf{X}}}
\def\I{\mathbf{I}}
\def\0{\mathbf{0}}
\def\X{\mathbf{X}}
\def\Y{\mathbf{Y}}
\def\Z{\mathbf{Z}}
\def\xo{\x_o}
\def\mr{m}
\def\pc{p_c}
\def\mc{m_c}
\def\real{\mathbb{R}}
\def\Prob{\mathbb{P}}
\def\Gen{\mathsf{Gen}}
\def\AdaGen{\mathsf{AdaptGen}}
\def\Count{\mathsf{Count}}
\def\Gain{\mathsf{Gain}}
\def\ComputeM{\mathsf{Comp\_m}}
\def\Region{\mathcal{R}}
\def\ker{K}
\def\mapp{\tilde{m}}
\def\ellc{\ell_c}
\def\Pfp{P_{\mathsf{fp}}}
\def\Pfn{P_{\mathsf{fn}}}
\def\Pns{P_{\mathsf{ns}}}
\def\event{\mathcal{E}}
\def\Neigh{\mathcal{V}}
\def\Pest{\hat{p}}
%\def\s{\iota}
\def\defi{\stackrel{\Delta}{=}}
\def\yy{\hat{y}}
\def\dt{\Delta t}

\def\inp{z}
\def\Inp{Z}
\def\sc{r}
\def\Noise{E}

% Attacks
\def\hlrf{\texttt{HLRF}}
\def\bp{\texttt{BP}~\cite{BP}}
\def\cw{\texttt{CW}~\cite{carlini_wagner}}
\def\deepfool{\texttt{DeepFool}~\cite{deep_fool}}
\def\fnm{\texttt{FNM}~\cite{fnm}}
\newcommand{\teddy}[1]{{\color{blue}#1}}
\newcommand{\revision}[1]{#1}
\newcommand{\karim}[1]{{\color{green    }#1}}
\newcommand{\mathias}[1]{{**Mathias**: \color{red}#1} }
\newcommand{\old}[1]{{\color{red} ** {\tiny OLD} : \, \,  #1 **} }
\newcommand{\new}[1]{{\color{green}** {\tiny new}: \, \, #1 **} }
\newcommand{\p}[1]{ \left(#1\right) }
\renewcommand{\b}[1]{ \left [#1\right ] }
\newcommand{\ball}[3]{\mathcal{B}_{#1,#2}(#3)}
\newcommand{\s}[2]{\iota(#1|#2)}
\newcommand{\score}[2]{h(#1|#2)}
\newcommand{\ind}[1]{\mathbb{1}_{#1}}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\newcommand{\ExpN}[2]{\mathbb{E}_{\pi^N_{#1}}\left[#2\right]}
\def\etc{etc.\@\xspace}
\def\eps{\varepsilon}
\def\ie{\textit{i.e.}\@\xspace}
\def\eg{\textit{e.g.}\@\xspace}
\def\R{\mathbb{R}}
\def\E{\mathbb{E}}
\def\x{\mathbf{x}}
\def\g{\mathbf{g}}
\def\N{\mathbf{N}}
\def\G{\mathbf{G}}
\def\U{\mathbf{U}}
\def\xx{\tilde{\mathbf{x}}}
\def\XX{\tilde{\mathbf{X}}}
\def\I{\mathbf{I}}
\def\0{\mathbf{0}}
\def\X{\mathbf{X}}
\def\Y{\mathbf{Y}}
\def\Z{\mathbf{Z}}
\def\V{\mathbb{V}}
\def\xo{\x_o}
\def\mr{m}
\def\pc{p_c}
\def\mc{m_c}
\def\real{\mathbb{R}}
\def\Prob{\mathbb{P}}
\def\Gen{\mathsf{Gen}}
\def\AdaGen{\mathsf{AdaptGen}}
\def\Count{\mathsf{Count}}
\def\Gain{\mathsf{Gain}}
\def\ComputeM{\mathsf{Comp\_m}}
\def\Region{\mathcal{R}}
\def\ker{K}
\def\mapp{\tilde{m}}
\def\ellc{\ell_c}
\def\Pfp{P_{\mathsf{fp}}}
\def\Pfn{P_{\mathsf{fn}}}
\def\Pns{P_{\mathsf{ns}}}
\def\event{\mathcal{E}}
\def\Neigh{\mathcal{V}}
\def\Pest{\hat{p}}
\def\defi{\stackrel{\Delta}{=}}
\def\yy{\hat{y}}
\def\dt{\Delta t}
\def\inp{z}
\def\Inp{Z}
\def\score{h}
\def\Noise{E}
\def\Ker{\mathsf{Ker}}
\def\TV{\mathsf{TV}}
\def\K{\mathbf{K}}
\def\G{\mathcal{G}}
\def\F{\mathcal{F}}
\def\H{\mathcal{H}}
\newcommand{\law}[1]{\mathcal{L}(#1)}
\newcommand{\borel}[1]{\mathcal{B}(\mathbb{R}^{#1})}
\newcommand\indep{\protect\mathpalette{\protect\independenT}{\perp}}
\newcommand{\indp}{\perp\!\!\!\!\perp} 
\def\randomx{\mathbf{X}}
\def\vecx{\mathbf{x}}
\def\vecadv{\vecx^{\text{adv}}}
\def\basex{\vecx_0}
\def\randomu{\mathbf{U}}
\def\vecu{\mathbf{u}}
\def\baseu{\vecu_0}
\def\Uspace{\mathcal{U}}
\def\normalspace{\Uspace}
\def\randomz{\mathbf{Z}}
\def\Xspace{\mathcal{X}}
\def\statspace{\Xspace}
\def\lsf{g}
\def\LSF{G}
\def\F{\text{F}}
\def\S{\text{S}}
\def\safe{\Xspace_\S}
\def\fail{\Xspace_\F}
\def\Safe{\Uspace_\S}
\def\Fail{\Uspace_\F}
\def\ufail{\Fail}
\def\usafe{\Safe}
\def\pfail{P_\F}
\def\pfapprox{\widetilde{P}_\F}
\def\ProbFail{\pfail}
\def\pfest{\hat{P}_\F}
\def\transform{\mathcal{T}}
\def\isotransform{\mathcal{T}}
\def\mpp{\vecu^*}

\def\acrlst{\mathsf{LSF}}
\def\dim{d}
\def\inputspace{\R^{\dim}}
\def\probaspace{\Omega}
\def\eventspace{\mathcal{F}}
\def\sysfail{\mathcal{S}_\F}

\def\lebesgue{\lambda}
\def\vecdel{\boldsymbol{\delta}}
\def\normpdf{\phi_{\dim}}
\def\loss{\mathcal{L}}
\def\lossadv{\mathcal{L}_{\mathsf{adv}}}
\def\vecy{\mathbf{y}}
\def\enc{\mathsf{enc}}
\def\cl{\mathsf{cl}}

\def\hessian{\mathbf{H}}
\def\opt{\mathsf{opt}}
\def\mppopt{\vecu^\opt}
\def\betaopt{\hat{\beta}}
\def\directopt{\direct_{\opt}}
\def\kappaopt{\hat{\kappa}}
\def\mux{\mathbf{\mu}_{\vecx}}
\def\varx{\mathbf{\Sigma_{x}}}
\def\vec0{\mathbf{0}}
\def\direct{\boldsymbol{\alpha}}
\newcommand\scalar[2]{\left\langle #1 , #2 \right\rangle}
\newcommand{\scalarbis}[2]{{#1}^{T}#2}
\newcommand\inner[2]{\langle #1, #2 \rangle}
\newcommand\innerbis[2]{ {#1}^T #2 }
\def\normal{\mathcal{N}}
\def\orthbasis{\mathcal{0}}
\def\Pr{\mathbb{P}}
\def\cdfx{F_X}
\def\ident{\mathbf{I}_{\dim}}
\newcommand{\pdfxvar}[1]{p_{#1}}
\def\pdfx{\pdfxvar{\randomx}}
\def\pdfu{\phi_{\dim}}
\def\distx{\nu_X}
\def\distz{\nu_Z}
\newcommand{\distvar}[1]{\nu_{#1}}
\def\distu{\pi_0}
\def\distxfail{\nu_{\fail}}
\def\distufail{\pi_\F}
\def\pdfxfail{p_\F}
\def\pdfFail{\phi_\F}
\def\distfail{\pi_\F}
\def\randomxfail{\randomx^{(\F)}}
\def\altz{\widetilde{\randomz}}
\def\altu{\widetilde{\randomu}}
\def\distq{Q}
\def\importance{\varphi}
\def\Qprob{\mathbb{Q}}
\def\descdir{\mathbf{d}}
\def\vectheta{\boldsymbol{\theta}}
\def\quadfunc{\mathsf{Q}}
\def\randomz{\mathbf{Z}}
\def\vecz{\mathbf{z}}
\def\dtrain{\mathcal{D}_{\text{train}}}
\def\pdfz{p_{Z}}
\def\integrand{\varphi}
\def\distz{\vu_{Z}}
\newcommand{\randomvar}[1]{\mathbf{#1}}
\def\Q\mathbb{Q}
\def\weight{w}
\def\uweight{\widetilde{w}}
\def\eweight{\hat{w}}
\newcommand{\vecuk}[1]{\vecu_{#1}}
\def\matsigma{\mathbf{\Sigma}}
\def\corrmat{\mathbf{\Sigma}_C}
\def\gradG{\nabla\LSF}
\def\qdis{q_{\text{DIS}}}
\newcommand{\iu}{\mathrm{i}\mkern1mu}
\newcommand{\pdf}{\text{pdf}}
\newcommand{\cdf}{\text{cdf}}
\newcommand{\iid}{i.i.d.}
\newcommand{\wrt}{w.r.t.}
\newcommand{\rv}{r.v.}

%\def\defeq{\stackrel{\Delta}{=}}
\newcommand{\simplex}[1]{\mathcal{S}^{#1-1}}
\def\updatefunc{\mathsf{UpdateFunction}}
\newcommand{\CI}[1]{\text{CI}^{\text{#1}}}
\newcommand{\CIemp}[1]{\hat{\text{CI}}^{\text{#1}}}
\newcommand{\sigmavar}[1]{\sigma^2_{{#1}}}
\def\sigmaq{\sigma^2_q(\integrand)}
\newtheorem{assumption}{Assumption}
\def\relerror{\Delta_N}
\def\agamma{A({\gamma})}
\def\pgamma{P_{\gamma}}
\def\qtarget{q^{\text{target}}}
\def\strength{\sigma_K}
\def\chisquared{D_{\chi^2}}
\def\vecmu{\boldsymbol{\mu}}
\def\diag{\mathsf{diag}}
\def\strength{v}
\def\hatu{\hat{\randomu}}
\def\defeq{\vcentcolon=}


\def\FORM{\text{FORM}}
\def\SORM{\text{SORM}}
\def\IS{\text{IS}}
\def\CMC{\text{CMC}}
\def\LS{\text{LS}}
