\section{Introduction}
\subsection{The problem of robustness to deformations}
Broadly speaking, the last decade was certainly marked by a striking series of successes in several feature extraction tasks (especially classification of images) enjoyed by learning models based on deep convolutional neural networks (DCNNs) \cite{lecun}. In parallel with such breakthroughs, a novel research line was developed with the aim of stressing the stability of DCNNs classification outputs. It was quite astonishing to learn that even the best performing DCNNs could be effectively mislead by tailor-made \textit{adversarial examples} \cite{goodfe,kurakin,sze}.

Let us briefly illustrate this issue by considering a function $f:\bR^d \to \mathbb{R}$ - for the sake of concreteness, for $d=2$ it may be interpreted as a model of a grayscale image. The most popular ways to build an adversarial example $\tilde{f}$ involve \textit{intensity perturbations} - that is $\tilde{f}(x)=f(x)+h(x)$ for some $h:\bR^d \to \mathbb{R}$ - or \textit{deformations}, namely $\tilde{f}(x)= F_\tau f(x) \coloneqq f(x-\tau(x))$ for some vector field $\tau:\bR^d \to \bR^d$, including natural transformations such as translations or rotations. If $\Phi$ is a classifier such that $f$ is correctly labelled, the adversarial parameters $h$ and $\tau$ are designed in such a way that $\tilde{f}$ and $f$ are sufficiently close with respect to some perceptual similarity metric, but $\Phi(\tilde{f}) \ne \Phi(f)$. To be more precise, the size of the adversarial distortion is usually measured in terms of some $L^p$ norm of $h$ or $\tau$. We emphasize that small-in-norm deformations may result in adversarial examples which are imperceptible to the human eye, even when $\|f-\tilde{f}\|_{L^\infty}$ is large. It is clear that such vulnerability issues raise doubts on networks' generalization abilities, as well as concerns on the applications of deep learning models to sensitive real-life contexts (cf.\ e.g.\ \cite{heaven,ledford} and the references therein).

Several adversarial attack algorithms as well as defense strategies have been designed so far (for instance, see respectively \cite{alaifari,athalye} on one side and \cite{carliniwag,madry} on the other one; see also the recent reviews \cite{akhtar,miller,xu}). At the same time, the limited scope of empirical approaches and the quest for rigorous stability guarantees motivated a deeper mathematical analysis of DCNNs. The present note precisely fits into the latter line of research, which was initiated by Mallat with pioneering contributions on wavelet-based scattering networks  for the purposes of feature extraction \cite{mall cpam}; see also \cite{brunamallat}. Mallat's theory has been subsequently generalized by B\"olcskei and Wiatowski \cite{wiat paper,wiat old} (cf.\ Section \ref{sec notation}). The framework of generalized scattering networks represents a reference for our following analysis, since it does provide a testing ground and a source of inspiration for phenomena that could occur when dealing with less interpretable (e.g., trained) networks.

Regardless of the variety of the  architectures, the DCNNs under our attention can be represented by a map $\Phi$ from $L^2(\bR^d)$ to some Banach space with norm $\adm{\cdot}$. Stability is clearly a desirable property - for classification purposes, think for instance of different writing styles when dealing with handwritten digit recognition. As a general rule, a small distortion of $f$ into $\tilde{f}$ should correspond to small  $\adm{\Phi(\tilde{f})-\Phi(f)}$. In fact, it turns out that for several classes of DCNNs one can prove or at least observe empirically that $\Phi$ enjoys a Lipschitz condition:
\begin{equation}\label{eq intro fe lip} \adm{\Phi(\tilde{f})-\Phi(f)} \le C\| \tilde{f}-f\|_{L^2}, \quad f,\tilde{f} \in L^2(\bR^d).
\end{equation}
The smallest constant $C>0$ for which such an estimate holds will be denoted by ${\rm Lip}(\Phi)$.
The search for approximate values of ${\rm Lip}(\Phi)$ (or at least upper bounds) is a problem of current interest, while a thorough analysis of Lipschitz regularity of neural networks remains an open problem in general. For what concerns the wavelet scattering transform, a major result in this connection was first proved by Mallat in \cite{mall cpam}, alongside with asymptotic translation invariance of the feature extractor $\Phi$; these results were extended to more general scattering networks in \cite{wiat paper} and \cite{balan,zou}. It should be emphasized that the above Lipschitz property is also important with regard to resistance against adversarial deformations; for instance, large Lipschitz bounds have been found to be related to increased vulnerability to adversarial attacks \cite{sze}; see also \cite{balan,zou} for further details on the problem.

In the particular case of a deformation $\tilde{f}=F_\tau f$ of $f$, it would be desirable for $\adm{\Phi(F_\tau f)-\Phi(f)}$ to be small whenever $\tau$ is small with respect to some metric. In this connection, for a scattering network with wavelets filters, modulus nonlinearity and no pooling, it was proved in \cite[Theorem 2.12]{mall cpam} that, for every $\tau\in C^2(\bR^d;\bR^d)$ with $\|\nabla \tau\|_{L^\infty}\leq 1/2$,
\begin{equation}\label{eq mallat0}
\adm{\Phi(F_\tau f)-\Phi(f)}\leq C (2^{-J}\|\tau\|_{L^\infty} +\max\{J,1\}\|\nabla \tau\|_{L^\infty}+\|H \tau\|_{L^\infty})\|f\|_{\mathrm{scatt}}
\end{equation}
where $\|f\|_{\mathrm{scatt}}$ is a mixed $\ell^1(L^2)$ scattering norm (which is finite for functions with a logarithmic Sobolev-type regularity), $H \tau$ denotes the Hessian of $\tau$  and $2^J$ is the coarsest scale in the dyadic subband decomposition.

Some remarks are in order here. First, this estimate implies stability under (small) $C^2$ deformations as well as approximate invariance to global translations, up to the scale $2^J$. Moreover, in general we will have $\adm{\Phi(F_\tau f)-\Phi(f)}\ll \|F_\tau f-f\|_{L^2}$ even for small $\|\tau\|_{L^\infty}$. Secondly, the regularity of the deformation $\tau$ plays a key role. To be clearer, consider the case where $f$ is a band-pass function; roughly speaking, the condition $\|\nabla \tau\|_{L^\infty}\leq 1/2$ guarantees that $F_\tau f$ is still localized in frequency, essentially in the same band, therefore the result is reasonable since the network is adjusted to such dyadic bands by design - although highly not-trivial to prove. As observed in \cite{mall cpam}, the condition $\|\nabla \tau\|_{L^\infty}\leq 1/2$ can be relaxed to $\|\nabla \tau\|_{L^\infty}<1$ but then the constant will blow-up when $\|\nabla \tau\|_{L^\infty}\to 1$. It is thus natural to wonder whether stability results can be derived if $\|\nabla \tau\|_{L^\infty}\geq 1$ (therefore $x\mapsto x-\tau(x)$ is no longer invertible, in general) or even for less regular deformations, e.g.\ discontinuous ones.

\subsection{More general deformations for Lipschitz DCNNs}
 In this note we address the problem of DCNNs robustness in a quite general setting, precisely we consider:
 \begin{itemize}[leftmargin=*]
     \item general distortions encoded by $\tau\in L^\infty(\bR^d;\bR^d)$ \textit{without any additional regularity assumption}, therefore including wild irregular deformations such as a noise on the pixel location of an image;
     \item general DCNNs that are \textit{only assumed to satisfy a Lipschitz property} as in \eqref{eq intro fe lip} - this encompasses the case of possibly trained or unstructured filters.

\end{itemize}

These two conditions are strictly related: it turns out that \textit{for irregular deformations} $\tau(x)$, even for well structured DCNNs $\Phi$ such as the wavelet scattering networks, it may happen that $\adm{\Phi(F_\tau f)-\Phi(f)}\approx \|F_\tau f-f\|_{L^2}$ (see Section \ref{sec sharp pwr}). Hence, the analysis should ultimately rely on estimates of the $L^2$ error $\|F_\tau f-f\|_{L^2}$, which in turn imply corresponding results for any Lipschitz map $\Phi$. This approach was referred to as \textit{decoupling method} in \cite{wiat paper}, where bounds for  $\|F_\tau f-f\|_{L^2}$ were called \textit{sensitivity estimates}.

There are basically two types of peculiar phenomena that could occur when dealing with irregular deformations.
\begin{enumerate}[(a),itemsep=2ex,leftmargin=*,topsep=2ex]
\item Consider a band-pass function $f$ oscillating at frequency $1/s$ ($s>0$ being the scale); even if $\|\tau\|_{L^\infty}$ is small, it may very well happen that the energy of $F_\tau f$ is amplified by a factor $(\|\tau\|_{L^\infty}/s)^{d/2}$; see Figure \ref{figura intro}.
Hence, if $\Phi$ is any energy preserving map ($\|f\|_{L^2}\lesssim \adm{\Phi(f)}\lesssim\|f\|_{L^2}$) then it follows from the triangle inequality that $\adm{\Phi(F_\tau f)-\Phi(f)}/\|f\|_{L^2}\gtrsim (\|\tau\|_{L^\infty}/s)^{d/2}$ when $\|\tau\|_{L^\infty}$ is large \textit{compared to}  $s$.
\item Let $f$ be a band-pass function, as above, oscillating at frequency $1/s$; even if $\|\tau\|_{L^\infty}$ is small, when $\|\tau\|_{L^\infty}$ is comparable to $s$ it may happen that $f$ and $F_\tau f$ are localized in different dyadic frequency bands; see Figure \ref{figura intro due}. In particular, if $\Phi$ is a wavelet scattering network, their energy will propagate along different paths and the error $\adm{\Phi(F_\tau f)-\Phi(f)}^2 \approx \adm{\Phi(F_\tau f)}^2+\adm{\Phi(f)}^2$ will not be small if $\Phi$ is energy preserving. \end{enumerate}

\begin{figure}[h!]
\centering
\captionsetup{width=0.95\linewidth}
     \begin{subfigure}[b]{0.45\linewidth}
     \begin{tikzpicture} \begin{axis}[samples=499,xmin=-4, xmax=4,
      ytick=\empty,
      xtick=\empty,
    ymin=-0.5, ymax=1.5,
    axis lines=center,
    axis on top=true,
    domain=-3:3,
    xlabel=$x$,]
\addplot [red, thick, domain=-3.5:3.5] plot (\x, {(1-(2*pi*(\x)*(\x)))* e^(-pi*(\x)*(\x))});
\addplot [blue,thick,domain=-3.5:0]    plot (\x, {0.5*(1+tanh(8*(\x+2.5)))});
\addplot [blue,thick,domain=0:3.5]    plot (\x, {0.5*(1+tanh(-8*(\x-2.5)))});
\draw (axis cs:3,0) node[below]{$K$} ;
\draw (axis cs:-3,0) node[below]{$-K$} ;
\draw (axis cs:2,0) node[below]{$s$} ;
\draw (axis cs:-2,0) node[below]{$-s$} ;

\draw (axis cs:0,1) node[above left]{$f(0)$} ;
\draw (axis cs:0.5,0.5) node[right,red]{$f$} ;
\draw (axis cs:1.5,1) node[above,blue]{$F_\tau f$} ;
\end{axis}
\end{tikzpicture}
\caption{}
\label{figura intro}
\end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.45\linewidth}
     \begin{tikzpicture} \begin{axis}[samples=499,xmin=-0.3, xmax=4,
      ytick=\empty,
      xtick=\empty,
    ymin=-0.6, ymax=0.8,
    axis lines=center,
    axis on top=true,
    domain=-3:3,
    xlabel=$x$,]
\addplot [jump mark left,no marks,blue,thick] coordinates {(0,0.51) (3,0.51)};
\addplot [jump mark left,no marks,red,thick] coordinates {(0,0.5) (0.5,-0.5) (1,0.5) (1.5,-0.5) (2,0.5) (2.5,-0.5) (3,0.5)};
\draw [dashed, blue] (axis cs:3,0) -- (axis cs:3,0.51);

\draw [dashed, red] (axis cs:0,0) -- (axis cs:0,0.5);
\draw [dashed, red] (axis cs:0.5,-0.5) -- (axis cs:0.5,0.5);
\draw [dashed, red] (axis cs:1,-0.5) -- (axis cs:1,0.5);
\draw [dashed, red] (axis cs:1.5,-0.5) -- (axis cs:1.5,0.5);
\draw [dashed, red] (axis cs:2,-0.5) -- (axis cs:2,0.5);
\draw [dashed, red] (axis cs:2.5,-0.5) -- (axis cs:2.5,0.5);
\draw [dashed, red] (axis cs:3,-0.5) -- (axis cs:3,0);

\draw (axis cs:3,0) node[above right]{$1$} ;

\draw (axis cs:0,0.5) node[ left]{$1$} ;

\draw (axis cs:0.5,0.25) node[right,red]{$f$} ;
\draw (axis cs:3,0.5) node[above,blue]{$F_\tau f$} ;
\draw (axis cs:0.5,0) node[above right]{$s$} ;
\end{axis}
\end{tikzpicture}
\caption{}
\label{figura intro due}
\end{subfigure}
\caption{(A) A signal $f$ supported on $[-s,s]$ and its deformation $F_\tau f$, where $\tau(x)=x$ for $|x|<K$, with $K>s$. The plateau level corresponds to the value $f(0)$. The operator $F_\tau$ (with the choice of $\tau$ specified above) performs a single-point sampling of $f$, hence it does not make sense on discontinuous signals.
\\[1ex] (B) A signal $f$ localized in frequency where $|\omega|\approx s^{-1}$. With the choice of the deformation $\tau=s\mathbbm{1}_{\{f=-1\}}$, the signal $F_\tau f$ is low-pass (a similar example with $f$ continuous is easily obtained by smoothing the steps).
}
\end{figure}

These phenomena are evident sources of instability in the case where $\|\tau\|_{L^\infty}/s\gg 1$ and $\|\tau\|_{L^\infty}/s\approx 1$ respectively. Furthermore, in order for $F_\tau f$ to be well defined as an element of $L^2(\bR^d)$ for every $\tau\in L^\infty(\bR^d;\bR^d)$, independently of the representative of $f$ in $L^2(\bR^d)$ (which is only defined up to measure zero sets), $f$ must be assumed continuous at least (see again Figure \ref{figura intro} for a concrete example).

The previous remarks motivate recourse to multiresolution approximation spaces $U_s \subset L^2(\bR^d)$, $s>0$ \cite{mallbook}, with a Riesz basis given by a sequence of functions of the type $\phi_{s,n}(x)\coloneqq s^{-d/2}\phi((x-ns)/s)$, $n \in \bZ^d$, where $\phi$ is a fixed filter satisfying certain mild regularity and decay conditions (cf.\ Assumptions \ref{asu riesz}, \ref{asu rev 1} and \ref{asu rev 2} in Section \ref{sec mult} below). Different choices of $\phi$ result in diverse multiresolution approximations, including band-limited functions and polynomial splines of order $n\geq 1$ - see the discussion in Example \ref{rem examples} below for more details. In general, the introduction of a fixed resolution scale is also natural as a mathematical model of a concrete signal capture system (cf.\ the general A/D and D/A conversion schemes in \cite[Section 3.1.3]{mallbook} and also \cite{bietti0,bietti} for a similar limited-resolution assumption in a discrete setting). The scale $s$ (or rather $s^{-1}$) can also be viewed as a rough measure of the complexity of the input signal, and the previous discussion suggests that the stability bounds should involve the ratio $\|\tau\|_{L^\infty}/s$ rather than just $\|\tau\|_{L^\infty}$, which is also expected in order to have dimensionally consistent estimates.

\subsection{Discussion of the main results} The core of our first result can be presented as follows: under suitable assumptions on $\phi$ there exists a constant $C>0$ such that, for every $\tau \in L^\infty(\bR^d;\bR^d)$, $s>0$, \begin{equation}\label{eq intro main}
	\adm{\Phi(F_\tau f) - \Phi(f)} \le \begin{cases}
		C{\rm Lip}(\Phi)(\|\tau\|_{L^\infty}/s) \| f \|_{L^2} & (\|\tau\|_{L^\infty}/s \le 1) \\
		C{\rm Lip}(\Phi)(\|\tau\|_{L^\infty}/s)^{d/2} \| f \|_{L^2} & (\|\tau\|_{L^\infty}/s \ge 1)
	\end{cases}, \quad f \in U_s. \end{equation}
Here $\Phi$ is any Lipschitz map.
We refer to Theorems \ref{thm def bound Us} and \ref{thm feat bound us} for precise statements. In short, whenever we have a Lipschitz bound, we have a stability result in the regime $\|\tau\|_{L^\infty}/s \ll 1$, which can be explained in heuristic terms as one of the manifold forms of the uncertainty principle. Observe also that the rate of instability agrees with that of the previous discussion in \textit{(a)} when small-size oscillations, compared with the size of the deformation (namely, if $\|\tau\|_{L^\infty}/s \gg 1$), are allowed.

Interestingly, for fixed $f$, we have in any case $\adm{\Phi(F_\tau f) - \Phi(f)}=O(\|\tau\|_{L^\infty})$ as $\|\tau\|_{L^\infty}\to 0$, although this asymptotic estimate is not uniform with respect to $s$. In fact, in sharp contrast with \eqref{eq mallat0}, the factor $1/s$ in front of $\|\tau\|_{L^\infty}$ identifies the resolution of $f$, whereas the invariance resolution $2^{-J}$ in \eqref{eq mallat0} is a fixed parameter of the network. However, the example in item \textit{(b)} above shows that in the framework of irregular deformations, even for a fixed wavelet scattering network, we cannot hope for an estimate whose quality does not deteriorate when $\|\tau\|_{L^\infty}$ becomes comparable to the size of the oscillations of $f$. In fact, in Section \ref{sec sharp pwr} we show the sharpness of the estimate \eqref{eq intro main} in both regimes $\|\tau\|_{L^\infty}/s \gg 1$ and $\|\tau\|_{L^\infty}/s \ll 1$ for wavelet scattering networks. We thus conclude that whereas the choice of wavelet filters is crucial in \cite{mall cpam} to construct a transform which is Lipschitz stable to the action of $C^2$ diffeomorphisms, robustness under \textit{small and irregular} deformations obeys a more general rule, as already anticipated above.

We remark that estimates similar to \eqref{eq intro main} for generalized scattering networks were proved in \cite{wiat paper} (see also \cite{balan}) for band-limited functions  and in \cite{koller} for functions in the Sobolev space\footnote{Actually, the result in \cite{koller} is stated for functions in the Sobolev space $H^2$. An inspection of the proof and an easy density arguments show that it holds in fact for functions in the Sobolev space $H^1(\bR^d)$ of functions $f\in L^2(\bR^d)$ such that $\|\nabla f\|_{L^2}<\infty$.} $H^1(\bR^d)$ (see also \cite{grohs wiat} for other relevant signal classes, such as cartoon functions or Lipschitz functions). However, all these stability bounds for $\Phi$ are derived under the condition $\tau\in C^1(\bR^d;\bR^d)$, with $\| \nabla \tau \|_{L^\infty}$ small enough\footnote{Precisely, $\|\nabla \tau \|_{L^\infty}\leq 1/2d$ in \cite{wiat paper} and $\| \nabla \tau \|_{L^\infty}\leq 1/2$ in \cite{mall cpam}. This discrepancy is due to the definition $\| \nabla \tau \|_{L^\infty}\coloneqq \| |\nabla \tau| \|_{L^\infty}$  where $|\nabla \tau|$ is the Frobenius norm of the matrix $\nabla \tau(x)$  in \cite{mall cpam} and the $\ell^\infty$ norm of its entries in \cite{wiat paper}.} (again one could assume $\|\nabla \tau \|_{L^\infty}<1$ at the price of a blow-up when $\|\nabla \tau \|_{L^\infty}\to 1$). The estimate \eqref{eq intro main} for $\|\tau\|_{L^\infty}/s \le 1$ thus recovers and extends the results proved in \cite{wiat paper} for band-limited functions, now without any regularity assumption on the deformation.

The assumption that the input signal $f$ belongs to $U_s$ could be not realistic in practice; rather, we often deal with signals that can be well approximated in low-complexity spaces. For such signal classes we have again a stability result, which is briefly outlined here in low-dimensional settings for simplicity - we refer to Theorem \ref{main teo 0} for a general and precise statement. Let
$V_j\coloneqq U_{2^j}$, $j\in\mathbb{Z}$, be a multiresolution approximation of $L^2(\bR^d)$. There exists a constant $C>0$ such that, for every $\tau\in L^\infty(\bR^d;\bR^d)$ and any Lipschitz map $\Phi$
\[
\adm{\Phi (F_\tau f) - \Phi (f)} \leq C\,{\rm Lip}(\Phi)\|\tau\|_{L^\infty}^{d/2}\|f\|_{\dot{B}^{d/2}_{2,1}}  \qquad d=1,2
\]
if $f\in L^2(\bR^d)$ and $\|f\|_{\dot{B}^{d/2}_{2,1}}<\infty$, where $\dot{B}^{d/2}_{2,1}$ denotes the homogeneous Besov space tailored to the given multiresolution approximation \cite[Section 9.2.3]{mallbook}. This regularity level looks optimal in general: as already observed, $f$ should be at least continuous, and therefore in $B^{d/2}_{2,1}(\bR^d)$ if we consider the scale of $L^2$-based Besov spaces as a reference.

In Section \ref{sec freq mod def} we prove estimates in the same spirit for more general time-frequency deformations of the type $F_{\tau,\omega} f(x) = e^{i\omega(x)}f(x-\tau(x))$. Modulation deformations are relevant in case of spectral distortions of input signals. Differently from \cite{wiat paper}, these deformations are approached here in a ``perturbative'' way - that is, by reducing to the results already proved for the case $\omega \equiv 0$. Moreover, in Section \ref{sec dim est} we present a general discussion on the dimensional consistency of the above estimates for generalized scattering networks.

The main technical tools behind our results are the properties of certain spaces $X^{p,q}_r$, tailored to the deformation scale $r>0$. Such function spaces are usually referred to as Wiener amalgam spaces and were introduced by Feichtinger in the '80s \cite{fei83,fei81}; as the name suggests, they are obtained by means of a norm that amalgamates a local summability of $L^p$ type on balls of radius $r$ with an $L^q$ behaviour at infinity. They are currently used in harmonic analysis and PDEs, possibly under slightly different names and forms; see for instance \cite{dan,tao}.

In Section \ref{sec xpqr} we collect the main properties of these spaces, while in Section \ref{sec xopt} we focus on the space $X^{\infty,2}_r$ of locally bounded functions, uniformly at the scale $r$, with $L^2$ decay. This choice should not be intended as a mere technical workaround: in Proposition \ref{maint xopt} we prove indeed that this class is the optimal choice when dealing with arbitrary bounded deformations, since for functions $f \in X^{\infty,2}_r\cap C(\bR^d)$ we have the clear-cut characterization
\[ 	\| f \|_{X^{\infty,2}_r} = \max \{ \| F_\tau f \|_{L^2} : \tau\in L^\infty(\bR^d;\bR^d), \, \|\tau\|_{L^\infty} \le r \}. \]
Moreover, the local control offered by $X^{p,q}_r$ can be effectively exploited to prove a crucial embedding, cf.\ Theorem \ref{thm rev hold}, which can be heuristically referred to as a reverse H\"older-type inequality for signals in $U_s$ - in the spirit of \cite[Lemma 2.2]{tao} - and can be regarded as a novel form of the already mentioned uncertainty principle.

We adopted so far a deterministic model for the deformation - in fact, a ball in $L^\infty(\bR^d;\bR^d)$ - without any additional structure, and therefore we provided stability guarantees for the ``worst-case scenario". In Section \ref{sec random} we assume instead that $\tau$ is a random field with identically distributed variables $|\tau(x)|$, $x\in\bR^d$. We accordingly study the issue of stability in mean, providing stochastic versions of the above results. For example, we prove that
\[
\mathbb{E} \adm{\Phi(F_\tau f)-\Phi(f)}^2\leq C\,{\rm Lip}(\Phi)^2\mathbb{E}[|\tau|^d]\|f\|^2_{\dot{B}^{d/2}_{2,1}} \qquad d=1,2;
\]
see Theorem \ref{teo random} for the precise statement in any dimension, and for similar results when $f$ belongs to limited-resolution spaces $U_s$ as above. Here we set $\mathbb{E}[|\tau|^d]$ for $\mathbb{E}[|\tau(x)|^d]$, the latter being in fact independent of $x$; we also emphasize that the field $\tau$ is no longer assumed to be bounded.

To conclude, in Section \ref{sec sim} we briefly report on numerical evidences for scattering architectures in dimension $d=1$. We also suggest an empirical procedure aimed at the estimate of the scale parameter $s$ for certain toy signals. A more systematic experimental analysis of the problem is postponed to future work.

\section{General notation and review of scattering networks}\label{sec notation}

\subsection{Notation}
{\setlength{\parindent}{0cm}
\setlength{\parskip}{0.2cm}
The open unit ball of $\bR^d$ with radius $r>0$ and centered at the origin is denoted by $B_r$.

We introduce a number of operators acting on $f:\bR^d \to \mathbb{C}$:
\begin{itemize}
	\item[-] the dilation $D_\lambda$ by $\lambda \ne 0$: $D_\lambda f(y) = f(\lambda y)$;
	\item[-] the translation $T_x$ by $x \in \bR^d$: $T_x f(y) = f(y-x)$;
	\item[-] the modulation $M_\xi$ by $\xi \in \bR^d$: $M_\xi f(y) = e^{i y \cdot \xi} f(y)$;
	\item[-] the reflection: $\mathcal{I} f(y) = f(-y)$;
	\item[-] the Fourier transform (whenever meaningful, e.g.\ if $f \in L^1(\bR^d)$), normalized here as
	\[ \widehat{f}(\omega) =\mathcal{F}(f)(\omega)= \int_{\rd} e^{-i\omega \cdot y} f(y) dy. \]
\end{itemize}

The space $L^\infty(\bR^d;\bR^d)$ contains all the measurable vector fields $\tau: \bR^d \to \bR^d$ such that
\[ \| \tau \|_{L^\infty} \coloneqq \esssup_{y\in\bR^d} |\tau(y)| < \infty. \]

We introduce the inhomogeneous magnitude $\langle y \rangle$ of $y \in \bR^d$ by $\langle y \rangle \coloneqq (1+|y|^2)^{1/2}$.

The symbol $\mathbbm{1}_E$ will be used to denote the characteristic function of a set $E$.

While in the statements of the results we will keep track of absolute constants in the estimates, in the proofs we will heavily make use of the symbol $X \lesssim Y$, meaning that the underlying inequality holds up to a ``universal" positive constant factor, namely
\[ X \lesssim Y \quad\Longrightarrow\quad\exists\, C>0\,:\,X \le C Y. \] Moreover, $X \asymp Y$ means that $X$ and $Y$ are \textit{equivalent quantities}, that is both $X \lesssim Y$ and $X\lesssim Y$ hold.

In the rest of the note all the derivatives are to be understood in the distribution sense, unless otherwise noted. }

\subsection{A brief review of generalized scattering networks} \label{sec a brief review} In this section we recollect some basic facts and results concerning the mathematical analysis of scattering networks, mainly in order to fix the notation and also to have a concrete reference model. More details can be found in \cite{mall cpam,wiat paper}.

The typical architecture of a generalized scattering network ultimately consists of three parts: convolution with suitable filters, application of a non-linearity and finally some kind of pooling. To be more precise, the triplet $(\Psi_n,M_n,P_n)$ (called \textit{module}) represents the structure of the $n$-th layer of the network, where:
\begin{enumerate}
	\item $\Psi_n = \{ T_b \mathcal{I} g_{\lambda_n} : b \in \bR^d,\, \lambda_n \in \Lambda_n\}$ is a semi-discrete frame for $L^2(\bR^d)$ with atoms $g_{\lambda_n} \in L^1(\bR^d)\cap L^2(\bR^d)$ and countable index set $\Lambda_n$. This is equivalent to say that there exist constants $A_n,B_n>0$ such that
	\[ A_n \| f \|_{L^2}^2 \le \sum_{\lambda_n \in \Lambda_n} \|f*g_{\lambda_n} \|_{L^2}^2 \le B_n \|f \|_{L^2}^2, \quad f \in L^2(\bR^d).
	\]
	\item $M_n : L^2(\bR^d)\to L^2(\bR^d)$ is a non-linear pointwise Lipschitz-continuous operator, with Lipschitz constant $L_n>0$, such that $M_n f =0$ if $f=0$.
	\item $P_n : L^2(\bR^d)\to L^2(\bR^d)$ is a Lipschitz-continuous operator, with Lipschitz constant $R_n>0$, such that $P_n f =0$ if $f=0$. The associated pooling operator is defined by
	\[ f\mapsto S_n^{d/2} D_{S_n}(P_n(f)), \quad f \in L^2(\bR^d), \] where $S_n \ge 1$ is the pooling factor. In Section \ref{sec dim est} we will assume that $P_n$ is a convolution operator or even the identity operator.
\end{enumerate}
The sequence $\Omega = \{(\Psi_n,M_n,P_n)\}_{n \in \mathbb{N}}$ is called \textit{module-sequence}. We say that the latter is an \textit{admissible module-sequence} if the following condition is satisfied: \begin{equation}\label{eq adm cond}  \max\{ B_n,B_n L_n^2 R_n^2\} \le 1, \quad \forall n \in \mathbb{N}. \end{equation}

For any $n\ge 1$ we arbitrarily single out an atom $g_{\lambda^*_n}$, $\lambda^*_n \in \Lambda_n$, and call it the \textit{output-generating atom} $\chi_{n-1}$ of the $(n-1)$-th layer; we accordingly set $\chi_{n-1} \coloneqq g_{\lambda^*_n}$  and  rename $\Lambda_n\setminus\{g_{\lambda^*_n}\}$ by $\Lambda_n$.

Given an integer $n \ge 1$ we introduce the set of $n$-\textit{paths} to be $\Lambda^n \coloneqq \Lambda_1 \times \cdots \times \Lambda_n$, while $\Lambda^0 \coloneqq \{ \emptyset \}$. The set of all possible paths is thus given by $\mathcal{Q} \coloneqq \bigcup_{n=0}^\infty \Lambda^n$.

The $n$-th layer scattering propagator $U_n:\Lambda_n \times L^2(\bR^d) \to L^2(\bR^d)$ is defined by
\[ U_n[\lambda_n](f) \coloneqq S^{d/2}_n D_{S_n} P_n (M_n (f*g_{\lambda_n})).  \]
More generally, the \textit{scattering propagator} $U : \Lambda^n \times L^2(\bR^d) \to L^2(\bR^d)$ acts on a path $q=(\lambda_1,\ldots,\lambda_n) \in \Lambda^n$ by
\[ U[q](f) \coloneqq U_n[\lambda_n]\cdots U_2[\lambda_2]U_1[\lambda_1](f) \]
and $U(\emptyset)f=f$.

\begin{figure}[h]
\begin{forest}
	treenode/.style = {align=center, inner sep=0pt, text centered, font=\sffamily},
	for tree={
	grow'=north,
	delay={
		edge label/.wrap value={node[midway, font=\sffamily\scriptsize, above]{#1}},
		},
			}
	[$f$, name=L0,
	[{$U [\lambda_1^{(j)} ] f$}, name=L1sx ,
	[{$\scalemath{0.8}{U [\lambda_1^{(j)},\lambda_2^{(k)}] f}$}, name=L2sx, [$\vdots$] [$\vdots$] [$\vdots$] [$\vdots$]
	]
	[, tikz={\draw [fill=white] (.anchor) circle[radius=2pt];}  [$\vdots$] [$\vdots$]
	]
	[, tikz={\draw [fill=white] (.anchor) circle[radius=2pt];} [$\vdots$] [$\vdots$]
	]
	]
	[,tikz={\draw [fill=white] (.anchor) circle[radius=2pt];}
	[, tikz={\draw [fill=white] (.anchor) circle[radius=2pt];} [$\vdots$]], [, tikz={\draw [fill=white] (.anchor) circle[radius=2pt];} [$\vdots$]]]
	[{$U [\lambda_1^{(r)} ] f$}, name=L1dx,
	[, tikz={\draw [fill=white] (.anchor) circle[radius=2pt];} [$\vdots$]
	]
	[,tikz={\draw [fill=white] (.anchor) circle[radius=2pt];} [$\vdots$]
	]
	[$\scalemath{0.8}{U [\lambda_1^{(r)},\lambda_2^{(s)}] f}$, name=L2dx,
	[,tikz={\draw [fill=white] (.anchor) circle[radius=2pt];}  [$\vdots$][$\vdots$][$\vdots$]
	]
	[$\cdots$,
	[$\scalemath{0.8}{U [\lambda_1^{(r)},\lambda_2^{(s)},\ldots,\lambda_n^{(t)}] f}$, name=Ldxend,  [$\vdots$,for ancestors={edge={red,thick}}] [$\vdots$] [$\vdots$]]
	]
	]
	]
	]
	]
	\draw [blue, dashed, ->, shorten >=3pt] (L0) -- ++(-27pt,-20pt) node [circle,fill=blue,inner sep=1pt,minimum size=3pt,label={[xshift=0pt, yshift=-15pt]  $\scalemath{0.7}{f*\chi_0}$}] {};;
	\draw [blue, dashed, dashed, ->, shorten >=3pt] (L1sx) -- ++(-40pt,-30pt) node [circle,fill=blue,inner sep=1pt,minimum size=3pt,label={[xshift=0pt,yshift=-20pt] $\scalemath{0.7}{(U [\lambda_1^{(j)} ] f )*\chi_1}$}] {};;
	\draw [blue, dashed, ->, shorten >=3pt] (L2sx) -- ++(-40pt,-30pt) node [circle,fill=blue,inner sep=1pt,minimum size=3pt,label={[xshift=0pt,yshift=-20pt] $\scalemath{0.7}{(U [\lambda_1^{(j)} \lambda_2^{(k)}] f )*\chi_2}$}] {};;
	\draw [blue, dashed, ->, shorten >=3pt] (L1dx) -- ++(50pt,-25pt) node [circle,fill=blue,inner sep=1pt,minimum size=3pt,label={[xshift=0pt,yshift=-20pt] $\scalemath{0.7}{(U [\lambda_1^{(r)} ] f )*\chi_1}$}] {};;		\draw [blue, dashed, ->, shorten >=3pt] (L2dx) -- ++(50pt,-25pt) node [circle,fill=blue,inner sep=1pt,minimum size=3pt,label={[xshift=0pt,yshift=-20pt] $\scalemath{0.6}{(U [\lambda_1^{(r)},\lambda_2^{(s)}] f)*\chi_2}$}] {};;
	\draw [blue, dashed, ->, shorten >=3pt] (Ldxend) -- ++(50pt,-25pt) node [circle,fill=blue,inner sep=1pt,minimum size=3pt,label={[xshift=0pt,yshift=-20pt] $\scalemath{0.6}{(U [\lambda_1^{(r)},\lambda_2^{(s)},\ldots,\lambda_n^{(t)}] f)*\chi_n}$}] {};;
			\end{forest}
		\caption{A typical scattering network architecture, as described above. The index $\lambda_l^{(m)}$ corresponds to the $m$-th atom of the $l$-th layer frame $\Phi_l$. In blue: some features, where $\chi_l$ is the output-generating atom of the $l$-th layer. In red: an example of a $n$-path $q=(\lambda_1^{(r)},\lambda_2^{(s)}\ldots,\lambda_n^{(t)}) \in \Lambda^n$.}
\end{figure}

Given an admissible module-sequence $\Omega = \{(\Psi_n,M_n,P_n)\}_{n \in \mathbb{N}}$ the \textit{feature extractor} $\Phi_\Omega : L^2(\bR^d) \to \ell^2(\mathcal{Q};L^2(\bR^d))$ is defined by
\[ \Phi_\Omega(f) \coloneqq \left\{ \Phi_\Omega^n(f)\right\}_{n\geq0}, \quad \Phi_\Omega^n(f)\coloneqq \{ (U[q](f))*\chi_n : q \in \Lambda^n\}, \] where $\ell^2(\mathcal{Q};L^2(\bR^d))$ consists of all the sequences of the form $s = \{ s_q \in L^2(\bR^d) : q \in \mathcal{Q} \}$ such that
\[ \adm{s} \coloneqq \left( \sum_{q \in \mathcal{Q}} \| s_q \|_2^2 \right)^{1/2} < \infty. \]

The two main properties of the feature extractor are recalled below. \\

\noindent \textit{Vertical invariance \cite[Theorem 1]{wiat paper}.} If
\[ M_n (T_c f) = T_c M_n (f), \quad P_n (T_c f) = T_c P_n (f), \] for every $n \in \mathbb{N}$, $c \in \bR^d$ and $f \in L^2(\bR^d)$, then the features $\Phi_\Omega^n(f)$ generated in the $n$-th layer satisfy
\begin{equation}\label{eq fe vert invar} \Phi_\Omega^n(T_c f) = \begin{cases}
	T_c \Phi_\Omega^n(f) & (n=0) \\
	T_{\frac{c}{S_1\cdots S_n}} \Phi_\Omega^n(f) & (n\ge 1)
\end{cases},\end{equation} for all $f \in L^2(\bR^d)$, $c \in \bR^d$ and $n \in \mathbb{N}$, where $T_c \Phi_\Omega^n(f) \coloneqq \{ T_c h : h \in \Phi_\Omega^n \}$. \\

\noindent \textit{Lipschitz property \cite[Proposition 4]{wiat paper}.} If $\Omega = \{(\Psi_n,M_n,P_n)\}_{n\in \mathbb{N}}$ is an admissible module-sequence, the corresponding feature extractor $\Phi_\Omega:L^2(\bR^d)\to \ell^2(\mathcal{Q};L^2(\bR^d))$ is Lipschitz continuous with constant ${\rm Lip}(\Phi_\Omega)\leq 1$, that is
\begin{equation}\label{eq fe lip}
	\adm{\Phi_\Omega(f)-\Phi_\Omega(h)} \le \| f-h \|_{L^2}, \quad f,h \in L^2(\bR^d).
\end{equation}
Different sufficient conditions can be found for instance in \cite[Theorem 2.1]{balan}. \\

Interestingly, inspecting the admissibility condition \eqref{eq adm cond} and the proofs of the previous results shows that the lower frame bounds $A_n$ are not involved. In fact, as remarked in \cite[Section V]{wiat paper}, one could consider relaxing the assumptions on $\Psi_n$ in order to just deal with a semi-discrete Bessel sequence with Bessel constant $B_n$; see also the formulations in \cite{balan,zou} in this respect.

An important special case is represented by wavelet scattering networks, where in every layer the filters are of wavelets type, with modulus nonlinearity ($M_n(f)=|f|$) and no pooling ($S_n=1$ and $P_n$ is the identity operator). For example, in dimension $d=1$, Figure \ref{fig wavel} represents the Shannon wavelet filters in the Fourier domain (we will use this architecture in a counterexample in Section \ref{sec sharp pwr}).

\section{Wiener amalgam spaces at different scales}\label{sec xpqr}
The following family of function spaces will play a key role in the following.
\begin{definition}
	For $1 \le p,q \le \infty$ and $r>0$, we denote by $X^{p,q}_r$ the space of all the complex-valued measurable functions in $\bR^d$ such that
	\begin{equation}\label{eq X norm}
		\| f \|_{X^{p,q}_r} \coloneqq \left( \int_{\rd} \| T_{-x} f \|_{L^p(B_r)}^q dx \right)^{1/q} < \infty,
	\end{equation} with obvious modifications if $q=\infty$. In the case where $r=1$ we write $X^{p,q}$ for $X^{p,q}_1$.
\end{definition}
Let us emphasize that $X^{\infty,1}$ coincides with the well known Wiener space of harmonic analysis (cf.\ e.g.\ \cite[Section 6.1]{grobook}). More generally, $X^{p,q}$ coincides with the Wiener amalgam space $W(L^p,L^q)$ of functions with local regularity of $L^p$ type and global decay of $L^q$ type, first introduced by Feichtinger in the '80s \cite{fei83,fei81}; recall that the latter is a Banach space provided with the norm
\[ \| f \|_{W(L^p,L^q)} = \left( \int_{\rd} \| T_{-x}f \|_{L^p(Q)}^q dx \right)^{1/p},  \]
where $Q\subset \bR^d$ is an arbitrary compact set with non-empty interior. In fact, different choices of $Q$ yield equivalent norms; typical choices include $Q=B_1$ and $Q=[0,1]^d$. Moreover, the following equivalent discrete-type norm can be used to measure the amalgamated regularity:
\begin{equation}\label{eq disc norm}
	\| f \|_{X^{p,q}} \asymp \left( \sum_{k \in \bZ^d} \| T_{-k} f \|_{L^p(Q)}^q \right)^{1/q}, \quad Q=[0,1]^d.
\end{equation}

We also highlight that $X^{p,p}_r$ coincides with $L^p(\bR^d)$ as set for any $1 \le p \le \infty$, but the norm is rescaled:
\[ \| f \|_{X^{p,p}_r} = r^{d/p} \|f \|_{L^p}. \]
A similar change-of-scale property holds with respect to $X^{p,q}$, in the sense of the following result.
\begin{lemma}\label{lem rescal norm}
	For any $1 \le p,q \le \infty$ and $r>0$, we have that $X^{p,q}_r = X^{p,q}$ as sets, and
	\[ \| f \|_{X^{p,q}_r} = r^{d \left( \frac{1}{p} + \frac{1}{q} \right)} \| D_r f \|_{X^{p,q}}. \]
\end{lemma}
\begin{proof} Let us consider the case $p,q < \infty$ for conciseness, the other cases following easily. A straightforward computation shows that
	\begin{align*}
	\| f \|_{X^{p,q}_r} & = \left( \int_{\rd} \left( \int_{B_r} |f(x+y)|^p dy \right)^{q/p} dx \right)^{1/q} \\  & = r^{d/p} \left(  \int_{\rd} \left( \int_{B_1} |f(x+rz)|^p dz \right)^{q/p} dx \right)^{1/q}  \\
		& = r^{d/p} \left( \int_{\rd} \left( \int_{B_1} |D_r f(r^{-1}x+z)|^p dz \right)^{q/p} dx \right)^{1/q} \\
		& = r^{d(1/p+1/q)} \left( \int_{\rd} \left( \int_{B_1} |D_r f(x+z)|^p dz \right)^{q/p} dx \right)^{1/q},
	\end{align*} that is the claim.
\end{proof}
For future reference let us examine some properties of the spaces $X^{p,q}_r$. First, we prove an embedding result that will be often used below.

\begin{proposition}
	For any $1 \le p_1,p_2,q \le \infty$ with $p_1 \le p_2$, and $r>0$, we have
	\[ \| f \|_{X^{p_1,q}_r} \le C r^{d \left( \frac{1}{p_1}-\frac{1}{p_2} \right)} \| f \|_{X^{p_2,q}_r}, \] where the constant $C>0$ depends only on $d$.
\end{proposition}
\begin{proof} Fix $x \in \bR^d$ and consider the mapping $h_x : y \mapsto |f(x+y)|$. The standard H\"older inequality on the ball $B_r$  yields, with $\rho$ such that $1/p_1 = 1/p_2 + 1/\rho$,
	\begin{align*}
		\| T_{-x} f \|_{L^{p_1}(B_r)} & = \|h_x \cdot \mathbbm{1}_{B_r} \|_{L^{p_1}(B_r)} \\
		& \le \| T_{-x} f \|_{L^{p_2}(B_r)} \|1_{B_r}\|_{L^\rho} \\
		& \le (C r^d)^{\left( \frac{1}{p_1}-\frac{1}{p_2}\right) } \| T_{-x} f \|_{L^{p_2}(B_r)},
	\end{align*} where $C$ is the volume of the $d$-ball with radius $1$. The claim thus follows.
\end{proof}

In the following results we illustrate the behaviour of the spaces $X^{p,q}_r$ under convolution and dilations. In fact, the case with $r=1$ is covered by the standard theory of amalgam spaces (cf.\ \cite{fei83,heil} and \cite[Proposition 2.2]{cn sharp} respectively), hence the result for $r \ne 1$ follows by rescaling the norms in accordance with Lemma \ref{lem rescal norm}.
\begin{proposition}\label{prop conv spaces}
	For any $r>0$ and $1 \le p_1,p_2,p,q_1,q_2,q \le \infty$ such that
	\[ \frac{1}{p_1} + \frac{1}{p_2} = 1 + \frac{1}{p}, \qquad \frac{1}{q_1} + \frac{1}{q_2} = 1 + \frac{1}{q}, \] we have
	\[ \| f*g \|_{X^{p,q}_r} \le C r^{-d} \| f \|_{X^{p_1,q_1}_r} \|g \|_{X^{p_2,q_2}_r},  \] for a constant $C>0$ that depends only on $d$.
\end{proposition}

\begin{proposition}\label{prop dil spaces}
	For any $r,s>0$ and $1 \le p,q \le \infty$ we have
\[ \| D_s f \|_{X^{p,q}_r} \le \begin{cases} C s^{-d \max(1/p,1/q)} \|f \|_{X^{p,q}_r} & (0<s\le 1) \\ C s^{-d \min(1/p,1/q)} \|f \|_{X^{p,q}_r}  & (s \ge 1) \end{cases}, \]
for a constant $C>0$ that depends only on $d$.
\end{proposition}

\section{$L^\infty$ deformations and the space $X^{\infty,2}_r$}\label{sec xopt}
Let us consider the  class of deformation mappings $F_\tau$ associated with distortion functions $\tau:\bR^d \to \bR^d$ by setting
\[ F_\tau f(x) \coloneqq f(x-\tau(x)),
 \]
where $f:\bR^d \to \mathbb{C}$.

We prove that the class $X^{\infty,2}_r$ is the optimal choice as far as sensitivity bounds for arbitrary bounded deformations are concerned. The second part of the following result can be regarded as a linearization of a maximal operator (cf.\ \cite[Section 6.1.3]{grafakos}).

\begin{proposition}\label{maint xopt}
	We have
	\begin{equation}\label{eq xopt bound}
		 \| F_\tau f \|_{L^2} \le \|f \|_{X^{\infty,2}_r}, \quad r=\| \tau\|_{L^\infty},
	\end{equation}
	 for every $f \in X^{\infty,2}_r\cap C(\bR^d)$ and $\tau \in L^\infty(\bR^d;\bR^d)$.

	More precisely, for every function $f \in X^{\infty,2}_r\cap C(\bR^d)$, we have the characterization
	\begin{equation}\label{eq xopt char}
		\| f \|_{X^{\infty,2}_r} = \max \{ \| F_\tau f \|_{L^2} \, : \, \tau\in L^\infty(\bR^d;\bR^d), \, \|\tau\|_{L^\infty} \le r \}.
	\end{equation}
\end{proposition}
\begin{remark}
	Note that the continuity assumption on $f \in X^{\infty,2}_r$ is essential in the statement, otherwise $f(x-\tau(x))$ may not even be well defined in $L^2$ (i.e., independent of the representative $f$), as evidenced by the case $\tau(x)=x$ for $x \in B_R$ and small $R>0$. See also Figure \ref{figura intro} in this connection.
\end{remark}
\begin{proof}[Proof of Proposition \ref{maint xopt}]
	It is clear that, for almost every $x\in\bR^d$,
	\[ |f(x-\tau(x))| \le \sup \{ |f(x-y)| : y \in \bR^d,\, |y|\le \|\tau\|_{L^\infty} \}, \] and thus \eqref{eq xopt bound} follows after taking the $L^2$ norm (the above supremum is the same as the essential supremum because $f$ is continuous).

	For what concerns \eqref{eq xopt char}, it is enough to prove that
	\[ 		\| f \|_{X^{\infty,2}_r} \le \max \{ \| F_\tau f \|_{L^2} \, : \, \tau\in L^\infty(\bR^d;\bR^d), \, \|\tau\|_{L^\infty} \le r \}. \]
	To this aim, notice that if we could design a measurable correspondence $\tau$ between $x \in \bR^d$ and a point $y^* =\tau(x)\in \overline{B_r}$ where the function $\overline{B_r} \ni y \mapsto |f(x-y)|$ attains its maximum, then
	\[ \max_{|y|\le r} |f(x-y)| = |f(x-\tau(x))| = |F_\tau(x)|, \] and the desired conclusion would follow once taking the $L^2$ norm. The existence of such a measurable selector is a consequence of the measurable maximum theorem \cite[Theorem 18.19]{aliprantis} (in fact, an easier argument - cf.\ \cite[Section 6.1.3]{grafakos}  - would give \eqref{eq xopt char} with the supremum in place of the maximum).
	\end{proof}

The following result provides a sensitivity bound for $L^2$ functions which are \textit{locally Lipschitz, uniformly at the deformation scale}. It should be compared with the result in \cite{koller}, valid for functions in the  Sobolev space $H^1(\bR^d)$, for deformation $\tau\in C^1(\bR^d;\bR^d)$, $\|\nabla \tau\|_{L^\infty}\leq 1/2$, hence regular.

\begin{proposition}\label{maint grad xopt}
	There exists a constant $C>0$ such that
\begin{equation}\label{eq maint grad xopt}
	\| F_\tau f - f \|_2 \le C \|\tau\|_{L^\infty} \|\nabla f \|_{X^{\infty,2}_r}, \quad r=\|\tau\|_{L^\infty},
\end{equation} for every $\tau \in L^\infty(\bR^d;\bR^d)$ and every function $f \in X^{\infty,2}_r$ such that $\| \nabla f \|_{X^{\infty,2}_r} < \infty$.
\end{proposition}
Observe that the condition  $\| \nabla f \|_{X^{\infty,2}_r} < \infty$ implies that $\nabla f\in L^\infty_{\mathrm{loc}}(\bR^d)$, and therefore $f$ is locally Lipschitz continuous after possibly being redefined on a set of measure zero (cf.\ \cite[Theorem 4, page 294]{evans}), in particular $f$ is continuous. In the following we will always identify $f$ with its continuous version. Also, we set \begin{equation}
		\| \nabla f\|_{X^{\infty,2}_r} \coloneqq \| | \nabla f| \|_{X^{\infty,2}_r}.
	\end{equation}

\begin{proof}[Proof of Proposition \ref{maint grad xopt}]
For $x\in\bR^d$, $r>0$ let $B(x,r)$ be the open ball in $\bR^d$ of radius $r$ and center $x$.
By the Poincar\'e inequality for a ball\footnote{That is $\|f - \overline{ f}_{x,r}\|_{L^\infty(B(x,r))}\leq C r\|\nabla f\|_{L^\infty(B(x,r))}$ where $\overline{ f}_{x,r}$ is the average of $f$ over $B(x,r)$. Since under our assumption $f$ is continuous in $\bR^d$, we can replace the $L^\infty$ norm in the left-hand side by the supremum of $|f|$, and then one obtains \eqref{eq stima lipsc} from the triangle inequality (by adding and subtracting $\overline{ f}_{x,r}$).} (cf.\ \cite[Theorem 2, page 291]{evans}) we see that there exists a constant $C>0$ such that, for every $r>0$ and $x\in\bR^d$,
\begin{equation}\label{eq stima lipsc}
    |f(x-y)-f(x)|\leq Cr\|\nabla f\|_{L^\infty(B(x,r))}, \quad |y|\leq r.
\end{equation}
Setting $y=\tau(x)$, $r=\|\tau\|_{L^\infty}$ and taking the $L^2$ norm lead to the desired conclusion.
\end{proof}

\section{Multiresolution approximation spaces}\label{sec mult}
Fix $\phi \in L^2(\bR^d)$ and recall \cite{mallbook} that the associated approximation space $U_s$ at scale $s>0$ is defined as follows:
\[ U_s \coloneqq \overline{\text{span} \{ \phi_{s,n} \}_{n \in \bZ^d}}, \qquad \phi_{s,n}(x) \coloneqq s^{-d/2} T_{ns} D_{1/s} \phi(x) = s^{-d/2} \phi \left( \frac{x-ns}{s} \right). \]
In the rest of the paper we are going to deal with the following assumptions on $\phi$.

\begin{asu} \label{asu riesz}
	There exist constants $A, B >0$ such that
	\begin{equation}\label{eq cond riesz}
		A \le \sum_{k \in \bZ^d} |\hat{\phi}(\omega-2\pi k)|^2 \le B \quad \text{for a.e. } \omega \in \bR^d. \end{equation} This is \textit{equivalent} to assuming that $\{ \phi_{s,n} \}$ is a Riesz basis for $U_s$ - see \cite[Theorem 3.4]{mallbook} for the case $d=1$, while the result for $d>1$ is a direct extension of the latter.
\end{asu}
We further assume one of the following regularity/decay conditions on $\phi$.

\begin{asu} \label{asu rev 1} \textit{At least one} of the following conditions holds.
	\begin{enumerate}[(i)]
	\item $\phi$ belongs to the Wiener space: \begin{equation}\label{eq cond rev 1}
		\phi \in X^{\infty,1},
	\end{equation}
	(in particular $\phi$ is locally bounded and has a $L^1$ decay);
	\item There exist $\alpha > 1/2$ and $B'>0$ such that \begin{equation}\label{eq cond rev 2}
		\sum_{k \in \bZ^d} |(v^\alpha \hat{\phi})(\omega - 2\pi k)|^2 \le B' \quad \text{for a.e. } \omega \in [0,2\pi],
	\end{equation} where we introduced the weight function $v(\omega) = \langle \omega_1 \rangle \cdots \langle \omega_d \rangle$, $\omega \in \bR^d$.
	\end{enumerate}
\end{asu}

\begin{asu}\label{asu rev 2}
 	For all $j=1,\ldots,d$, at least one of the conditions \eqref{eq cond rev 1} and \eqref{eq cond rev 2} of Assumption \ref{asu rev 1} is satisfied with $\phi$ replaced by $\partial_j \phi$.
\end{asu}

\begin{example}\label{rem examples} This is a convenient stage where to present some examples of functions satisfying the assumptions. Generally speaking, \eqref{eq cond rev 1} is satisfied by any function $\phi \in L^\infty(\bR^d)$ with compact support, while the same condition on the Fourier side (i.e., $\hat{\phi} \in L^\infty(\bR^d)$ with compact support) guarantees that \ref{eq cond rev 2} holds. To be more concrete, let us provide some standard examples in dimension $d=1$ - Assumption \ref{asu riesz} will be satisfied in all cases (cf.\ \cite[Section 3.1.3, pages 69,70]{mallbook}).
	\begin{itemize}
		\item[-] The choice $\phi = \mathbbm{1}_{[0,1]}$, leading to piecewise constant approximations (block sampling), is easily seen to satisfy \eqref{eq cond rev 1} but not \eqref{eq cond rev 2} for any $\alpha>1/2$, nor Assumption \ref{asu rev 2}.
		\item[-] The normalized sinc function $\displaystyle \phi(t) = \frac{\sin(\pi t)}{\pi t}$, corresponding to Shannon approximations (i.e., band-limited functions), satisfies \eqref{eq cond rev 2} for every $\alpha >0$, as well as Assumption \ref{asu rev 2}, but not \eqref{eq cond rev 1}.
		\item[-] The B-spline $\phi$ of degree $n$, obtained by $n+1$ convolutions of $\mathbbm{1}_{[0,1]}$ with itself and centering at $0$ or $1/2$, can be characterized by its Fourier transform:
		\[ \hat{\phi}(\omega) = \left( \frac{\sin(\omega/2)}{\omega/2} \right)^{n+1} e^{-i\epsilon \omega/2}, \quad \epsilon = \begin{cases}
			1 & (n\text{ is even}) \\ 0 & (n\text{ is odd})
		\end{cases}. \] We see that if $n\ge 1$ then both \eqref{eq cond rev 1} and \eqref{eq cond rev 2} are satisfied (for $\alpha < n+1/2$), as well as Assumption \ref{asu rev 2} (the case $n=0$ is covered by the previous case of $\phi = \mathbbm{1}_{[0,1]}$).
	\end{itemize}
\end{example}
In Assumption \ref{asu rev 1} we introduced the weight function $v(x)$. Let us now define a companion Sobolev space, for $\alpha\in\mathbb{R}$, $\alpha\geq 0$:
\[
H^\alpha_\otimes(\bR^d)\coloneqq\{f\in L^2(\bR^d):\ \|f\|_{H^\alpha_\otimes}\coloneqq\|v^\alpha \hat{f} \|_{L^2}<\infty\}.
\] Roughly speaking, $H^\alpha_\otimes(\bR^d)$ consists of functions in $L^2(\bR^d)$ which have at least $\alpha$ (possibly fractional) derivatives in the directions of the axes in $L^2(\bR^d)$. It is easy to realize that this space contains functions in the usual Sobolev space $H^{d\alpha}(\bR^d)$ as well as tensor products $\phi_1\otimes \ldots \otimes \phi_d$, with  $\phi_j\in H^\alpha(\mathbb{R})$, $j=1,\ldots, d$.

\begin{proposition}\label{immersioni}
If $\alpha>1/2$ we have the embedding $H^\alpha_\otimes(\bR^d)\hookrightarrow L^\infty(\bR^d)\cap C(\bR^d)$, as well as
\[
H^\alpha_\otimes(\bR^d) \hookrightarrow X^{\infty,2}.
\]
\end{proposition}

\begin{proof}
The embedding in $L^\infty$ follows at once from the chain of inequalities
\[
\| f \|_{L^\infty} \lesssim \| \hat{f} \|_{L^1} \le \| v^{-\alpha} \|_{L^2} \| \hat{f}v^{\alpha}\|_{L^2} \]
and the fact that $v^{-\alpha} \in L^2(\bR^d)$ if $\alpha > 1/2$.
The embedding in $C(\bR^d)$ is then clear because the space of Schwartz functions is easily seen to be dense in $H^\alpha_\otimes(\bR^d)$.

Concerning the embedding in $X^{\infty,2}$, let  $g \in C^\infty_c(\bR^d)$, with $g=1$ on $B_1$. Then
\[
 \| f \|_{X^{\infty,2}} \le \| \| T_{-x}f \cdot g \|_{L^\infty} \|_{L^2_x} \lesssim \| \| f \cdot T_x g \|_{H^\alpha_\otimes} \|_{L^2_x} \lesssim \| f \|_{H^\alpha_\otimes},
  \]
  where the last inequality is proved in \cite[Propositon 11.3.1(c)]{grobook}.
\end{proof}

We now establish a crucial reverse H\"older-type inequality for functions in $U_s$.

\begin{theorem}\label{thm rev hold} Let $\phi \in L^2(\bR^d)$ be such that Assumption \ref{asu riesz} is satisfied.
	\begin{enumerate}[(i)]
		\item If Assumption \ref{asu rev 1} holds then there exists $C>0$ such that, for every $r,s >0$,
\begin{equation}\label{eq rev hold}
	\| f \|_{X^{\infty,2}_r} \le C (1+ r/s)^{d/2} \| f\|_{L^2}, \quad f \in U_s.
\end{equation}
\item If Assumption \ref{asu rev 2} holds then there exists $C>0$ such that, for every $r,s >0$,
\begin{equation}\label{eq grad rev hold}
	\| \nabla f \|_{X^{\infty,2}_r} \le C s^{-1}(1+r/s)^{d/2} \| f \|_{L^2}, \quad f \in U_s.
\end{equation}
\end{enumerate}
\end{theorem}

\begin{remark}\label{rem proj}
	Let $P_{U_s}$ be the orthogonal projection operator on $U_s$. Since $\| P_{U_s} \|_{L^2 \to L^2} = 1$, \eqref{eq rev hold} is equivalent to
	\[ \| P_{U_s}f \|_{X^{\infty,2}_r} \le C (1+r/s)^{d/2} \| f\|_{L^2}, \quad f \in L^2(\bR^d). \]
\end{remark}
\begin{proof}[Proof of Theorem \ref{thm rev hold}]
	Let us commence with the proof of \eqref{eq rev hold}. Let $\{ \tilde{\phi}_{s,n} \}_{n \in \bZ^d}$ be the dual basis to $\{ {\phi}_{s,n} \}_{n \in \bZ^d}$. If $f\in U_s$ then
	\[ f = \sum_{n \in \bZ^d} a_n \phi_{s,n}, \quad a_n \coloneqq \langle f, \tilde{\phi}_{s,n} \rangle, \] and by Lemma \ref{lem rescal norm} we have
	\begin{align*}
		\| f \|_{X^{\infty,2}_r} & = r^{d/2} \| D_r f \|_{X^{\infty,2}} \\
		& = \left\| \sum_{n \in \bZ^d} a_n \phi_{s/r,n}  \right\|_{X^{\infty,2}} \\
		& = \left( \frac{r}{s} \right)^{d/2} \left\| \sum_{n \in \bZ^d} a_n \phi \left( \frac{r}{s} \cdot \, - n \right) \right\|_{X^{\infty,2}} \\
		& = \left( \frac{r}{s} \right)^{d/2} \left\| \left\| \sum_{n \in \bZ^d} a_n \phi \left( \frac{r}{s} (x+y) - n  \right) \mathbbm{1}_{B_1}(y)  \right\|_{L^\infty_y} \right\|_{L^2_x} \\
		& = \left\| \left\| \sum_{n \in \bZ^d} a_n \phi (x+y - n) \mathbbm{1}_{B_{r/s}} (y) \right\|_{L^\infty_y} \right\|_{L^2_x} \\
		& = \left\| \sum_{n \in \bZ^d} a_n T_n \phi  \right\|_{X^{\infty,2}_{r/s}} \\
		& \lesssim \left( 1+ \frac{r}{s} \right)^{d/2} \left\| \sum_{n \in \bZ^d} a_n T_n \phi  \right\|_{X^{\infty,2}}, \numberthis \label{eqal f sum}
	\end{align*} where in the last step we used Lemma \ref{lem rescal norm} and Proposition \ref{prop dil spaces}.

Assume now \eqref{eq cond rev 1}, namely $\phi \in X^{\infty,1}$. Then the conclusion follows from \eqref{eqal f sum} using the equivalent discrete-type norm in \eqref{eq disc norm} (with $Q=[0,1]^d$):
\begin{align*}
	\| f \|_{X^{\infty,2}_r} & \lesssim \left( 1+ \frac{r}{s} \right)^{d/2} \left\| \sum_{n \in \bZ^d} a_n T_n \phi  \right\|_{X^{\infty,2}} \\
	 & \lesssim \left( 1+ \frac{r}{s} \right)^{d/2} \left\| \sum_{n \in \bZ^d} |a_n| \| \phi (k+y-n) \mathbbm{1}_Q \|_{L^\infty_y} \right\|_{\ell^2_k} \\
	 & \lesssim \left( 1+ \frac{r}{s} \right)^{d/2} \left( \sum_{k \in \bZ^d}  \| \phi (k+y) \mathbbm{1}_Q \|_{L^\infty_y} \right) \left( \sum_{n \in \bZ^d} |a_n|^2 \right)^{1/2} \\
	 & \lesssim \left( 1+ \frac{r}{s} \right)^{d/2}\| \phi \|_{X^{\infty,1}} \| f \|_{L^2},
\end{align*} where we used that $\ell^1 * \ell^2 \hookrightarrow \ell^2$ and  $\|  a_n \|_{\ell^2} \lesssim \| f\|_{L^2}$.

Let us assume \eqref{eq cond rev 2} instead. By \eqref{eqal f sum}, it is enough to show that
\[ \left\| \sum_{n \in \bZ^d} a_n T_n \phi  \right\|_{X^{\infty,2}} \lesssim  \| f \|_{L^2}.
\]
Using the embedding in Proposition \ref{immersioni} we obtain
\begin{align*}
	\left\| \sum_{n \in \bZ^d} a_n T_n \phi  \right\|_{X^{\infty,2}} & \lesssim \left\| \sum_{n \in \bZ^d} a_n T_n \phi  \right\|_{H^\alpha_\otimes} \\
	& = \left\| \sum_{n \in \bZ^d} a_n e^{-in\omega} \hat{\phi}(\omega) v^\alpha(\omega) \right\|_{L^2} \\
	&  = \left( \int_{[0,2\pi]^d} \sum_{k \in \bZ^d} | F(\omega) (v^\alpha \hat{\phi})(\omega-2\pi k)|^2 d\omega \right)^{1/2} \\
	& \le \| F \|_{L^2([0,2\pi]^d)}   \left( \esssup_{\omega \in [0,2\pi]} \sum_{k \in \bZ^d} | (v^\alpha \hat{\phi})(\omega-2\pi k)|^2 \right)^{1/2} \\
	& \lesssim \| f \|_{L^2},
\end{align*} where we set $F(\omega) \coloneqq \sum_{n \in \bZ^d} a_n e^{-in\omega}$ (which is a $2\pi$-periodic, square integrable on $[0,2\pi]$, function), and then used \eqref{eq cond rev 2} and
\[ \| F \|_{L^2([0,2\pi]^d)}^2 \asymp \sum_{n \in \bZ^d} |a_n|^2 \asymp \| f \|_{L^2}^2. \]

The proof of \eqref{eq grad rev hold} goes along the same lines after differentiation in the representation $f = \sum_{n \in \bZ^d} a_n \phi_{s,n}$; the details are left to the interested reader.
\end{proof}

\begin{remark}\label{rem cont Us}
	\begin{enumerate}[(i)]
		\item It is easy to realize that if $\phi$ satisfies \eqref{eq cond rev 2} then  $\phi\in H^\alpha_\otimes(\bR^d)$ (it is enough to integrate both sides of \eqref{eq cond rev 2} on $[0,2\pi]$); as a result, if $\alpha>1/2$ then $\phi$ is continuous by Proposition \ref{immersioni}.
		\item If $\phi\in L^2(\bR^d)$ satisfies Assumption \ref{asu rev 2} then $\phi$ has first order partial derivatives locally in $L^\infty$, hence $\phi$ is locally Lipschitz, therefore continuous.
		\item If $\phi\in L^2(\bR^d)$ satisfies the assumption $A$ and $B$ and is continuous, then $U_s \hookrightarrow C(\bR^d)$ since the truncated sums $\sum_{|n|\le N} a_n T_{sn}\phi$ are continuous and \eqref{eq rev hold} shows that convergence in $L^2$ implies convergence in $X^{\infty,2}_r \hookrightarrow L^\infty(\bR^d)$ for functions in $U_s$.
		\item If $s \ll r$ then the occurrence of the factor $r/s$ in \eqref{eq rev hold} can be heuristically explained by the presence of highly oscillating functions in $U_s$, which are not stable under deformations of ``size'' $r$.
	\end{enumerate}
\end{remark}

We are ready to provide deformation sensitivity bounds for functions in $U_s$.

\begin{theorem}\label{thm bound Us}
	Let $\phi \in L^2(\bR^d)\cap C(\bR^d)$ satisfy Assumptions \ref{asu riesz} and \ref{asu rev 1}. There exists a constant $C>0$ such that, for every $\tau \in L^\infty(\bR^d;\bR^d)$ and $s>0$
	\begin{equation}\label{eq bound Us}
		\| F_\tau f \|_{L^2} \le C (1+\|\tau\|_{L^\infty}/s)^{d/2}\| f\|_{L^2}, \quad f \in U_s.
	\end{equation}
\end{theorem}
\begin{proof} The desired estimate follows by a straightforward concatenation of Proposition \ref{maint xopt}, since the assumptions on $\phi$ imply that $U_s \hookrightarrow C(\bR^d)$ (cf.\ Remark \ref{rem cont Us}), and Theorem \ref{thm rev hold} with $r=\| \tau \|_{L^\infty}$.
\end{proof}

\begin{theorem}\label{thm def bound Us}
	Let $\phi \in L^2(\bR^d) $ be such that Assumptions \ref{asu riesz}, \ref{asu rev 1} and \ref{asu rev 2} are satisfied. There exists a constant $C>0$ such that
	\begin{equation}\label{eq def bound Us}
		\| F_\tau f - f \|_{L^2}  \, \le \begin{cases}
			 C (\|\tau\|_{L^\infty}/s) \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \le 1) \\
		C (\|\tau\|_{L^\infty}/s)^{d/2} \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \ge 1)
		\end{cases},
	\end{equation}
	for every $\tau \in L^\infty(\bR^d;\bR^d)$, $s>0$ and $f \in U_s$.
\end{theorem}
\begin{proof}
	Let us consider first the case $\|\tau \|_{L^\infty}/s \le 1$. Combining Proposition \ref{maint grad xopt} with Theorem \ref{thm rev hold} with $r=\|\tau\|_{L^\infty}$ we infer, for $f\in U_s$,
	\begin{align*}
		\| F_\tau f -f \|_{L^2} & \lesssim \|\tau \|_{L^\infty} \| \nabla f \|_{X^{\infty,2}_r} \\
		& \lesssim (\| \tau \|_{L^\infty}/s) (1+\|\tau\|_{L^\infty}/s)^{d/2} \| f \|_{L^2} \\
		& \lesssim (\| \tau \|_{L^\infty}/s) \| f \|_{L^2},
	\end{align*} that is the claim.

The case $\|\tau \|_{L^\infty}/s \ge 1$ can be approached via the triangle inequality, that is \linebreak $\| F_\tau f - f \|_{L^2} \le \|F_\tau f \|_{L^2} + \| f \|_{L^2}$, and Theorem \ref{thm bound Us}.
\end{proof}

As a consequence we deduce immediately the following stability result for any Lipschitz map $\Phi$ from $L^2(\bR^d)$ to a Banach space equipped with a norm $\adm{\cdot}$.

\begin{theorem}\label{thm feat bound us}
	Under the same assumptions of Theorem \ref{thm def bound Us}, there exists a constant $C>0$ such that, for every $\tau \in L^\infty(\bR^d;\bR^d)$, $s>0$,
	\begin{equation}\label{eq def stab phi}
		\adm{\Phi (F_\tau f) - \Phi(f)} \le \begin{cases}
			C{\rm Lip}(\Phi) (\|\tau\|_{L^\infty}/s) \| f \|_{L^2} & (\|\tau\|_{L^\infty}/s \le 1) \\
			C{\rm Lip}(\Phi) (\|\tau\|_{L^\infty}/s)^{d/2} \| f \|_{L^2} & (\|\tau\|_{L^\infty}/s \ge 1)
		\end{cases}, \quad f \in U_s,
	\end{equation}
where $\Phi$ is any Lipschitz map.
\end{theorem}
More generally, the same result holds if $f$ is replaced on the left-hand side by $P_{U_s} f$ for $f \in L^2(\bR^d)$, cf.\ Remark \ref{rem proj}.
\begin{example}\label{rem examples bis}
Taking into account the examples in Example \ref{rem examples} we see that Theorem \ref{thm feat bound us} applies when $U_s$ are approximation spaces of polynomial splines of degree $n\geq 1$, as well of band-limited functions (which can be regarded as splines of infinite order).
\end{example}

We conclude this section by extending the above stability bounds to signal classes with minimal regularity.
In addition to the assumptions of Theorem \ref{thm def bound Us}, we suppose that
 $V_j\coloneqq U_{2^j}$, $j\in\mathbb{Z}$, define a multiresolution approximation of $L^2(\bR^d)$, so that $V_{j+1}\subset V_j$. Let $W_{j+1}$ be the orthogonal complement of $V_{j+1}$ in $V_j$ and $P_{W_j}$ be the corresponding orthogonal projection; for $s\in\mathbb{R}$, the corresponding homogeneous Besov norm \cite[Section 9.2.3]{mallbook} is given by
 \begin{equation}\label{eq besov}
 \|f\|_{\dot{B}^s_{2,1}}=\sum_{j\in\mathbb{Z}}2^{-js}\|P_{W_j}f\|_{L^2}.
 \end{equation}

\begin{theorem}\label{main teo 0} Under the same assumptions of Theorem \ref{thm def bound Us}, suppose in addition that
 $V_j\coloneqq U_{2^j}$, $j\in\mathbb{Z}$, define a multiresolution approximation of $L^2(\bR^d)$.

 There exists $C>0$ such that for every $\tau\in L^\infty(\bR^d;\bR^d)$ and $f\in L^2(\bR^d)$ with $\|f\|_{\dot{B}^{d/2}_{2,1}}<\infty$,
\begin{equation}\label{eq stima dim 1 besov 0}
\adm{\Phi (F_\tau f) - \Phi (f)} \leq C{\rm Lip}(\Phi) (\|\tau\|_{L^\infty}\|f\|_{\dot{B}^{1}_{2,1}} +\|\tau\|_{L^\infty}^{d/2}\|f\|_{\dot{B}^{d/2}_{2,1}}) \qquad d\geq 2
\end{equation}
and
\begin{equation}\label{eq stima dim 1 besov}
\adm{\Phi (F_\tau f) - \Phi (f)} \leq C {\rm Lip}(\Phi) \|\tau\|_{L^\infty}^{1/2}\|f\|_{\dot{B}^{1/2}_{2,1}} \quad d=1,
\end{equation}
where $\Phi$ is any Lipschitz map.
\begin{proof}
We consider the decomposition
\[
f=\sum_{\|\tau\|_{L^\infty}\leq 2^j}P_{W_j} f+ \sum_{2^j<\|\tau\|_{L^\infty}}P_{W_j}f
\]
and apply \eqref{eq def bound Us} to each term, hence we obtain
\begin{equation}\label{eq stima intermedia}
\|F_\tau f-f\|_{L^2}\lesssim \|\tau\|_{L^\infty}\sum_{\|\tau\|_{L^\infty}\leq 2^j} 2^{-j}\|P_{W_j} f\|_{L^2}+\|\tau\|_{L^\infty}^{d/2} \sum_{2^j<\|\tau\|_{L^\infty}}2^{-jd/2}\|P_{W_j}f\|_{L^2},
\end{equation}
which implies the desired result if $d\geq 2$.

For $d=1$ it is sufficient to continue the estimate in \eqref{eq stima intermedia} using
\[
\sum_{\|\tau\|_{L^\infty}\leq 2^j} 2^{-j}\|P_{W_j} f\|_{L^2}\leq \sum_{\|\tau\|_{L^\infty}\leq 2^j} 2^{-j/2}2^{-j/2}\|P_{W_j} f\|_{L^2}\leq \|\tau\|_{L^\infty}^{-1/2}\|f\|_{\dot{B}^{1/2}_{2,1}}.
\]
\end{proof}
\begin{remark}
It is immediate to observe, from the very definition \eqref{eq besov} of the Besov norm, that if $d\geq 2$ and $f\in L^2(\bR^d)$ with $\|f\|_{\dot{B}^{d/2}_{2,1}}<\infty$ then $\|f\|_{\dot{B}^{1}_{2,1}}<\infty$.

Also, observe that even in dimension 1 we have $\adm{\Phi (F_\tau f) - \Phi (f)}=O(\|\tau\|_{L^\infty})$ as $\|\tau\|_{L^\infty}\to 0$ for every fixed $f\in U_s$ and every $s>0$, as a consequence of Theorem \ref{thm feat bound us}. However this asymptotic estimate is not uniform in the ball $\|f\|_{L^2}+\|f\|_{\dot{B}^{1/2}_{2,1}}\leq 1$, and the factor $\|\tau\|^{1/2}_{L^\infty}$ in \eqref{eq stima dim 1 besov} is instead optimal when looking for uniform estimates; see the examples in Section \ref{sec sharp pwr} below. In dimension $d\geq 2$ it follows easily from \eqref{eq stima dim 1 besov 0} that $\adm{\Phi (F_\tau f) - \Phi (f)}=O(\|\tau\|_{L^\infty})$ as $\|\tau\|_{L^\infty}\to 0$ uniformly for $f$ in the ball $\|f\|_{L^2}+\|f\|_{\dot{B}^{d/2}_{2,1}}\leq 1$.
\end{remark}

\end{theorem}

\section{Frequency-modulated deformations}\label{sec freq mod def}

In this section we extend some results proved so far to the class of time-frequency deformation mappings $F_{\tau,\omega}$ associated with distortion functions $\tau\in L^\infty(\bR^d; \bR^d)$, $\omega\in L^\infty(\bR^d;\mathbb{R})$ by setting
\[ F_{\tau,\omega} f(x) \coloneqq e^{i\omega(x)}f(x-\tau(x)),
\]
where $f:\bR^d \to \mathbb{C}$. In case of trivially null distortions we write $F_{0,\omega}$ and $F_{\tau,0}$ with obvious meaning.

While most of the results above can be stated and proved with minor updates for general deformations $F_{\tau,\omega}$, we prefer to offer here a different perspective that allows one to reduce to the results for $F_\tau$ in a straightforward way. Indeed, note that $F_{\tau,\omega} = \FowF_{\tau,0}$ and $F_{\tau,0}$ coincides with the deformation $F_\tau$ considered in the previous sections. Moreover, for every $f \in L^2(\bR^d)$ we have that $\| F_{\tau,\omega} f \|_{L^2} = \|F_{\tau,0} f \|_{L^2}$ for arbitrary measurable $\omega$, and
\[ \| F_{\tau,\omega} f - f \|_{L^2} \le \| F_{\tau,\omega} f - F_{\tau,0} f \|_{L^2} + \| F_{\tau,0} f - f \|_{L^2}. \] The second addend is already covered, while for the first one we have
\[ \| F_{\tau,\omega} f - F_{\tau,0} f \|_{L^2} \le \| e^{i\omega}-1 \|_{L^\infty} \|F_{\tau,0} f\|_{L^2} \le \| \omega \|_{L^\infty} \| F_{\tau,0} f \|_{L^2}. \]
As a result, the bounds in Propositions \ref{maint xopt} and \ref{maint grad xopt} generalize as follow.
\begin{theorem}\label{thm gen xopt} We have
	\begin{equation}\label{eq gen xopt bound}
		 \|F_{\tau,\omega} f \|_{L^2} \le \|f \|_{X^{\infty,2}_r}, \quad r=\| \tau\|_{L^\infty},
	\end{equation}
	 for every $f \in X^{\infty,2}_r \cap C(\bR^d)$ and $\tau \in L^\infty(\bR^d;\bR^d)$, $\omega \in L^\infty(\bR^d;\mathbb{R})$. \par
	 Moreover, there exists $C>0$ such that
\begin{equation}\label{eq maint grad gen}
	\| F_{\tau,\omega} f - f\|_{L^2} \le C(\| \tau \|_{L^\infty} \| \nabla f \|_{X^{\infty,2}_r} + \|\omega \|_{L^\infty}\|f\|_{X^{\infty,2}_r}), \quad r=\| \tau\|_{L^\infty},
\end{equation}
for every $\tau \in L^\infty(\bR^d;\bR^d)$,  $\omega \in L^\infty(\bR^d;\mathbb{R})$ and $f \in X^{\infty,2}_r$ with $\| \nabla f \|_{X^{\infty,2}_r}<\infty$.
\end{theorem}

With the same arguments of the proofs of Theorems \ref{thm def bound Us} and  \ref{thm feat bound us}, using the bounds in Theorem \ref{thm gen xopt} whenever appropriate, we obtain the following generalization.
\begin{theorem}
	Let $\phi \in L^2(\bR^d)$ be such that Assumptions \ref{asu riesz}, \ref{asu rev 1} and \ref{asu rev 2} in Section \ref{sec mult} hold. There exists a constant $C>0$ such that
\begin{equation}
	\| F_{\tau,\omega} f - f \|_{L^2}  \, \le \begin{cases}
		C (\|\tau\|_{L^\infty}/s+\|\omega\|_{L^\infty}) \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \le 1) \\
		C (\|\tau\|_{L^\infty}/s)^{d/2} \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \ge 1)
	\end{cases},
\end{equation}
for every $s>0$, $f \in U_s$ and $\tau \in L^\infty(\bR^d;\bR^d)$,  $\omega \in L^\infty(\bR^d;\mathbb{R})$. \par
As a consequence, the following bound holds for any Lipschitz map $\Phi$:
\begin{equation}
\adm{\Phi(F_{\tau,\omega} f) - \Phi(f)} \, \le \begin{cases}
		C{\rm Lip}(\Phi) (\|\tau\|_{L^\infty}/s+\|\omega\|_{L^\infty}) \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \le 1) \\
		C{\rm Lip}(\Phi) (\|\tau\|_{L^\infty}/s)^{d/2} \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \ge 1)
	\end{cases}.
\end{equation}
\end{theorem}

We remark that for band-limited functions $U_s = \mathrm{PW}_R$ with $s=\pi/R$ and in the relevant case where $R\|\tau \|_{L^\infty} \le 1$ we recover the same bounds proved in \cite{wiat paper} without extra regularity conditions on $\tau$ or $\omega$.

Similarly, one could generalize the estimates in Besov spaces of the previous section.

\section{Dimensionally consistent estimates for scattering networks}\label{sec dim est}
In this section we discuss the dimensional consistency (i.e.\ the independence of the choice of the unit of measurement for the space variable $x\in\bR^d$) of some estimates proved so far. For the sake of concreteness we focus here on the case of generalized scattering networks \cite{mall cpam,wiat paper}, whose architecture was recalled in Section \ref{sec a brief review}. We then use the corresponding notation and denote by $\Phi=\Phi_\Omega$ the feature extractor.

Let us clarify that dimensional consistency does not entail scale invariance or covariance properties for $\Phi$ (to be precise, $\Phi D_\mu = \Phi $ or $D_\mu \Phi = \Phi D_\mu$ respectively for $\mu>0$). Rather, we say that an estimate for a \textit{class} of generalized scattering networks $\Phi$ is dimensionally consistent if both sides of the estimate rescale in the same way when the input $f$ is replaced by $D_\mu f$, $\mu>0$, the deformation $\tau$ is replaced by $\mu^{-1}D_\mu \tau$ and the feature extractor is replaced by $\Phi_\mu$, the latter being constructed exactly as $\Phi$ but every filter $g$ is replaced by $\mu^d D_\mu g$ - including the pooling ones, while retaining the pointwise nonlinearities and the pooling factors\footnote{It is of course assumed that if $\Phi$ belongs to that class of networks then the same holds for $\Phi_\mu$.}.

Such a condition is clearly motivated by the formula
\[ D_\mu f * \mu^d D_\mu g = D_\mu (f*g). \] Observe that if $f\in U_s \subset L^2(\bR^d)$, $s>0$, then $D_\mu f \in U_{s/\mu}$ (see Section \ref{sec mult} for the notation). Moreover, using the formulas
		\[ D_\mu F_\tau f = F_{\mu^{-1}D_\mu \tau} D_\mu f,  \]
		\[ \Phi_\mu (F_{\mu^{-1}D_\mu \tau} D_\mu f) = D_\mu \Phi (F_\tau f). \]
it is easy to see that the estimates in Theorem \ref{thm feat bound us} are dimensionally consistent as specified above.

The admissibility condition \eqref{eq adm cond}
is dimensionally consistent too, because the upper frame bounds $B_n$ for the filters $g_{\lambda_n}$ in Section \ref{sec a brief review} remain the same if the filters $g_{\lambda_n}$ are replaced by $\mu^d D_\mu g_{\lambda_n}$, $\mu>0$ and the (convolutional) pooling operators keep the same Lipschitz constants. In fact, the frame condition in Section \ref{sec a brief review} is equivalent to
\[
A\leq \sum_{\lambda_n\in\Lambda_n}|\widehat{g_{\lambda_n}}(\omega)|^2\leq B, \qquad \text{a.e. } \omega\in\bR^d,
\]
and the $L^2\to L^2$ operator norm of a convolution operator $f\mapsto f\ast g$ is $\|\hat{g}\|_{L^\infty}$.

It is also easy to see that, in general, dimensionally consistency demands for a special form for the estimates; for example, if the following estimate
\[
\adm{\Phi(F_\tau f)-\Phi(f)}\leq C({\rm Lip}(\Phi),\|\tau\|_{L^\infty},s)\|f\|_{L^2},\quad f\in U_s,
\]
applies to some class of scattering networks, the \textit{best constant} $C({\rm Lip}(\Phi),\|\tau\|_{L^\infty},s)$ must have the special form
$C({\rm Lip}(\Phi),\|\tau\|_{L^\infty},s)=\varphi({\rm Lip}(\Phi),\|\tau\|_{L^\infty}/s)$ for some function $\varphi\geq 0$ (observe that ${\rm Lip}(\Phi_\mu)={\rm Lip}(\Phi)$).
 It is interesting to observe that estimates for this type, even for a fixed scattering network $\Phi$, cannot hold in general with a better bound for $\adm{\Phi(F_\tau f)-\Phi(f)}$ than that which pertains to $\| F_\tau f - f \|_{L^2}$.
\begin{proposition}\label{pro_optimal}
	Let $\chi_0$ be the root output-generating filter of a module-sequence $\Omega$, and assume that $\chi_0 \ge 0$ and $\| \chi_0 \|_{L^1} = 1$. Let $\Phi_\Omega^0 =f*\chi_0$ be the corresponding root feature extractor and assume that for all $s>0$ the estimate
	\begin{equation}\label{eq outp gen 1}
		\| \Phi^0_\Omega(F_\tau f) - \Phi^0_\Omega(f) \|_{L^2} \le \varphi(\| \tau \|_{L^\infty}/s) \| f \|_{L^2}
	\end{equation} holds for every $f \in U_s$ and $\tau \in L^\infty(\bR^d;\bR^d)$, and some function $\varphi >0$. Then
\begin{equation}\label{eq outp gen 2}
	\| F_\tau f - f \|_{L^2} \le \varphi(\|\tau\|_{L^\infty}/s) \|f \|_{L^2}, \quad f \in U_s.
\end{equation}
\end{proposition}
\begin{proof}
	Fix $\mu>0$. We have already observed that
	\[ D_\mu f * \chi_0 = D_\mu (f*\mu^{-d}D_{1/\mu}\chi_0), \quad F_{\mu^{-1}D_\mu \tau}D_\mu f = D_\mu F_\tau f, \quad f \in L^2(\bR^d). \] Therefore, by the definition of $\Phi^0_\Omega$ and the assumption \eqref{eq outp gen 1} with $D_\mu f\in U_{s/\mu}$, $\mu^{-1} D_\mu \tau$ and $s/\mu$, in place of $f$, $\tau$ and $s$ respectively, we obtain
	\[ \| (F_\tau f - f)*\mu^{-d}D_{1/\mu}\chi_0\|_{L^2} \le \varphi(\|\tau\|_{L^\infty}/s)\| f \|_{L^2}, \quad f \in U_s.\] Now,
	\[
	(F_\tau f - f)*\mu^{-1}D_{1/\mu}\chi_0 \to F_\tau f - f
	\]
	 in $L^2(\bR^d)$ as $\mu \to 0$ - cf.\ \cite[Theorem 8.14(a)]{folland}. Hence the claim follows.
\end{proof}

\section{Sharpness of the estimates}\label{sec sharp pwr}
We now study the problem of the sharpness of some estimates proved so far, focusing in particular on the case of band-limited functions and for wavelet scattering networks.

For $R>0$ consider the space of band-limited functions
\[ \mathrm{PW}_R \coloneqq \{ f \in L^2(\bR^d) : \mathrm{supp} \hat{f} \subset [-R,R]^d \}. \]
We already commented in Example \ref{rem examples} that such a space of low-frequency functions can be equivalently designed as a multiresolution space; precisely, we have $\mathrm{PW}_R = U_s$ with $s=\pi / R$ after choosing the normalized low-pass sinc filter $\phi=\phi_0 \otimes \cdots \otimes \phi_0$ ($d$ times), with $\phi_0(t) = \pi^{-1/2}\sin t/t$, $t \in \mathbb{R}$, which satisfies Assumptions \ref{asu riesz}, \ref{asu rev 1}, \ref{asu rev 2}.

Theorems \ref{thm bound Us} and \ref{thm def bound Us} above thus cover the case of band-limited approximations. Precisely, \eqref{eq bound Us} now reads
\begin{equation}\label{eq bound pwr} \| F_\tau f \|_{L^2} \le C (1+R\|\tau\|_{L^\infty})^{d/2}\| f\|_{L^2}, \quad f \in \mathrm{PW}_R, \end{equation} while \eqref{eq def bound Us} becomes
\begin{equation}\label{eq def bound pwr} \| F_\tau f - f \|_{L^2}  \, \le \begin{cases}
		C R\|\tau\|_{L^\infty} \|f \|_{L^2} & (R\| \tau \|_{L^\infty}\le 1) \\
		C (R\|\tau\|_{L^\infty})^{d/2} \|f \|_{L^2} & (R\| \tau \|_{L^\infty} \ge 1)
	\end{cases}, \quad  f \in \mathrm{PW}_R. \end{equation}
We claim that the exponent $d/2$ appearing in the previous estimates is optimal. For what concerns \eqref{eq bound pwr}, it suffices to consider $f_R \in \mathrm{PW}_R$ given by $f_R=R^{d/2} D_R \phi$, so that $\| f_R\|_{L^2} = 1$ and $\widehat{f_R} = (\pi/R)^{d/2} \mathbbm{1}_{[-R,R]^d}$. Now, for $K>0$ set
\[ \tau(x) = \begin{cases}
	x & (|x|\le K) \\ 0 & (|x|>K)
\end{cases}, \] so that $\| \tau \|_{L^\infty} = K$. Then, for $|x|\le K$ we have
\[ F_\tau f_R (x) = f_R(0)= (R/\pi)^{d/2}, \] and thus
\[
\| F_\tau f_R \|_{L^2} \gtrsim (R \| \tau \|_{L^\infty})^{d/2}.
\]
By the triangle inequality we also deduce
\begin{equation}\label{stima dal basso}
	\| F_\tau f_R - f_R \|_{L^2}  \gtrsim (R \| \tau \|_{L^\infty})^{d/2},\quad  R \| \tau \|_{L^\infty}\gg 1,
\end{equation}which shows the sharpness of the exponent $d/2$ in \eqref{eq def bound pwr} as well.

Concerning the sharpness of the estimate \eqref{eq def bound pwr} in the regime $R\| \tau \|_{L^\infty}\ll 1$ we see that if $f=f_R$ as above and $\tau(x)=(c,0,\ldots,0)\in\bR^d$ (constant), for $|c|R$ small enough we have
\[
\|F_\tau f_R-f_R\|^2_{L^2}=\Big(\frac{1}{2R}\Big)^d\int_{[-R,R]^d} |e^{-ic\omega_1}-1|^2\, d\omega\gtrsim R^{-d}\int_{[-R,R]^d}(c\omega_1)^2\, d\omega\gtrsim (cR)^2.
\]

\textbf{Sharpness of \eqref{eq def bound pwr} in the regime $\| \tau \|_{L^\infty}/s\gg 1$}.
As a consequence of \eqref{stima dal basso} we see that, if $\Phi$ is any Lipschitz map preserving the energy, say $\adm{\Phi(f)}\asymp \|f\|_{L^2}$, then for $f_R$ and $\tau$ as above,
\[
\adm{\Phi(F_\tau f_R) - \Phi(f_R)}   \gtrsim (R \| \tau \|_{L^\infty})^{d/2},\quad  R \| \tau \|_{L^\infty}\gg 1.
\]

\textbf{Sharpness of \eqref{eq def bound pwr} in the regime $\| \tau \|_{L^\infty}/s\ll 1$}. This is more interesting and we first discuss the idea of the argument. Here we assume that $\Phi$ is a wavelet scattering network (or a generalized scattering network with wavelet filters in the first layer).  Consider, in dimension 1, a tent signal $f(x)=s^{-1/2}\max\{0,1-|x/s|\}$, $s>0$, as in Figure \ref{fig loc}.

\begin{figure}[h]
\centering
\captionsetup{width=0.95\linewidth}
\begin{tikzpicture} \begin{axis}[samples=499,xmin=-5, xmax=5,
      ytick=\empty,
      xtick=\empty,
    ymin=-0.7, ymax=2.5,
    axis lines=center,
    axis on top=true,
    domain=-3:3,
    xlabel=$x$,]
\addplot [jump mark left,no marks,blue,thick] coordinates {(0,-0.5) (1,0.5) (2,-0.5) (3,0.5) (4,-0.5)};

\draw [dashed, blue] (axis cs:1,-0.5) -- (axis cs:1,0.5);
\draw [dashed, blue] (axis cs:2,-0.5) -- (axis cs:2,0.5);
\draw [dashed, blue] (axis cs:3,-0.5) -- (axis cs:3,0.5);
\addplot [no marks,red,thick] coordinates {(-4,0) (0,2) (4,0)};

\draw (axis cs:4,0) node[below ]{$s$} ;
\draw (axis cs:-4,0) node[below ]{$-s$} ;

\draw (axis cs:0,0.5) node[ left]{$\frac{s^{-1/2}}{N}$} ;
\draw (axis cs:0,2) node[   left]{$s^{-1/2}$} ;

\draw (axis cs:3.5,1) node[blue]{$F_\tau f - f$} ;
\draw (axis cs:1.5,1.5) node[above,red]{$f$} ;
\draw (axis cs:1,0) node[below right]{$\frac{s}{N}$} ;
\end{axis}
\end{tikzpicture}
\caption{A signal $f$ localized in frequency in a ball $|\omega|\lesssim 1/s$ and the error $F_\tau f-f$, localized in frequency where $|\omega|\approx N/s$ ($N=4$ in the figure). Here $\|\tau\|_{L^\infty}=s/N$.}
\label{fig loc}
\end{figure}

Hence, $f$ is essentially band-limited in a ball $|\omega|\lesssim s^{-1}$. For any $N\geq 1$, consider a partition of the real line by intervals $I_k \coloneqq [ks/N,(k+1)s/N]$, $k\in\mathbb{Z}$, and define
\[
\tau(x)=\begin{cases}
-s/N,\ & (x\in I_k, \, k\geq0\ \textrm{even})\\
s/N,\ & ( x\in I_k, \, k\geq 1\ \textrm{odd})\\
0\ & (x<0).
\end{cases}
\]
Then the function $F_\tau f -f$ will be localized in frequency where $|\omega|\approx (s/N)^{-1}$, hence far away from the spectrum of $f$ if $N$ is large. Now, by the very architecture of \textit{wavelet} scattering networks, if $f$ and $g$ are two functions localized in frequency in the union of different dyadic bands we have $\Phi(f+g)\approx \Phi(f)+\Phi(g)$ (with equality if the filters are themselves perfectly supported each in a band, without overlaps). Hence, if $\Phi$ is energy preserving,
\[
\adm{\Phi(F_\tau f)-\Phi(f)}\approx \adm{\Phi(F_\tau f-f)}\gtrsim \|F_\tau f-f\|_{L^2}\gtrsim 1/N=\|\tau\|_{L^\infty}/s.
\]
In order to make the previous argument rigorous, we have to suitably estimate the tails (in frequency) of the functions involved. Precisely, we consider a scattering network $\Phi$: \begin{itemize}
\item with wavelet filters of Shannon type in the first layer; in particular, let the low-pass filter (i.e.\ the root output generating filter) be supported in frequency where $|\omega|\leq 2^{-J}$ - see Figure \ref{fig wavel};
\item that is Lipschitz and energy preserving in the sense that $\adm{\Phi(f)}\asymp \|f\|_{L^2}$.
\end{itemize}

\begin{figure}[h]
\centering
\captionsetup{width=0.95\linewidth}
\begin{tikzpicture} \begin{axis}[samples=499,xmin=-10, xmax=10, xscale=1.5,
      ytick=\empty,
      xtick=\empty,
    ymin=-0.2, ymax=1.5,
    axis lines=center,
    axis on top=true,
    xlabel=$\omega$,]
\addplot [jump mark left,no marks,blue,thick] coordinates {(-8,1) (8,1)};
\addplot [jump mark left,no marks,violet,thick] coordinates {(-4,1) (4,1)};
\addplot [jump mark left,no marks,green,thick] coordinates {(-2,1) (2,1)};
\addplot [jump mark left,no marks,black,thick] coordinates {(-1,1) (1,1)};

\draw [dashed, black] (axis cs:1,1) -- (axis cs:1,0);
\draw [dashed, green] (axis cs:2,1) -- (axis cs:2,0);
\draw [dashed, violet] (axis cs:4,1) -- (axis cs:4,0);
\draw [dashed, blue] (axis cs:8,1) -- (axis cs:8,0);
\draw [dashed, black] (axis cs:-1,1) -- (axis cs:-1,0);
\draw [dashed, green] (axis cs:-2,1) -- (axis cs:-2,0);
\draw [dashed, violet] (axis cs:-4,1) -- (axis cs:-4,0);
\draw [dashed, blue] (axis cs:-8,1) -- (axis cs:-8,0);

\draw (axis cs:1,0) node[below ]{$2^{-J}$} ;

\end{axis}
\end{tikzpicture}
\caption{Shannon Littlewood-Paley wavelet filters in the frequency domain. The low-pass filter is supported in frequency where $|\omega|\leq 2^{-J}$.}
\label{fig wavel}
\end{figure}

Let $f$ and $\tau$ be as above, and fix $N\geq 2$ even such that $\|\tau\|_{L^\infty}=s/N\leq (1/2)\cdot2^{J}$. Moreover, for any $s,N$, let $j\in\mathbb{Z}$ be such that
\[
2^{-j}\leq\frac{1}{2}\cdot\frac{N}{s}< 2^{-j+1}.
\]
Observe in particular that $2^{-j}\geq 2^{-J}$. Consider $\psi(x)=-\mathbbm{1}_{[0,1)}+ \mathbbm{1}_{[1,2)}$.  We have \[
F_\tau f(x) -f(x)= \frac{1}{s^{1/2}N}\sum_{k=0}^{N/2-1} T_{\frac{2s}{N}k} \psi\Big(\frac{N}{s}x\Big),
\] hence
\begin{align*}
\mathcal{F}(F_\tau f -f)(\omega)&=\frac{1}{s^{1/2}N}\sum_{k=0}^{N/2-1} e^{-i\frac{2s}{N}k\omega}\frac{s}{N}\widehat{\psi}\Big(\frac{s}{N} \omega\Big)\\
&=\frac{s^{1/2}}{N^2}e^{-i\frac{s\omega}{2}+i\frac{s\omega}{N}}\frac{\sin\frac{s\omega}{2}}{\sin\frac{s\omega}{N}}\widehat{\psi}\Big(\frac{s}{N} \omega\Big).
\end{align*}
It is easy to check that $|\widehat{\psi}(\omega)|\lesssim|\omega|$ ($\psi$ is band-pass) and\footnote{Note that the hidden constants in the symbols $\lesssim$ and $\gtrsim$ are always independent of $s$ and $N$.}, if $|\omega|\leq \frac{1}{2}\cdot\frac{N}{s}$, $|\sin\frac{s\omega}{N}|\gtrsim \frac{s}{N}|\omega|$.
As a result, if $|\omega|\leq 2^{-j}$ we infer
\begin{equation}\label{eq low pass est}
|\mathcal{F}(F_\tau f -f)(\omega)|\lesssim \frac{s^{1/2}}{N^2}\cdot\frac{N}{s|\omega|}\cdot \frac{s|\omega|}{N}=\frac{s^{1/2}}{N^2},\qquad |\omega|\leq 2^{-j}.
\end{equation}
Similarly, a scaling argument and a trivial estimate for the squared sinc function show that
\begin{equation}\label{eq high pass est}
|\widehat{f}(\omega)|\lesssim \frac{1}{s^{3/2}\omega^2},\qquad \omega\not=0.
\end{equation}
Let us now denote by $f_{\leq 2^{-j}}$ and  $f_{\geq 2^{-j}}$ the orthogonal projection of $f$ on the subspace of $L^2$ of functions whose Fourier transform is supported where $|\omega|\leq 2^{-j}$ and $|\omega|\geq 2^{-j}$, respectively, and similarly set $g_{\leq 2^{-j}}$ and  $g_{\geq 2^{-j}}$ for the two projections of $F_\tau f-f$.
From the estimates \eqref{eq low pass est} and \eqref{eq high pass est} we thus infer
\begin{equation}\label{eq sarp1 prima}
\|g_{\leq 2^{-j}}\|_{L^2}  =(2\pi)^{-d/2}\left( \int_{|\omega|\leq 2^{-j}}|\mathcal{F}(F_\tau f -f)(\omega)|^2\, d\omega \right)^{1/2} \\ \lesssim \frac{s^{1/2}}{N^2}2^{-j/2} \lesssim N^{-3/2},
\end{equation}
and
\begin{equation}\label{eq sarp1 seconda}
\|f_{\geq 2^{-j}}\|_{L^2}=(2\pi)^{-d/2} \left( \int_{|\omega|\geq 2^{-j}}|\widehat{f}(\omega)|^2\, d\omega \right)^{1/2} \lesssim \frac{1}{s^{3/2}}\left(\int_{|\omega|\geq 2^{-j}}\frac{1}{\omega^4}\,d\omega \right)^{1/2}\lesssim N^{-3/2}.
\end{equation}
Observe also that $\|F_\tau f - f\|_{L^2}=1/N$ and therefore, if $N$ is large enough,
\begin{equation}\label{eq sarp2}
\|g_{\geq 2^{-j}}\|_{L^2} =(\|F_\tau f - f\|^2_{L^2}-\|g_{\leq 2^{-j}}\|^2_{L^2})^{1/2}\gtrsim N^{-1}.
\end{equation}
By the assumed structure of the first layer and the position of the frequency supports of the functions $f_{\leq 2^{-j}}$, $f_{\geq 2^{-j}}$ , $g_{\leq 2^{-j}}$ and  $g_{\geq 2^{-j}}$ we see that
\begin{align*}
\adm{\Phi(F_\tau f)-\Phi(f)} & =  \adm{\Phi(f_{\leq 2^{-j}}+f_{\geq 2^{-j}}+g_{\leq 2^{-j}}+g_{\geq 2^{-j}})-\Phi(f_{\leq 2^{-j}}+f_{\geq 2^{-j}}) }
\\
& = \adm{\Phi(f_{\leq 2^{-j}}+g_{\leq 2^{-j}})+\Phi(f_{\geq 2^{-j}}+g_{\geq 2^{-j}}) -\Phi(f_{\leq 2^{-j}})-\Phi(f_{\geq 2^{-j}})}
\\
& \geq  \adm{\Phi(g_{\geq 2^{-j}})}-\adm{\Phi(f_{\leq 2^{-j}}+g_{\leq 2^{-j}})-\Phi(f_{\leq 2^{-j}})} \\&  \pushright{ -\adm{\Phi(f_{\geq 2^{-j}}+g_{\geq 2^{-j}})-\Phi(g_{\geq 2^{-j}})}-\adm{\Phi(f_{\geq 2^{-j}})}.}
\end{align*}
Recall that $\Phi$ preserves the energy and is Lipschitz by assumption; hence, using \eqref{eq sarp1 prima}, \eqref{eq sarp1 seconda} and \eqref{eq sarp2} we deduce that
\[
\adm{\Phi(F_\tau f)-\Phi(f)}\gtrsim 1/ N=\|\tau\|_{L^\infty}/s.
\]
as desired. Numerical evidences of this asymptotic behaviour as $\|\tau\|_{L^\infty}/s$ is small will be presented in Section \ref{sec sim}.

\section{Random deformations}\label{sec random}
We now model the deformation $\tau(x)$ as a measurable random field, i.e.\ $\tau(x)=\tau(x,\omega)$ depends on an additional variable\footnote{In this section we do not consider frequency-modulated deformations, nor we use the notation $\omega$ for the frequency, hence there is not risk of confusion with the notation of previous sections.} $\omega \in \mathcal{U}$, where the sample space $\mathcal{U}$ is equipped with a probability measure $\mathbb{P}$, and the function $\tau(x,\omega)$ is jointly measurable (see for instance \cite[Chapter 3]{gihman} for further details).

It is easy to realize that the results of the previous sections hold for almost every realization of $\tau(x)$ if, e.g., $\|\tau\|_{L^\infty}<\infty$, which must be intended hereinafter as the essential supremum jointly in $x,\omega$. However, it turns out that some results hold, in fact, in a \textit{maximal} sense\footnote{Actually, we could equivalently reformulate the main estimates of the previous sections as results for the maximal operators $\sup_{|y|\leq r}|f(x-y)|$ and $\sup_{|y|\leq r}|f(x-y)-f(x)|$. However, the above presentation in terms of their linearized versions $F_\tau$ and $F_\tau-I$ seems closer to the spirit of the intended  applications.}. Precisely, an inspection of the proof of the formula \eqref{eq xopt bound} shows that we have
\begin{equation}\label{eq xopt bound max}
		 \| \| F_\tau f \|_{L^\infty(\mathcal{U})} \|_{L^2} \le \|f \|_{X^{\infty,2}_r}, \quad r=\| \tau\|_{L^\infty},
	\end{equation}
and similarly \eqref{eq maint grad xopt} becomes
\begin{equation}\label{eq maint grad xopt max}
	\|\|F_\tau f-f \|_{L^\infty(\mathcal{U})}\|_{L^2}\le C \|\tau\|_{L^\infty} \|\nabla f \|_{X^{\infty,2}_r}, \quad r=\|\tau\|_{L^\infty}.
\end{equation}
As a consequence, under the assumptions of Theorem \ref{thm def bound Us} we have, for $f\in U_s$,
	\begin{equation}\label{eq def bound Us max}
		\|\|F_\tau f-f\|_{L^\infty(\mathcal{U})}\|_{L^2}  \, \le \begin{cases}
			 C (\|\tau\|_{L^\infty}/s) \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \le 1) \\
		C (\|\tau\|_{L^\infty}/s)^{d/2} \|f \|_{L^2} & (\| \tau \|_{L^\infty}/s \ge 1)
		\end{cases},
	\end{equation}
	while arguing as in the proof of Theorem \ref{main teo 0} we get
	\begin{equation}\label{eq 4 star max}
\|\|F_\tau f-f\|_{L^\infty(\mathcal{U})}\|_{L^2} \leq C(\|\tau\|_{L^\infty}\|f\|_{\dot{B}^{1}_{2,1}} +\|\tau\|_{L^\infty}^{d/2}\|f\|_{\dot{B}^{d/2}_{2,1}}), \qquad d\geq 2,
\end{equation}
and
\begin{equation}\label{eq 5 star max}
\|\|F_\tau f-f\|_{L^\infty(\mathcal{U})}\|_{L^2}\leq C \|\tau\|_{L^\infty}^{1/2}\|f\|_{\dot{B}^{1/2}_{2,1}}, \quad d=1.
\end{equation}
We are now ready to state our result concerning the robustness in mean of the feature extractor under random deformations.
\begin{theorem}\label{teo random} Under the assumption \ref{asu riesz}, \ref{asu rev 1} and \ref{asu rev 2} in Section \ref{sec mult}, there exists a constant $C>0$ such that, for every $s>0$ and $f\in U_s$, and any Lipschitz map $\Phi$,
\begin{equation}\label{eq stima random 1}
\mathbb{E} \adm{\Phi(F_\tau f)-\Phi(f)}^2\leq C{\rm Lip}(\Phi)^2 \mathbb{E}[(|\tau|/s)^2+(|\tau|/s)^d]\|f\|^2_{L^2},\quad d\geq 2,
\end{equation}
and
\begin{equation}\label{eq stima random 2}
\mathbb{E} \adm{\Phi(F_\tau f)-\Phi(f)}^2\leq C{\rm Lip}(\Phi)^2 \mathbb{E}[ \min\{(|\tau|/s)^2,(|\tau|/s)^d\}]|f\|^2_{L^2}, \quad d=1,
\end{equation} for every measurable random function $\tau$ such that the random variables $|\tau(x)|$, $x \in \bR^d$, are identically distributed and the above moments are finite.

Moreover, if the spaces $U_{2^j}$, $j\in\mathbb{Z}$, define a multiresolution approximation of $L^2(\bR^d)$, for the same deformations $\tau(x)$ and every $f\in L^2(\bR^d)$ with $\|f\|_{\dot{B}^{d/2}_{2,1}}  <\infty$ we have
\begin{equation}\label{eq 6 star max}
\mathbb{E} \adm{\Phi(F_\tau f)-\Phi(f)}^2\leq C{\rm Lip}(\Phi)^2 (\mathbb{E}[|\tau|^2] \|f\|^2_{\dot{B}^{1}_{2,1}} +\mathbb{E}[|\tau|^d]\|f\|^2_{\dot{B}^{d/2}_{2,1}}) \qquad d\geq 2
\end{equation}
and
\begin{equation}\label{eq 7 star max}
\mathbb{E} \adm{\Phi(F_\tau f)-\Phi(f)}^2 \leq C{\rm Lip}(\Phi)^2 \mathbb{E}[|\tau|]\|f\|^2_{\dot{B}^{1/2}_{2,1}} \quad d=1.
\end{equation}
\end{theorem}
For the sake of brevity, we wrote $\mathbb{E}[|\tau|^2]$ in place of $\mathbb{E}[|\tau(x)|^2]$, and similarly for the other moments, since the variables $|\tau(x)|$, $x\in \bR^d$, are assumed to be identically distributed. However, observe that the field $\tau(x)$ is not assumed to be bounded.
\begin{proof}[Proof of Theorem \ref{teo random}]
Let us prove \eqref{eq stima random 1} and \eqref{eq stima random 2} first. In view of the Lipschitz property satisfied by $\Phi$ it suffices to prove a similar bound for $\mathbb{E} \|F_\tau f-f\|^2_{L^2}$. Let us set
\[ \tau_j(x) \coloneqq \begin{cases} \tau(x) & (2^{j-1}<|\tau(x)|\leq 2^j) \\ 0 & (\text{otherwise}) \end{cases}, \quad j \in \mathbb{Z}. \] Then we can write
\begin{align*}
\|F_\tau f-f\|^2_{L^2}&=\sum_{j\in\mathbb{Z}} \int_{\bR^d} |F_{\tau_j}f(x)-f(x)|^2 \mathbbm{1}_{\{2^{j-1}<|\tau|\leq 2^j\}}(x)\, dx\\
&\leq \sum_{j\in\mathbb{Z}} \int_{\bR^d} \mathbbm{1}_{\{2^{j-1}<|\tau|\leq 2^j\}}(x) \| F_{\tau_j}f(x)-f(x) \|^2_{L^\infty(\mathcal{U})} \, dx.
\end{align*}
Taking the expectation and setting $p_j=\mathbb{P}(\{2^{j-1}<|\tau(x)|\leq 2^j\})$ (note that $p_j$ is independent of $x$) we get
\[
\mathbb{E} \|F_\tau f-f\|^2_{L^2}\leq \sum_{j\in\mathbb{Z}} p_j \| \| F_{\tau_j}f-f\|_{L^\infty(\mathcal{U})} \|_{L^2}^2.
\]
We use the estimate \eqref{eq def bound Us max} to bound each term and we obtain
\[
\mathbb{E} \|F_\tau f-f\|^2_{L^2}\lesssim \left( \sum_{2^j\leq s} p_j (2^j/s)^2 +  \sum_{s<2^j} p_j (2^j/s)^d \right) \|f\|^2_{L^2},\quad f\in U_s.
\]
We now observe that, for every $x\in\bR^d$,
\[
\sum_{2^j\leq s} p_j (2^j/s)^2 = \sum_{2^j\leq s} \mathbb{E}[(2^j/s)^2\mathbbm{1}_{\{2^{j-1}<|\tau(x)|\leq 2^j\}}] \lesssim \mathbb{E}[ (|\tau(x)|/s)^2\mathbbm{1}_{\{|\tau(x)|/s\leq 1\}}]
\]
and similarly
\begin{align*}
 \sum_{s<2^j} p_j (2^j/s)^d &\lesssim \mathbb{E}[(|\tau(x)|/s)^d\mathbbm{1}_{\{|\tau(x)|/s> 1/2\}}]\\
 &\lesssim \mathbb{E}[ (|\tau(x)|/s)^2\mathbbm{1}_{\{1/2<|\tau(x)|/s\leq 1\}}+(|\tau(x)|/s)^d\mathbbm{1}_{\{|\tau(x)|/s> 1\}}].
\end{align*}
Hence we have proved the estimate
\[
\mathbb{E} \|F_\tau f-f\|^2_{L^2}\lesssim \mathbb{E}[ (|\tau(x)|/s)^2\mathbbm{1}_{\{|\tau(x)|/s\leq 1\}}+(|\tau(x)|/s)^d\mathbbm{1}_{\{|\tau(x)|/s> 1\}}]\|f\|^2_{L^2},
\]
which gives \eqref{eq stima random 1} and \eqref{eq stima random 2}.

Similar arguments lead to the proof of \eqref{eq 6 star max} and \eqref{eq 7 star max}, now using \eqref{eq 4 star max} and \eqref{eq 5 star max}.
\end{proof}

\section{Some numerical evidences}\label{sec sim}
In this section we report on the results of numerical tests. The primary purpose here is to provide a concrete illustration of the previous results by means of simple examples.
Our analysis was run using MATLAB\footnote{MATLAB and Wavelet Toolbox Release 2021a, The MathWorks, Inc., Natick, Massachusetts, United States.} for signal design and random simulations, and R\footnote{R Core Team (2019). R: A
  language and environment
  for statistical
  computing. R Foundation
  for Statistical
  Computing, Vienna,
  Austria. URL
  https://www.R-project.org/.} for regression.

Consider the multirisolution approximation $V_j$, $j\in\mathbb{Z}$, of $L^2(\mathbb{R})$ given by the linear splines; hence the Riesz basis of $V_0$ is given by $\{\phi(x-n)\}_{n\in\mathbb{Z}}$, with $\phi(x)=\max\{0,1-|x|\}$ \cite[Section 7.1.1]{mallbook}. We focus on two scales $s=2^j$, namely $s=128$ and $s=64$. The corresponding spaces $U_s=V_j$ are generated by translations with step $s$ of the function $f(x) = \max(0,1-|x-N/2|/s)$, $N=1024$, and we consider $N$ samples of $f$ in $[0,N]$. In particular for $s=N/8=128$  we get the signal $f^{(1)}$ with support length $256$ (cf.\ Figure \ref{figt}), whereas for $s=N/16=64$ we get the signal $f^{(2)}$ with support length $128$ (cf.\ Figure \ref{figts}).

We used a wavelet time scattering network with default settings for feature extraction - namely, two layers with eight wavelets per octave in the first filter bank and one wavelet per octave in the second filter bank, the coarsest scale $2^J$ coinciding with half of signal length $N$.

In both cases we introduced a distortion so that $\tau(x)$, $x\in \mathbb{R}$, are modelled by independent uniform random variables in $[-A,A]$. In this case, a direct computation of the moments in \eqref{eq stima random 2} yields the \textit{upper bound}
\begin{equation}\label{eq stima random 3}
\mathbb{E}\left[ \frac{\adm{\Phi(F_\tau f)-\Phi(f)}^2}{\|f\|^2_{L^2}} \right] \leq \begin{cases}
C{\rm Lip}(\Phi)^2 \big(\frac{A}{s}\big)^2 & (A\leq s)\\
C{\rm Lip}(\Phi)^2 \big(\frac{3}{2} \frac{A}{s} - \frac{1}{2}\frac{s}{A}\big) & (A\geq s).
\end{cases}
\end{equation}

Two illustrative plots (for $f=f^{(1)}$ and $f=f^{(2)}$, and $A$ ranging from 0 to the support length of the signal) for the \textit{squared relative error} $\adm{\Phi(F_\tau f)-\Phi(f)}^2/\|f\|^2_{L^2}$ for a single realization can be found in Figure \ref{figt} and \ref{figts} (on the right, blue line).

\begin{figure}[h!]
\centering
\captionsetup{width=0.95\linewidth}
\noindent\makebox[\textwidth]{\includegraphics[width=1\linewidth]{figt}}
\caption{On the left: tent signal $f^{(1)}$ with $N=1024$ samples and support length 256. On the right: squared relative error of the scattering network output for a single realization (blue), third degree polynomial regression curve $\widetilde{f^{(1)}}$ (black) with 95\% prediction band (green) and 95\% confidence band (pink).}
\label{figt}
\end{figure}

\begin{figure}[h!]
\centering
\captionsetup{width=0.95\linewidth}
\noindent\makebox[\textwidth]{\includegraphics[width=1\linewidth]{figts}}
\caption{On the left: tent signal $f^{(2)}$ with $N=1024$ samples and support length 128. On the right: squared relative error of the scattering network output for a single realization (blue), third degree polynomial regression curve $\widetilde{f^{(2)}}$ (black) with 95\% prediction band (green) and 95\% confidence band (pink).}\label{figts}
\end{figure}

An aspect that glaringly stands out from the figures is the predicted change - in fact a smooth transition - from the quadratic regime to a sublinear one. Moreover, the latter bound justifies in a natural way the detection of the inflection point of the regression line as an empirical measure of the scale $s$ associated with the corresponding subspace $U_s=V_j$ ($s=2^j$) - more precisely, we expect the inflection point to be of the same order of magnitude in base $2$ as $s$.

There are several ways to test this hypothesis. We decided to use a quite simple approach, relying on a polynomial regression model for the squared relative error. From \eqref{eq stima random 3} we expect the fitting curve to have at most quadratic growth followed by at most linear growth, and the simplest non-trivial model providing for an inflection point is a third degree polynomial $\tilde{f}(x)=a_0+a_1 x + a_2 x^2 + a_3 x^3$. In particular, we introduce the estimator $\hat{s} \coloneqq - \widehat{a_2}/3\widehat{a_3}$ for the inflection point, where $\widehat{a_2}$ and $\widehat{a_3}$ are the statistics emerging as estimates of the coefficients of $\tilde{f}$. We performed a weighted least squared fit, because of the evident heteroskedasticity of the data - precisely, for each value of $A$, we computed the sample variance over $n=50$ realizations of the network (for each signal) and accordingly weighted the regression model.

As an illustration, we report in Table \ref{tab fit} below the estimated coefficients (with 95\% confidence interval) for the polynomial regression and both signals for a single realization. We also provide the adjusted $R^2$ statistic and the value of $\hat{s}$ in terms of the fit parameters.

\noindent
\begin{table}[h!]
\centering
\captionsetup{width=0.95\linewidth}
\def1.5} \begin{tabular}{|c|c|c|{1.5} \begin{tabular}{|c|c|c|c|c|}
\cline{2-5} \cline{3-5} \cline{4-5} \cline{5-5}
\multicolumn{1}{c|}{} & \multicolumn{2}{c|}{$\widetilde{f^{(1)}}$} & \multicolumn{2}{c|}{$\widetilde{f^{(2)}}$}\tabularnewline
\cline{2-5} \cline{3-5} \cline{4-5} \cline{5-5}
\multicolumn{1}{c|}{} & Estimate & $p$ value & Estimate & $p$ value\tabularnewline
\hline
$a_{0}$ & $\displaystyle (-6.999\pm5.107)\times10^{-6}$ & $0.172$ & $(1.097\pm2.059)\times10^{-5}$ & $0.595$\tabularnewline
\hline
$a_{1}$ & $(-3.239\pm4.874)\times10^{-6}$ & $0.507$ & $(-6.241\pm 2.091)\times10^{-5}$ & $0.003$\tabularnewline
\hline
$a_{2}$ & $(3.303\pm0.028)\times10^{-5}$ & $<2\times10^{-16}$ & $(1.065\pm0.002)\times10^{-4}$ & $<2\times10^{-16}$\tabularnewline
\hline
$a_{3}$ & $(-8.700\pm0.130)\times10^{-8}$ & $<2\times10^{-16}$ & $(-5.580\pm0.015)\times10^{-7}$ & $<2\times10^{-16}$\tabularnewline
\hline
$R^{2}$ & \multicolumn{2}{c|}{$0.997$} & \multicolumn{2}{c|}{$0.995$}\tabularnewline
\hline
$\hat{s}$ & \multicolumn{2}{c|}{$126.556$} & \multicolumn{2}{c|}{$63.641$}\tabularnewline
\hline
\end{tabular}\vspace{2ex}
\caption{Estimated coefficients (with standard deviation and $p$ value) for the third degree polynomial regression model $\widetilde{f}$ for the squared relative error of the scattering network output for a single realization. Adjusted $R^2$ statistic is also reported. The value of $\hat{s}= \widehat{a_2}/3\widehat{a_3}$ can be found in the last line.}
\label{tab fit}
\end{table}

The plot of the polynomial regression curve for a single sample realization can be found in Figures \ref{figt} and \ref{figts} (black). We remark that our model does not achieve a precise fit for large values of $A$; in fact, a fifth degree polynomial regression results in a slightly better fit (also confirmed by ANOVA), while higher order models or even nonlinear ones inspired by \eqref{eq stima random 3} do not associate with relevant improvement. We prefer to consider here a simpler cubic model in view of the more readily understandable relationship between parameters and inflection point, the estimate of which is our ultimate goal. Let us also emphasize that the estimated coefficients $a_0$ and $a_1$ are not always statistically significant, as shown in Table \ref{tab fit}.

In order to estimate the expectation $\mathbb{E}[\hat{s}]$, polynomial regression is repeated for each sample realization, eventually leading to a collection $\{ s_i \}_{i=1,\ldots,n}$ of $n=50$ realizations of $\hat{s}$.
We report in Table \ref{tab mean} the sample mean $\bar{s}$ of this collection, along with the corresponding sample standard error \[ \sigma = \sqrt{ \frac{1}{n(n-1)} \sum_{i=1}^n (s_i - \bar{s})^2} \] and the 95\% confidence interval $(\bar{s} - c \sigma, \bar{s} + c \sigma)$, where $c=2.010$ is the 97.5th percentile of Student's $t$ distribution with $n-1$ degrees of freedom.

\noindent
\begin{table}[h!]
\centering
\captionsetup{width=0.95\linewidth}
\def1.5} \begin{tabular}{|c|c|c|{1.5} \begin{tabular}{|c|c|c|}
\cline{2-3} \cline{3-3}
\multicolumn{1}{c|}{} & ${f^{(1)}}$ & ${f^{(2)}}$\tabularnewline
\hline
$\bar{s}$ & $127.144$ & $64.019$\tabularnewline
\hline
$\sigma$ & $0.101$ & $0.077$\tabularnewline
\hline
$\mathbb{E}[\hat{s}]$ 95\% CI  & $(126.942,127.347)$ & $(63.864,64.174)$\tabularnewline
\hline
\end{tabular}\vspace{2ex}
\caption{Sample mean $\bar{s}$ over $n=50$ realizations, with sample standard error $\sigma$ and 95\% confidence interval $(\bar{s} - c\sigma,\bar{s}+c\sigma)$ with $c=2.010$ (97.5th percentile of Student's $t$ distribution with $n-1$ degrees of freedom).}
\label{tab mean}
\end{table}

Observe that for both signals the estimates come with a relative error (with respect to $s=128$ and $s=64$ respectively) of less than 1\%. It is our opinion that this is still a considerable result, in view of the quite unsophisticated design of the experiment. We expect a more careful point of change detection analysis to achieve better results. Also, the same issue seems worth investigating  for other multiresolution approximations and for different DCNNs, even in higher dimensions, but this matter is beyond the illustrative purpose of this section and will thus be object of independent consideration in future work.

\section*{Acknowledgements}

The authors wish to express their gratitude to Giovanni S.\ Alberti, Enrico Bibbona and Matteo Santacesaria for fruitful conversations on the topics of the manuscript, as well as for valuable comments on preliminary drafts.

The present research has been partially supported by the MIUR grant Dipartimenti di Eccellenza 2018-2022, CUP: E11G18000350001, DISMA, Politecnico di Torino.

S. Ivan Trapasso is member of the Machine Learning Genoa (MaLGa) Center, Università di Genova. This material is based upon work supported by the Air Force Office of Scientific Research under award number FA8655-20-1-7027.

The authors are members of the Gruppo Nazionale per l'Analisi Matematica, la Probabilità e le loro Applicazioni (GNAMPA) of the Istituto Nazionale di Alta Matematica (INdAM).