S CALING -T RANSLATION -E QUIVARIANT N ETWORKS WITH D ECOMPOSED C ONVOLUTIONAL F ILTERS
Anonymous authors
Paper under double-blind review
BSTRACT
Encoding the scale information explicitly into the representation learned by a convolutional neural network (CNN) is beneﬁcial for many vision tasks especially when dealing with multiscale inputs.
We study, in this paper, a scaling-translationequivariant ( ST -equivariant) CNN with joint convolutions across the space and the scaling group, which is shown to be both sufﬁcient and necessary to achieve STequivariant representations.
To reduce the model complexity and computational burden, we decompose the convolutional ﬁlters under two pre-ﬁxed separable bases and truncate the expansion to low-frequency components.
A further beneﬁt of the truncated ﬁlter expansion is the improved deformation robustness of the equivariant representation.
Numerical experiments demonstrate that the proposed scaling-translation-equivariant networks with decomposed convolutional ﬁlters (ScDCFNet) achieves signiﬁcantly improved performance in multiscale image classiﬁcation and better interpretability than regular CNNs at a reduced model size.
I NTRODUCTION
Convolutional neural networks (CNNs) have achieved great success in machine learning problems such as image classiﬁcation (Krizhevsky et al., 2012), object detection (Ren et al., 2015) and semantic segmentation (Long et al., 2015; Ronneberger et al., 2015).
Compared to fully-connected networks,
CNNs through spatial weight sharing have the beneﬁt of being translation-equivariant, i e., translating the input leads to a translated version of the output.
This property is crucial for many vision tasks such as image recognition and segmentation.
However, regular CNNs are not equivariant to other important group transformations such as rescaling and rotation, and it is beneﬁcial in some applications to also encode such group information explicitly into the network representation.
Several network architectures have been designed to achieve (2D) roto-translation-equivariance ( SE (2) -equivariance) (Cheng et al., 2019; Marcos et al., 2017; Weiler et al., 2018b; Worrall et al., 2017;
Zhou et al., 2017), i.e., roughly speaking, if the input is spatially rotated and translated, the output is transformed accordingly. The feature maps of such networks typically include an extra index for the rotation group SO (2) .
Building on the idea of group convolutions proposed by Cohen & Welling (2016) for discrete symmetry groups, Cheng et al.
(2019) and Weiler et al.
(2018b) constructed SE (2) -equivariant CNNs by conducting group convolutions jointly across the space and SO (2) using steerable ﬁlters (Freeman & Adelson, 1991).
Scaling-translation-equivariant ( ST -equivariant) CNNs, on the other hand, have typically been studied in a less general setting in the existing literature (Kanazawa et al., 2014; Marcos et al., 2018; Xu et al., 2014; Ghosh & Gupta, 2019).
In particular, to the best of our knowledge, a joint convolution across the space and the scaling group S has yet been proposed to achieve equivariance in the most general form.
This is possibly because of two difﬁculties one encounters when dealing with the scaling group: First, unlike SO (2) , it is an acyclic and unbounded group; second, an extra index in S incurs a signiﬁcant increase in model parameters and computational burden.
Moreover, since the scaling transformation is rarely perfect in practice (due to changing view angle or numerical discretization), one needs to quantify and promote the deformation robustness of the equivariant representation (i.e., is the model still “approximately” equivariant if the scaling transformation is “contaminated” by a nuisance input deformation), which, to the best of our knowledge, has yet been studied in prior works.
The purpose of this paper is to address the aforementioned theoretical and practical issues in the construction of ST -equivariant CNN models.
Speciﬁcally, our contribution is three-fold:
We propose a general ST -equivariant CNN architecture with a joint convolution over R 2 and S , which is proved in Section 4 to be both sufﬁcient and necessary to achieve ST -equivariance.
A truncated decomposition of the convolutional ﬁlters under a pre-ﬁxed separable basis on the two geometric domains ( R 2 and S ) is used to reduce the model size and computational cost.
Our contribution to the family of group-equivariant CNNs is non-trivial; in particular, the scaling group unlike SO (2) is acyclic and non-compact.
This poses challenges both in theory and in practice, so that many previous works on group-equivariant CNNs cannot be directly extended.
We introduce new algorithm design and mathematical techniques to obtain the ﬁrst general ST -equivariant CNN in literature with both computational efﬁciency and proved representation stability.
R ELATED W ORK
Mixed-scale and ST -equivariant CNNs.
Incorporating multiscale information into a CNN representation has been studied in many existing works.
The Inception net (Szegedy et al., 2015) and its generalizations (Szegedy et al., 2017; 2016; Li et al., 2019) stack ﬁlters of different sizes in a single layer to address the multiscale salient features.
Dilated convolutions (Pelt & Sethian, 2018; Wang et al., 2018; Yu & Koltun, 2016; Yu et al., 2017), pyramid architectures (Ke et al., 2017; Lin et al., 2017), and multiscale dense networks (Huang et al., 2017) have also been proposed to take into account the multiscale feature information.
Although the effectiveness of such models have been empirically demonstrated in various vision tasks, there is still a lack of interpretability of their ability to encode the input scale information.
Group-equivariant CNNs, on the other hand, explicitly encode the group information into the network representation.
Cohen & Welling (2016) proposed CNNs with group convolutions that are equivariant to several ﬁnite discrete symmetry groups.
This idea is later generalized in Cohen et al.
and applied mainly to the rotation groups SO (2) and SO (3) (Cheng et al., 2019; Weiler et al., 2018a;b).
Although ST -equivariant CNNs have also been proposed in the literature (Kanazawa et al., 2014; Marcos et al., 2018; Xu et al., 2014; Ghosh & Gupta, 2019), they are typically studied in a less general setting.
In particular, none of these previous works proposed to conduct joint convolutions over R 2 × S as a necessary and sufﬁcient condition to impose equivariance, for which reason they are thus variants of a special case of our proposed architecture where the convolutional ﬁlters in S are Dirac delta functions (c.f. Remark 1.)
The scale-space semi-group correlation proposed in the concurrent work (Worrall & Welling, 2019) bears the most resemblance to our proposed model, however, their approach is only limited to discrete semigroups, whereas our model does not have such restriction.
Representation stability to input deformations.
Input deformations typically induce noticeable variabilities within object classes, some of which are uninformative for the vision tasks.
Models that are stable to input deformations are thus favorable in many applications.
The scattering transform (Bruna & Mallat, 2013; Mallat, 2010; 2012) computes translation-invariant representations that are Lipschitz continuous to deformations by cascading predeﬁned wavelet transforms and modulus poolings.
A joint convolution over R 2 × SO (2) is later adopted in Sifre & Mallat (2013) to build roto-translation scattering with stable rotation/translation-invariant representations.
These models, however, use pre-ﬁxed wavelet transforms in the networks, and are thus nonadaptive to the data.
DCFNet (Qiu et al., 2018) combines a pre-ﬁxed ﬁlter basis and learnable expansion coefﬁcients in a CNN architecture, achieving both data adaptivity and representation stability inherited from the ﬁlter regularity.
This idea is later extended by Cheng et al.
(2019) to produce SE (2) -equivariant representations that are Lipschitz continuous in L 2 norm to input deformations modulo a global rotation, i.e., the model stays approximately equivariant even if the input rotation is imperfect.
To the best of our knowledge, a theoretical analysis of the deformation robustness of a ST -equivariant CNN has yet been studied, and a direct generalization of the result in Cheng et al.
(2019) is futile because the feature maps of a ST -equivariant CNN is typically not in L [-
-]2 (c.f. Remark 2.)
ST -E QUIVARIANT CNN AND F ILTER D ECOMPOSITION
Group-equivariance is the property of a mapping f : X → Y to commute with the group actions on the domain X and codomain Y .
More speciﬁcally, let G be a group, and D g , T g , respectively, be group actions on X and Y .
A function f : X → Y is said to be G -equivariant if
[Equation]
G -invariance is thus a special case of G -equivariance where T g = Id Y .
For learning tasks where the feature y ∈ Y is known a priori to change equivariantly to a group action g ∈ G on the input x ∈ X , e.g. image segmentation should be equivariant to translation, it would be beneﬁcial to reduce the hypothesis space to include only G -equivaraint models.
In this paper, we consider mainly the scaling-translation group ST ∼ = S
× R 2 ∼ =
R × R 2 .
Given g =
( β, v ) ∈ ST and an input image [Figure] x (0) ( u, λ ) ( u ∈ R 2 is the spatial position, and λ is the unstructured channel index, e.g. RGB channels of a color image), the scaling-translation group action D g
= D β,v on x (0) is deﬁned as
[Equation]
Constructing ST -equivariant CNNs thus amounts to ﬁnding an architecture A such that each trained network f ∈ A commutes with the group action D β [Equation] v on the input and a similarly deﬁned group action T β,v (to be explained in Section 3.1) on the output.
3. ST -E QUIVARIANT CNN S
Inspired by Cheng et al.
(2019) and Weiler et al.
(2018b), we consider ST -equivariant CNNs with an extra index α ∈ S for the the scaling group
S ∼ =
R : for each l ≥ 1 , the l -th layer output is denoted as x ( l ) ( u, α, λ ) , where u ∈ R 2 is the spatial position, α ∈ S is the scale index, and λ ∈ [ M l ] := { 1 , . . .
, M l } corresponds to the unstructured channels.
We use the continuous model for formal derivation, i.e., the images and feature maps have continuous spatial and scale indices.
In practice, the images are discretized on a Cartesian grid, and the scales are computed only on a discretized ﬁnite interval.
Similar to Cheng et al.
(2019), the group action T β,v on the l -th layer output is deﬁned as a scaling-translation in space as well as a shift in the scale channel:
[Equation]
A feedforward neural network is said to be scaling-translation-equivariant, i.e., equivariant to ST , if
[Equation]
where we slightly abuse the notation x ( l ) [ x (0) ] to denote the l -th layer output given the input x (0) .
The following Theorem shows that ST -equivariance is achieved if and only if joint convolutions are conducted over S × R 2 as in (5) and (6).
Theorem 1.
A feedforward neural network with an extra index α ∈ S for layerwise output is ST -equivariant if and only if the layerwise operations are deﬁned as (5) and (6) :
[Equation]
where σ : R → R is a pointwise nonlinear function.
We defer the proof of Theorem 1, as well as those of other theorems, to the appendix.
We note that the joint-convolution in Theorem 1 is a generalization of the group convolution proposed by Cohen &
Welling (2016) to a non-compact group ST in the continuous setting.
Remark 1.
When the (joint) convolutional ﬁlter W ( l ) λ (cid:48) ,λ ( u, α ) takes the special form W ( l ) λ (cid:48) ,λ ( u, α ) =
V ( l ) λ (cid:48) ,λ ( u ) δ ( α ) , the joint convolution (6) over R 2 ×S reduces to only a (multiscale) spatial convolution x ( l ) [ x ( l [Equation] 1) ]( u,
[Equation]
, λ
[Equation] = [Equation] i.e., the feature maps at different scales do not transfer information among each other (see Figure 1a).
The previous works (Kanazawa et al., 2014; Marcos et al., 2018; Xu et al., 2014; Ghosh & Gupta, 2019) on ST -equivariant CNNs are all based on this special case of Theorem 1.
Although the joint convolutions (6) on R 2 × S provide the most general way of imposing STequivariance, they unfortunately also incur a signiﬁcant increase in the model size and computational burden.
Following the idea of Cheng et al.
and Qiu et al.
(2018), we address this issue by taking a truncated decomposition of the convolutional ﬁlters under a pre-ﬁxed separable basis, which will be discussed in detail in the next section.
3. S EPARABLE B ASIS D ECOMPOSITION
We consider decomposing the convolutional ﬁlters W ( l ) λ (cid:48) ,λ ( u, α ) under the product of two function bases, { ψ k ( u ) } k and { ϕ m ( α ) } m , which are the eigenfunctions of the Dirichlet Laplacian on, respectively, the unit disk D ⊂ R 2 and [ − 1 , 1] , i.e.,
[Equation]
In particular, the spatial basis { ψ k } k satisfying (8) is the Fourier-Bessel (FB) basis (Abramowitz & Stegun, 1965).
In the continuous formulation, the spatial “pooling” operation is equivalent to rescaling the convolutional ﬁlters in space.
We thus assume, without loss of generality, that the convolutional ﬁlters are compactly supported as follows
[Equation]
Let ψ j,k ( u ) := 2 − 2 j ψ k (2 − j u ) , then W ( l ) λ (cid:48) ,λ can be decomposed under { ψ j l ,k } k and { ϕ m } m as
[Equation]
[Equation]
where a (1) λ (cid:48) ,λ ( k ) and a ( l ) λ (cid:48) ,λ ( k, m ) are the expansion coefﬁcients of the ﬁlters.
During training, the basis functions are ﬁxed, and only the expansion coefﬁcients are updated.
In practice, we truncate the expansion to only low-frequency components (i.e., a ( l ) λ (cid:48) ,λ ( k, m ) are non-zero only for k ∈
[ K ] , m ∈
[ K α ] ), which are kept as the trainable parameters.
Similar idea has also been considered in the prior works (Qiu et al., 2018; Cheng et al., 2019; Jacobsen et al., 2016).
This directly leads to a reduction of network parameters and computational burden.
More speciﬁcally, let us compare the l -th convolutional layer (6) of a ST -equivariant CNN with and without truncated basis decomposition:
Number of trainable parameters: Suppose the ﬁlters W ( l ) λ (cid:48) ,λ ( u, α ) are discretized on a Cartesian grid of size L × L × L α .
The number of trainable parameters at the l -th layer of a ST -equivariant CNN without basis decomposition is L 2 L α M l − 1 M l .
On the other hand, in an ScDCFNet with truncated basis expansion up to K leading coefﬁcients for u and K α coefﬁcients for α , the number of parameters is instead KK α M l − 1 M l .
Hence a reduction to a factor of KK α /L
L α in trainable parameters is achieved for ScDCFNet via truncated basis decomposition.
In particular, if L = 5 , L α = 5 , K = 8 , and K α = 3 , then the number of parameters is reduced to (8 × 3) / (5 2 × 5) = 19 .
Computational cost: Suppose the size of the input x ( l − 1) ( u, α, λ ) and output x ( l ) ( u, α, λ ) at the l -th layer are, respectively,
W × W × N α × M l − 1 and W × W × N α × M l , where W × W is the spatial dimension, N α is the number of scale channels, and M l − 1 ( M l ) is the number of the unstructured input (output) channels.
Let the ﬁlters W ( l ) λ (cid:48) ,λ ( u, α ) be discretized on a Cartesian grid of size L × L × L α .
The following theorem shows that, compared to a regular ST -equivariant CNN, the computational cost in a forward pass of ScDCFNet is reduced again to a factor of KK α /L
L α .
Theorem 2.
Assume M l (cid:29) L 2 , L α , i.e., the number of the output channels is much larger than the size of the convolutional ﬁlters in u and α , then the computational cost of an ScDCFNet is reduced to a factor of KK α /L
L α when compared to a ST -equivariant CNN without basis decomposition.
Apart from reducing the model size and computational burden, we demonstrate in this section that truncating the ﬁlter decomposition has the further beneﬁt of improving the deformation robustness of the equivariant representation, i.e., the equivaraince relation (4) still approximately holds true even if the spatial scaling of the input D β,v x (0) is contaminated by a local deformation.
The analysis is motivated by the fact that scaling transformations are rarely perfect in practice — they are typically subject to local distortions such as changing view angle or numerical discretization.
To quantify the distance between different feature maps at each layer, we deﬁne the norm of x ( l ) as
[Equation]
Remark 2.
The deﬁnition of (cid:107) x ( l ) (cid:107) is different from that of RotDCFNet
(Cheng et al., 2019), where an L 2 norm is taken for the α index as well.
The reason why we adopt the L ∞ norm for α in (11) is that x ( l ) is typically not L 2 in α , since the scaling group S , unlike SO (2) , has inﬁnite Haar measure.
We next quantify the representation stability of ScDCFNet under three mild assumptions on the convolutional layers and input deformations.
First,
(A1)
The pointwise nonlinear activation σ : R → R is non-expansive.
Next, we need a bound on the convolutional ﬁlters under certain norms.
For each l ≥ 1 , deﬁne A l as 
[Equation]
where the Fourier-Bessel (FB) norm (cid:107) a (cid:107) FB of a sequence { a ( k ) } k ≥ [Equation] is a weighted l 2 norm deﬁned as (cid:107) a (cid:107) 2 FB :
= (cid:80) k µ k a ( k ) 2 , where µ k is the k -th eigenvalue of the Dirichlet Laplacian on the unit disk deﬁned in (8).
We next assume that each A l is bounded:
(A2)
For all l ≥ 1 , A l ≤ 1 .
The boundedness of A l is facilitated by truncating the basis decomposition to only low-frequency components (small µ k ), which is one of the key idea of ScDCFNet explained in Section 3.2.
After a proper initialization of the trainable coefﬁcients, (A2) can generally be satisﬁed.
The assumption (A2) implies several bounds on the convolutional ﬁlters at each layer (c.f. Lemma 2 in the appendix), which, combined with (A1), guarantees that an ScDCFNet is layerwise non-expansive:
Proposition 1.
Under the assumption (A1) and (A2), an ScDCFNet satisﬁes the following.
(a) For any l ≥ 1 , the mapping of the l -th layer, x ( l ) [ · ] deﬁned in (5) and (6) , is non-expansive,
i e.,
[Equation]
(b) Let x ( l ) 0 be the l -th layer output given a zero bottom-layer input, then x ( l ) 0 ( λ ) depends only on λ .
(c) Let x ( l ) c be the centered version of x ( l ) after removing x ( l ) 0 ,
i
e., x (0) c ( u, λ ) :
= x (0) ( u, λ ) − x (0)0 ( λ ) =
x (0) ( u, λ ) , and x ( l ) c ( u, α, λ ) :
= x ( l ) ( u, α, λ ) − x ( l ) 0 ( λ ) , ∀ l ≥ 1 , then (cid:107) x
( l ) c (cid:107) ≤ (cid:107) x
( l − 1) c (cid:107) , ∀ l ≥ 1 .
As a result, (cid:107) x ( l ) c (cid:107) ≤ (cid:107) x (0) c
(cid:107) = (cid:107) x (0) (cid:107)
[Equation] Finally, we make an assumption on the input deformation modulo a global scale change.
Given a Cfunction τ : R 2 → R 2 , the spatial deformation D τ on the feature maps x ( l ) is deﬁned as
[Equation]
) ( u, λ ) = x (0) ( ρ ( u ) , λ
[Equation] and D τ x ( l ) ( u, α, λ ) = x ( l ) ( ρ ( u
[Equation] , α, λ
[Equation]
, l ≥
[Equation]
14) where ρ ( u ) = u − τ ( u ) . We assume a small local deformation on the input:
[Equation] [Equation]
, where (cid:107) · (cid:107) is the operator norm.
The following theorem demonstrates the representation stability of an ScDCFNet to input deformation modulo a global scale change.
Theorem 3.
Let D τ be a small spatial deformation deﬁned in (14) and let D β,v , T β,v be the group actions corresponding to an arbitrary scaling 2 − β ∈ R + centered at v ∈ R 2 deﬁned in (2) and (3) .
In an ScDCFNet satisfying (A1), (A2), and (A3), we have, for any L ,
[Equation]
[Equation] Theorem 3 gauges how approximately equivariant is ScDCFNet if the input undergoes not only a scale change D β,v but also a nonlinear spatial deformation D τ , which is important both in theory and in practice because the scaling of an object is rarely perfect in reality.
N UMERICAL E XPERIMENTS
In this section, we conduct several numerical experiments for the following three purposes.
To verify that ScDCFNet indeed achieves ST -equivariance (4).
To illustrate that ScDCFNet signiﬁcantly outperforms regular CNNs at a much reduced model size in multiscale image classiﬁcation.
To show that a trained ScDCFNet auto-encoder is able to reconstruct rescaled versions of the input by simply applying group actions on the image codes, demonstrating that ScDCFNet indeed explicitly encodes the input scale information into the representation.
The experiments are tested on the Scaled MNIST (SMNIST) and Scaled Fashion-MNIST (SFashion) datasets, which are built by rescaling the original MNIST and Fashion-MNIST (Xiao et al., 2017) images by a factor randomly sampled from a uniform distribution on [0 . 3 , 1] .
A zero-padding to a size of 28 × 28 is conducted after the rescaling.
If mentioned explicitly, for some experiments, the images are resized to 64 × 64 for better visualization.
The implementation details of ScDCFNet are explained in Appendix B.1.
In particular, we discuss how to discretize the integral (6) and truncate the scale channel to a ﬁnite interval for practical implementation.
We also explain how to mitigate the boundary “leakage” effect incurred by the truncation.
Moreover, modiﬁcations to the spatial pooling and batch-normalization modules of ScDCFNet to maintain ST -equivariance are also explained.
5. V ERIFICATION OF ST -E QUIVARIANCE
We ﬁrst verify that ScDCFNet indeed achieves ST -equivariance (4).
Speciﬁcally, we compare the feature maps of a two-layer ScDCFNet with randomly generated truncated ﬁlter expansion coefﬁcients and those of a regular CNN.
The exact architectures are detailed in Appendix B.2.
Figure 2 displays the ﬁrst- and second-layer feature maps of an original image x (0) and its rescaled version D β,v x (0) using the two comparing architectures.
Feature maps at different layers are rescaled to the same spatial dimension for visualization.
The four images enclosed in each of the dashed rectangle correspond to: x ( l ) [ x (0) ]
( l -th layer feature of the original input), x ( l ) [ D β,v x (0) ]
( l -th layer feature of the rescaled input), T β,v x ( l ) [ x (0) ]
(rescaled l -th layer feature of the original input, where
T β,v is understood as D β,v for a regular CNN due to the lack of a scale index α ), and the difference [Figure] x ( l ) [ D β,v x (0) ] − T β,v x ( l ) [ x (0) ] .
It is clear that even with numerical discretization, which can be modeled as a form of input deformation, ScDCFNet is still approximately ST -equivariant, i.e., x ( l ) [ D β,v x (0) ]
≈ T β,v x ( l ) [ x (0) ] , whereas a regular CNN does not have such a property.
We also examin how the numerical error in equivariance (incurred by the the boundary “leakage” effect after the scale channel truncation) evolves as the network gets deeper.
The error in equivariance is measured in a relative L 2 sense at a particular scale α , i.e.,
[Equation]
It is clear from Figure 3 that the boundary “leakage” effect is unavoidable as the network becomes deeper.
However, the error can be alleviated by either choosing joint convolutional ﬁlters with a smaller support in scale (i.e., the ﬁlter size, or the number of “taps”, after discretization in scale is much smaller compared to the number of scale channels in the feature map), or using a replicatepadding in the scale channel for the joint convolution.
See Appendix B.1 for detailed explanation. 5. M ULTISCALE I MAGE C LASSIFICATION
We next demonstrate the improved performance of ScDCFNet in multiscale image classiﬁcation.
The experiments are conducted on SMNIST and SFashion, and a regular CNN is used as a performance benchmark.
Both networks are comprised of three convolutional layers with the exact architectures (Table 2) detailed in Appendix B.3.
Since the scaling group S ∼ = R is unbounded, we compute only the feature maps x ( l ) ( u, α, λ ) with the α index restricted to the truncated scale interval [ − 1 . 6 , 0] ( 2 − 1 .
6 ≈ 0 . 3 ), which is discretized uniformly into N α = 9 channels (again, see Appendix B. for implementation details.)
The performance of the comparing architectures with and without batch-normalization is shown in Table 1.
It is clear that, by limiting the hypothesis space to STequivaraint models and taking truncated basis decomposition to reduce the model size, ScDCFNet achieves a signiﬁcant improvement in classiﬁcation accuracy with a reduced number of trainable parameters.
The advantage of ScDCFNet is more pronounced when the number of training samples is small ( N tr = 2000 ), suggesting that, by hardwiring the input scale information directly into its representation, ScDCFNet is less susceptible to overﬁtting the limited multiscale training data.
We also observe that even when a regular CNN is trained with data augmentation (random cropping and rescaling), its performance is still inferior to that of an ScDCFNet without manipulation of the training data.
In particular, although the accuracies of the regular CNNs trained on 2000 SMNIST and SFashion images after data augmentation are improved to, respectively, 93 .
85% and 79 .
41% , they still underperform the ScDCFNets without data augmentation ( 93 .
91% and 79 .
using only a fraction of trainable parameters.
Moreover, if ScDCFNet is trained with data augmentation, the accuracies can be further improved to 94 .
30% and 80 .
62% respectively.
This suggests that ScDCFNet can be combined with data augmentation for optimal performance in multiscale image classiﬁcation. [Table] [Figure]
5. I MAGE R ECONSTRUCTION
In the last experiment, we illustrate the ability of ScDCFNet to explicitly encode the input scale information into the representation.
To achieve this, we train an ScDCFNet auto-encoder on the
SMNIST dataset with images resized to 64 × 64 for better visualization.
The encoder stacks two STequivaraint convolutional blocks with 2 × 2 average-pooling, and the decoder contains a succession of two transposed convolutional blocks with 2 × 2 upsampling.
A regular CNN auto-encoder is also trained for comparison (see Table 3 in Appendix B.4 for the detailed architecture.)
Our goal is to demonstrate that the image code produced by the ScDCFNet auto-encoder contains the scale information of the input, i.e., by applying the group action T β,v (3) to the code C of a test image before feeding it to the decoder, we can reconstruct rescaled versions of original input.
This property can be visually veriﬁed in Figure 4.
In contrast, a regular CNN auto-encoder fails to do so.
C ONCLUSION
We propose, in this paper, a ST -equivaraint CNN with joint convolutions across the space R 2 and the scaling group S , which we show to be both sufﬁcient and necessary to impose ST -equivariant network representation.
To reduce the computational cost and model complexity incurred by the joint convolutions, the convolutional ﬁlters supported on R 2 × S are decomposed under a separable basis across the two domains and truncated to only low-frequency components.
Moreover, the truncated ﬁlter expansion leads also to improved deformation robustness of the equivaraint representation, i.e., the model is still approximately equivariant even if the scaling transformation is imperfect.
Experimental results suggest that ScDCFNet achieves improved performance in multiscale image classiﬁcation with greater interpretability and reduced model size compared to regular CNN models.
For future work, we will study the application of ScDCFNet in other more complicated vision tasks, such as object detection/localization and pose estimation, where it is beneﬁcial to directly encode the input scale information into the deep representation.
Moreover, the memory usage of our current implementation of ScDCFNet scales linearly to the number of the truncated basis functions in order to realize the reduced computational burden explained in Theorem 2.
We will explore other efﬁcient implementation of the model, e.g., using ﬁlter-bank type of techniques to compute convolutions with multiscale spatial ﬁlters, to signiﬁcantly reduce both the computational cost and memory usage.
. P ROOF OF T HEOREM
Proof of Theorem 1.
We note ﬁrst that (4) holds true if and only if the following being valid for all l ≥ 1 ,
[Equation]
17) where T β,v x (0) is understood as D β,v x (0) .
We also note that the layer-wise operations of a general feedforward neural network with an extra index α ∈ S can be written as
[Equation]
18) and, for l > 1 ,
[Equation]
To prove the sufﬁcient part: when l =
[Equation] [Equation] [Equation] and (5) lead to
[Equation]
and [Equation] [Equation]
Hence T β,v x (1) [ x (0) ]
= x (1) [ D β,v x (0) ] .
When l > 1 , we have
[Equation]
and x
[Equation]
=
[Equation]
Therefore T β,v x ( l ) [ x ( l − 1) ]
= x ( l ) [ T β,v x ( l − 1) ] , ∀ l > [Equation]
To prove the necessary part: when l =
[Equation]
we have
T
[Equation]
[Equation]
and
[Equation] [Equation]
Hence for (17) to hold when l = 1 , we need
[Equation]
Keeping u, α, λ, u (cid:48) , λ (cid:48) , β ﬁxed while changing v in (26), we obtain that W (1) ( u (cid:48) , λ (cid:48) , u, α, λ ) does not depend on the third variable u .
Thus W (1) ( u (cid:48) , λ (cid:48) , u, α, λ ) = W (1) ( u (cid:48) , λ (cid:48) , 0 , α, λ ) , ∀ u .
Deﬁne
W (1) λ,λ ( u (cid:48) ) as
[Equation]
Then, for any given u (cid:48) , λ (cid:48) , u, α, λ , setting β = α in (26) leads to
[Equation]
Hence (18) can be written as (5).
For l > 1 , a similar argument leads to
[Equation]
Again, keeping u, α, λ, u (cid:48) , α (cid:48) , λ (cid:48) , β ﬁxed while changing v in (29) leads us to the conclusion that
W ( l ) ( u (cid:48) , α (cid:48) , λ (cid:48) , u, α, λ ) does not depend on the fourth variable u .
Deﬁne
[Equation]
After setting β = α in (29), for any given u (cid:48) , α (cid:48) , [Equation] , u, α, λ , we have
[Equation]
This concludes the proof of the Theorem
[Equation]
A. P ROOF OF T HEOREM
Proof of Theorem 2.
In a regular ST -equivariant CNN
[Equation]
the l -th convolutional layer (6) is computed as follows:
[Equation]
The spatial convolutions in (32) take 2 W 2 L 2 N α L α M l M l − 1 ﬂops (there are N α L α M l M l − 1 convolutions in u , each taking 2 W 2 L 2 ﬂops.)
The summation over α (cid:48) in (33) requires L α N α W 2 M l M l −ﬂops.
The summation over λ (cid:48) , adding the bias, and applying the nonlinear activation in (34) requires an additional W 2 N α M l (2 + M l − 1 ) ﬂops.
Thus the total number of ﬂoating point computations in a forward pass through the l -th layer of a regular ST -equivariant CNN is
[Equation]
On the other hand, in an ScDCFNet with separable basis truncation up to KK α leading coefﬁcients, (6) can be computed via the following steps:
[Equation]
[Equation]
The convolutions in α (36) require 2 L α N α W 2 K α M l − 1 ﬂops (there are W 2 K α M l − 1 convolutions in α , each taking 2 L α N α ﬂops.)
The spatial convolutions in (37) take 2 W 2 L 2 N α M l − 1 K α K ﬂops ( N α M l − 1 K α K convolutions in u , each taking 2 W 2 L 2 ﬂops.)
The last step (38) requires an additional 2 W 2 N α M l (1 + KK α M l − 1 ) ﬂops.
Hence the total number of ﬂoating point computation for an ScDCFNet is
[Equation]
In particular, when M l (cid:29) L 2 , L α , the dominating terms in (35) and (39) are, respectively, 2 W 2 N α M l M l − 1 L 2 L α and 2 W 2 N α M l − 1 M l KK α .
Thus the computational cost in an ScDCFNet has been reduced to a factor of KK α L 2 L α .
A. P ROOF OF P ROPOSITION
Before proving Proposition 1, we need the following two lemmas.
Lemma 1.
Suppose that { ψ k } k are the FB bases, and F ( u )
[Equation]
(cid:80) k a ( k )2 − 2 j ψ k (2 − j u ) is a smooth function on 2 j B (0 , 1) , then [Equation] du
[Equation]
This is Lemma 3.5 and Proposition 3.6 in Qiu et al.
(2018) after rescaling u .
Lemma 1 easily leads to the following lemma.
Lemma 2.
Let a ( l ) λ (cid:48) ,λ ( k, m ) be the coefﬁcients of the ﬁlter W ( l ) λ (cid:48) ,λ ( u, α ) under the joint bases { ψ k } k and { ϕ m } m deﬁned in (10) , and deﬁne W ( l ) λ (cid:48) ,λ,m ( u ) as
[Equation]
We have
[Equation]
where  
[Equation] [Equation]
We thus have
[Equation]
44) where
[Equation]
45) and, for l > 1 ,
[Equation]
In particular, (A2) implies that B l , C l , 2 j l D l ≤ 1 , ∀ l .
Proof of Proposition 1.
To simplify the notation, we omit ( l ) in W ( l ) λ [Equation] ,λ , W ( l ) λ (cid:48) ,λ,m , and b ( l ) , and let
M = M l , M (cid:48)
=
M l − 1 .
The proof of (a) for the case l = 1 is similar to Proposition 3.1(a) of Qiu et al.
after noticing the fact that
[Equation]
[Equation]
and we include it here for completeness.
From the deﬁnition of B 1 in (45), we have
[Equation]
Thus
[Equation]
given two arbitrary functions x 1 and x
[Equation]
we have
[Equation]
[Table]
[Equation]
Therefore
[Equation]
for any α ,
[Equation]
where the last inequality makes use of the fact that B 1 ≤ A 1 ≤ 1 under (A2) (Lemma
[Equation]
Therefore
[Equation]
This concludes the proof of (a) for the case l = 1 .
To prove the case for any l > 1 , we ﬁrst recall from (46) that
[Equation]
and
[Equation]
, where B l,m = sup
[Equation]
m
[Equation]
Thus
[Equation]
for two arbitrary functions x 1 and x
[Equation]
we have
[Equation]
[Table]
[Equation]
[Equation]
We claim (to be proved later in Lemma 3) that
[Equation]
Thus
[Equation]
for any α , (cid:88)
[Equation]
[Equation]
[Equation]
Therefore
[Equation]
To prove (b), we use the method of induction.
When l = 0 , x (0)0 ( u, λ ) = 0 by deﬁnition.
When l = 1 , x (1)0 ( u, α, λ ) =
σ ( b (1) ( λ )) .
Suppose x ( l − 1)( u, α, λ ) =
x ( l − 1)( λ ) for some l > 1 , then x
[Equation]
l )
[Equation]
( u, α, λ ) = σ (cid:32)(cid:88)
[Equation]
Part (c) is an easy corollary of part (a).
More speciﬁcally, for any l > 1 , [Equation] x ( l ) c (cid:107) =
(cid:107) x
( l ) − x ( l ) 0 (cid:107) = (cid:107) x
( l ) [ x ( l − 1) ]
− x ( l )
[ x ( l − 1) [Equation] ≤
[Equation] x
[Equation]
l
[Equation]
1) − x
[Equation]
[Equation]
(cid:107) = (cid:107) x
[Equation]
Lemma 3.
Suppose
ϕ ∈ L 2 ( R ) with supp( ϕ m ) ⊂ [ − 1 , 1] and (cid:107) ϕ (cid:107) L 2 = 1 , and x is a function of three variables [Equation] with (cid:107) x (cid:107)
[Equation]
:= sup [Equation] M [Equation]
(cid:82)
[Equation]
| x ( u, α, λ ) | 2 du .
Deﬁne G ( u, α, λ ) as
[Equation]
[Equation]
Then we have
[Equation]
[Equation]
Proof of Lemma 3.
Notice that, for any α , we have
[Equation]
[Equation]
Thus
[Equation]
A. P ROOF OF T HEOREM
To prove Theorem
[Equation]
we need the following two Propositions.
Proposition 2.
In an ScDCFNet satisfying (A1) and (A3) [Equation] we have
For any l ≥
[Equation]
For any l ≥ 1 ,
we have
[Equation]
and
[Equation]
where the ﬁrst T β,v in (68) is replaced by D β,v when l = 1 .
If (A2) also holds true, then
[Equation]
[Equation]
Proposition 3.
In an ScDCFNet satisfying (A1) and (A3), we have, for any l ≥ 1 ,
[Equation]
If (A2) also holds true, then
[Equation]
Proof of Theorem 3.
Putting together (69) and (71), we have
[Equation]
This concludes the proof of Theorem 3.
Finally, we need to prove Proposition 2 and Proposition 3, where the following lemma from Qiu et al.
(2018) is useful.
Lemma 4 (Lemma A.1 of Qiu et al.
Suppose that |∇ τ | ∞ < 1 / 5 , ρ ( u ) =
u − τ ( u ) , then at every point u ∈ R 2 ,
[Equation]
73) where Jρ is the Jacobian of ρ , and | Jρ | is the Jacobian determinant.
As a result,
[Equation]
74) and,
[Equation]
Proof of Proposition 2.
Just like Proposition 1(a), the proof of Proposition 2(a) for the case l = 1 is similar to Lemma 3.2 of Qiu et al.
after the change of variable (47).
We thus focus only on the proof for the case l > 1 .
To simplify the notation
[Equation]
we denote x ( l ) [ x ( l − 1) ] as y [ x ]
[Equation]
and replace x ( l − 1) c , W ( l ) , b ( l ) , M l −
[Equation]
and M l , respectively, by x c , W , b , M (cid:48)
[Equation]
and M .
By the deﬁnition of the deformation D τ (14), we have
[Equation]
Thus
[Equation]
[Table]
[Equation]
(78) where the second equality results from the fact that x ( u, α, λ ) − x c ( u, α, λ ) = x 0 ( λ ) depends only on λ (Proposition 1(b) [Equation]
) Just like the proof of Proposition 1(a)
[Equation]
we take the integral of α (cid:48)
ﬁrst
[Equation]
and deﬁne
[Equation]
Thus
[Equation]
where
[Equation]
[Equation]
Therefore
[Equation]
Hence
[Equation]
We thus seek to estimate (cid:107) E 1 (cid:107) and (cid:107) E 2 (cid:107) individually.
To bound (cid:107) E 2 (cid:107)
[Equation]
we let
[Equation]
[Equation]
Then
[Equation]
and, for any given v and α
[Equation]
where the last inequality comes from (74).
Moreover [Equation] for any given u and α ,
[Equation]
where the last inequality is again because of (74) [Equation]
Thus [Equation] for any given α ,
[Equation]
[Table]
[Equation]
Since (cid:107) G m (cid:107) 2 ≤ 2 (cid:107) x c (cid:107) 2 (by Lemma 3)
[Equation]
and (cid:80) m B l,m ≤ M 2 M (cid:48)
B l by deﬁnition (46), we thus have [Equation]
[Equation]
Taking sup α on both sides gives us
[Equation]
Similarly, to bound (cid:107) E 1 (cid:107) , we introduce
[Equation]
Then
[Equation]
and, for any given v and α , we have
[Equation]
[Equation] The proof of (96) is exactly the same as that of Lemma 3.2 in Qiu et al.
(2018) after a change of variable
[Equation]
and we thus omit the detail.
Similar to the procedure we take to bound (cid:107) E 2 (cid:107) , (96) leads to
[Equation]
Putting together (86) [Equation] [Equation] and (97)
[Equation]
we thus have
[Equation]
[Equation]
This concludes the proof of (a).
To prove (b), given any β ∈ R , and v ∈ R 2 , we have [Equation]
[Equation]
Thus (67) holds true.
As for (68)
[Equation]
we have
[Equation]
where the ﬁrst equality holds valid because of Theorem 1, and the second equality comes from (67)
[Equation]
To prove (c), for any 0 ≤ j ≤ l
[Equation]
deﬁne y j as
[Equation]
We thus have
[Equation]
where the second inequality is because of Proposition 1(a), the third inequality is due to (68), and the last inequality holds true because B l , C l ≤ A l ≤ 1 under (A2) (Lemma 2.)
This concludes the proof of Proposition 2.
Proof of Proposition 3.
The second inequality in (70) is due to Proposition 1(c).
Because of (67), the ﬁrst inequality in (70) is equivalent to
[Equation]
Just like Proposition 2(a), the proof of (103) for the case l = 1 is similar to Proposition 3.4 of Qiu et al.
after the change of variable (47).
A similar strategy as that of Proposition 2(a) can be used to extend the proof to the case l > 1 .
More speciﬁcally, denote x ( l − 1) , x ( l − 1) c , W ( l ) , b ( l ) , respectively, as x, x c , W, and b to simplify the notation.
We have
[Equation]
[Table]
[Equation]
[Equation]
where
[Equation]
Similar to (96) [Equation] we have the following bound
[Equation]
Again [Equation] the proof of (107) is the same as that of Proposition 3.4 in Qiu et al.
(2018) after a change of variable.
The rest of the proof follows from a similar argument as in (92) and (93) [Equation]
B E XPERIMENTAL D ETAILS IN S ECTIONB. I MPLEMENTATION D ETAILS
Discretization and scale channel truncation. In practice, the scale channel S ∼ =
R needs to be truncated to a ﬁnite interval I ⊂ S such that the layerwise feature map x ( l ) ( u, α, λ ) is only computed for α ∈ I .
This scale channel truncation unavoidably destroys the global scaling symmetry (similar to the fact that truncating an image to a ﬁnite spatial support destroys translation symmetry), which leads to the boundary “leakage” effect after a (joint) convolution in scale.
This boundary “leakage” effect can be alleviated through the following two ways: (1) we can choose a joint convolutional ﬁlter that is compactly supported on a much smaller scale interval I α (cid:51) 0 compared to the truncated scale interval I , i.e., | I α | (cid:28) | I | (a similar idea has been explored in (Worrall & Welling, 2019)); (2) instead of using a zero-padding (which is typically chosen by default as a spatial padding method before spatial convolution), a “replicate”-padding in the scale channel should be implemented before the convolution in scale. After a scale channel truncation, the layerwise feature maps x ( l ) ( u, α, λ ) and the separable basis functions { ψ k ( u ) } k , { ϕ m ( α ) } m are discretized both in space and scale on a uniform grid. To avoid the spatial aliasing effect, the number K of the spatial basis functions { ψ k ( u ) } k ∈ [ K ] is not allowed to be too large (typically we set K ≤ 10 .)
ST -equivariant average pooling .
Given a feature x ( l ) ( u, α, λ ) , the traditional average-pooling in u with the same spatial kernel size across α destroys ST -equivariance (4).
To remedy this issue, similar to (Zhang, 2019), we ﬁrst convolve x ( l ) with a scale-speciﬁc low-pass ﬁlter before downsampling the convolved signal on a coarser spatial grid.
Speciﬁcally, we have ˜ x
( l ) ( u, α, λ ) = (cid:82)
R 2 x ( l ) ( Nu + u (cid:48) , α, λ ) η (2 − α u (cid:48) )
2 − 2 α du (cid:48) , where ˜ x ( l ) is the feature after pooling, η is a low-pass ﬁlter, e.g., a Gaussian kernel, and N ∈ Z
+ is the pooling factor.
We refer to this as ST -equivariant average-pooling.
ST
-equivariant batch-normalization .
Batch-normalization
Ioffe & Szegedy (2015) accelerates network training by reducing layerwise covariate shift, and it has become an integral part in various
CNN architectures.
With an extra scale index α in the feature map x ( l ) ( u, α, λ ) of an SDCFNet, we need to include α in the normalization in order not to destroy ST -equivariance, i.e., a batch of features { x ( l ) n ( u, α, λ ) } Nn =1 should be normalized as if it were a collection of 3D data (two dimensions for u , and one dimension for α .)
B. V ERIFICATION OF ST - EQUIVARIANCE
The ScDCFNet used in this experiment has two convolutional layers, each of which is composed of a ST -equivariant convolution (5) or (6), a batch-normalization, and a 2 × 2 ST -equivariant average-pooling.
The expansion coefﬁcients a (1) λ (cid:48) ,λ ( k ) and a (2) λ (cid:48) ,λ ( k, m ) are sampled from a Gaussian distribution and truncated to K = 8 and K α = 3 leading coefﬁcients for u and α respectively.
Similarly, a regular CNN with two convolutional layers and randomly generated 5 × 5 convolutional kernels is used as a baseline for comparison.
B. M ULTISCALE I MAGE C LASSIFICATION
In the experiments on multiscale image classiﬁcation on the SMNIST and SFashion dataaset, the network architectures for the ScDCFNet and the regular CNN are shown in Table 2.
Stochastic gradient descent (SGD) with decreasing learning rate from 10 − 2 (10 − 1 ) to 10 − 4 (10 − ) is used to train all networks without ( ) batch-normalization for 160 epochs.
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
B. I MAGE R ECONSTRUCTION
The network architectures for the SDCFNet and regular CNN auto-encoders are shown in Table 3.
The ﬁlter expansion in the SDCFNet auto-encoder is truncated to K = 8 and K α = 3 .
SGD with decreasing learning rate from 10 − 2 to 10 − 4 is used to train both networks for 20 epochs.
[Table]