Top Banner
Group Equivariant CNNs beyond Roto-Translations: B-Spline CNNs on Lie groups Erik J Bekkers Department of Mathematics Computer Science, Centre for Analysis, Scientific computing and Applications (CASA) Eindhoven University of Technology Amsterdam Machine Learning Lab Informatics Institute University of Amsterdam Starting next month at 4TU.AMI Event Mathematics of Deep Learning Delft, 2019-11-05
51

Group Equivariant CNNs beyond Roto-Translations - 4TU

Apr 21, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Group Equivariant CNNs beyond Roto-Translations - 4TU

Group Equivariant CNNs beyond Roto-Translations: B-Spline CNNs on Lie groups

Erik J BekkersDepartment of Mathematics Computer Science,

Centre for Analysis, Scientific computing and Applications (CASA)

Eindhoven University of Technology

Amsterdam Machine Learning Lab

Informatics Institute

University of Amsterdam

Starting next month at

4TU.AMI EventMathematics of Deep LearningDelft, 2019-11-05

Page 2: Group Equivariant CNNs beyond Roto-Translations - 4TU

Presentation outline

• Motivation

• Group theory (preliminaries)

• G-CNNs• Construction and intuition• Theorem: NN-layers with equivariance constraints => G-CNNs

• B-Spline based G-CNNs: G-CNNs on arbitrary Lie groups

• Conclusion

2

Page 3: Group Equivariant CNNs beyond Roto-Translations - 4TU

3

Motivation

Page 4: Group Equivariant CNNs beyond Roto-Translations - 4TU

Recognition by components

4Such reasoning motivatesrelated work on capsule nets

Hinton, Krizhevsky & Wang, 2011Lenssen, Fey & Libuschewski, 2018

Biederman, 1987

Group theory: Symmetries and relative information processing

Page 5: Group Equivariant CNNs beyond Roto-Translations - 4TU

5

Aim: Build AI systems that are equipped with geometric understanding• Do not have to learn geometric structure and relations (equivariance)• Are data-efficient by exploiting symmetries (no need for geometric data augmentation)• High representation power by recognition by components (capsule net view point)

Page 6: Group Equivariant CNNs beyond Roto-Translations - 4TU

6

Group theory (preliminaries)

Page 7: Group Equivariant CNNs beyond Roto-Translations - 4TU

(Symmetry) Groups

7

Page 8: Group Equivariant CNNs beyond Roto-Translations - 4TU

The translation group

8

Page 9: Group Equivariant CNNs beyond Roto-Translations - 4TU

The roto-translation group

9

Special Euclidean Motion group

Page 10: Group Equivariant CNNs beyond Roto-Translations - 4TU

Representations transfer group structure to images

10

Set of points Convolution kernel

A linear operator that transforms functions on some space and parameterized by group elements is called a representation of the group if it caries the group structure in the following way

Page 11: Group Equivariant CNNs beyond Roto-Translations - 4TU

Representations transfer group structure to images

11

Example:

2D imagethe group SE(2)roto-translation

A linear operator that transforms functions on some space and parameterized by group elements is called a representation of the group if it caries the group structure in the following way

Page 12: Group Equivariant CNNs beyond Roto-Translations - 4TU

Transforming SE(2) descriptors

12

Pattern of local orientations:

Density on position orientation space:

Page 13: Group Equivariant CNNs beyond Roto-Translations - 4TU

13

CNNs and G-CNNs via group representations

Page 14: Group Equivariant CNNs beyond Roto-Translations - 4TU

Cross-correlationsRepresentation of the translation group!Cross-correlation:

2D kernel 2D feature map 2D feature map (after ReLU)

Page 15: Group Equivariant CNNs beyond Roto-Translations - 4TU

Group equivarianceExample: Convolutions are equivariant w.r.t. the translation group

Representation of the translation group

Page 16: Group Equivariant CNNs beyond Roto-Translations - 4TU

Group equivarianceExample: Convolutions are generally not equivariant w.r.t. roto-translations.

Representation of the roto-translation group

Representation of the translation group

Page 17: Group Equivariant CNNs beyond Roto-Translations - 4TU

Roto-translation equivariant cross-correlationsRepresentation of the roto-translation group!Lifting correlations:

rotationtranslation

Rotated kernel 2D feature map SE(2) feature map

Page 18: Group Equivariant CNNs beyond Roto-Translations - 4TU

Roto-translation equivariant cross-correlations

Representations of SE(2)

Lifting layer

?

?

Page 19: Group Equivariant CNNs beyond Roto-Translations - 4TU

Roto-translation equivariant cross-correlationsGroup correlations:

rotationtranslation

Rotated kernel SE(2) feature map SE(2) feature map

planar rotation

periodic shift

Page 20: Group Equivariant CNNs beyond Roto-Translations - 4TU

Class probability

Architecture for rotation invariant patch classification

Input image

“normal” (0) vs “mitotic” (1)

Rotation equivariant

Max-pooling over rotations guarantees rotation invariance

Bekkers, Lafarge et al. 2018

Page 21: Group Equivariant CNNs beyond Roto-Translations - 4TU

ResultsBekkers, Lafarge et al. 2018

G-CNNs outperform CNNs (matched in network complexity):

• Even when training the classical CNNs with and G-CNNs without data-augmentation

• G-CNNs do not have to spend valuable network capacity on learning geometric structure -> focus entirely on learning effective representations

Page 22: Group Equivariant CNNs beyond Roto-Translations - 4TU

Related work on group equivariant networks

Group convolution networks(domain extension)

Steerable filter networks(co-domain extension)

LeCun et al 1990 ℤ2 translation networks

Mallat et al. 2013, 2015 SE(2) Scattering transform & SVMBekkers et al. 2014-2018 SE(2) via B-splines, 2 layer G-CNN

Cohen-Welling 2016 p4m via 90o rotations + flips + theory!Dieleman et al. 2016 p4m via 90o rotations + flips

Weiler et al. 2017 SE(2) via circular harmonicsZhou et al. 2017 SE(2) via bilinear interpolationBekkers et al. 2018 SE(2) via bilinear interpolationHoogeboom et al. 2018 S(2,6) hexagonal grids

Winkels-Cohen 2018 SE(3,N) + m 90o rotations + flipsWorrall-Brostow 2018 SE(3,N) 90o rotations

Cohen et al. 2018 SO(3) via spherical harmonics

Worrall et al. 2017 SE(2) irrepMarcos et al. 2017 SE(2) vector field networks

Kondor 2018 SE(3) irrep, N-body netsThomas et al. 2018 SE(3) irrep, point cloudsWeiler et al. 2018 SE(3) irrep

Esteves SO(3)/SO(2) irrepKondor-Trivedi 2018 SO(d) irrep (on compact

quotient sp.)

Continuous Discrete

22

Based on the overview given in Cohen-Geiger-Weiler 2018

Page 23: Group Equivariant CNNs beyond Roto-Translations - 4TU

Can we use the theory in practice for other groups?

23

G-CNNs are currently limited to compact groups:

Discrete <> no interpolation

Continuous <> Fourier theory on groups

HexaConvHoogeboom, Peters, Cohen, Welling – ICLR 2018

Circular/Spherical harmonicsWorall, Garbin, Turmukhambetov, Brostow – CVPR 2017

Why this limitation? Available tools. We need to implement transformations (and sampling) of the convolution kernels.

Solution? A new flexible class of basis functions that enables to implement G-convs for arbitrary Lie groups.

B-Splines on Lie groups

Page 24: Group Equivariant CNNs beyond Roto-Translations - 4TU

24

Equivariance G-CNNsIf you want equivariance G-CNNs are the way to go

Page 25: Group Equivariant CNNs beyond Roto-Translations - 4TU

The input vector

The output vector

A linear mapping parameterized by weights

A bias term

An activation function (applied element wise)

The trainable parameters

Classical artificial neural networks

Page 26: Group Equivariant CNNs beyond Roto-Translations - 4TU

Artificial NNs in the continuous world

26

The input “vector”: function on space X

The output “vector”: function on space Y

A linear mapping parameterized by weights

A bias term

An activation function (applied element wise)

The trainable parameters

Images as functions in Linear (and bounded) mappings between feature maps are kernel operators

(Dunford-Pettis)

Equivariance constraint on K implies group convolution!

Page 27: Group Equivariant CNNs beyond Roto-Translations - 4TU

Artificial NNs in the continuous world

27

The input “vector”: function on space X

The output “vector”: function on space Y

A linear mapping parameterized by weights

A bias term

An activation function (applied element wise)

The trainable parameters

Images as functions in Linear (and bounded) mappings between feature maps are kernel operators

(Dunford-Pettis)

Equivariance constraint on K implies group convolution!

Bekkers 2019, Thm 1**Work with Remco Duits at TU/e. See also: Duits 2005 – Thm 25, Cohen, Geiger, Weiler 2018 - Thm 6.1, Kondor, Trivedi 2018 - Thm 1

Page 28: Group Equivariant CNNs beyond Roto-Translations - 4TU

Our options for SE(2) equivariance2D cross-correlations

SE(2) lifting correlations

SE(2) G-correlations

Equivariance requires

With

Page 29: Group Equivariant CNNs beyond Roto-Translations - 4TU

29

B-Splines on Lie groups

Page 30: Group Equivariant CNNs beyond Roto-Translations - 4TU

B-Splines on ℝ𝑑𝑑

30

1D basis function

Basis function on

Uniform B-Spline on

Piecewise polynomial!Finite support!

Page 31: Group Equivariant CNNs beyond Roto-Translations - 4TU

How to define B-Splines on manifolds?

31

What is the meaning of “uniform” on a manifold?

What parameterization to use?

Page 32: Group Equivariant CNNs beyond Roto-Translations - 4TU

The exponential and logarithmic map

32

The distance from a point to theorigin is given by the length of its“initial velocity vector”

Link: SO(3)/SO(2)

Page 33: Group Equivariant CNNs beyond Roto-Translations - 4TU

A grid on the Lie algebra maps to a grid on G

33

Now we can define B-splines on the vector space of the Lie algebra.

This then defines a function on the group.

Equidistant w.r.t. the default distance on the group

Page 34: Group Equivariant CNNs beyond Roto-Translations - 4TU

B-Splines on Lie groups

34

Via the Logarithmic map

Examples of B-Splines on H

2D RotationsIsotropic scaling3D rotations (quotient)

Approximately uniform

Page 35: Group Equivariant CNNs beyond Roto-Translations - 4TU

Unique properties of B-spline kernels

35Localized Scaled Atrous/Dilated Deformable

Page 36: Group Equivariant CNNs beyond Roto-Translations - 4TU

Properties of B-splines on Lie groups

• Enables to construction a basis on any Lie group

• To build full G-CNNs for groups of type we only need:• The group product and inverse of• Its action on • The logarithmic map (which is analytic)

• Enables heuristics from conventional CNN architectures:• Dense/”fully connecting” convolution kernels on H• Localized convolutions on H• Atrous convolutions on H• Deformable kernels (also optimize over the centers of the splines)• …

36

Modular code (released soon…)<< import gsplinets<< layers = gsplinets.layers(‘SE2')

Page 37: Group Equivariant CNNs beyond Roto-Translations - 4TU

37

Results

Page 38: Group Equivariant CNNs beyond Roto-Translations - 4TU

Case 1 (Scaling invariance): Facial landmark detection | CelebA database | 6 G-CNN layers

38

Scaling a 2D kernel Scaling a G-kernel Translating and scaling a G-kernel

Principle behind scale-translation G-CNNs

Page 39: Group Equivariant CNNs beyond Roto-Translations - 4TU

Case 1 (Scaling invariance): Facial landmark detection | CelebA database | 6 G-CNN layers

39

Page 40: Group Equivariant CNNs beyond Roto-Translations - 4TU

Case 2 (Rotation invariance): Cancer detection | PCAM database | 4 G-CNN layers

40

normal

normal

mitotic

2D CNN

Page 41: Group Equivariant CNNs beyond Roto-Translations - 4TU

41

Conclusion

Page 42: Group Equivariant CNNs beyond Roto-Translations - 4TU

Conclusion• G-CNNs “naturally” arise from NNs under equivariance constraints

• G-CNNs improve upon classic CNNs by• Making data augmentation w.r.t. the group obsolete• No trainable weights need to be spend on learning geometry behavior• Additional geometry structure allows to deal with context (recognition by components, relative poses)

• B-Splines can be used to build G-CNNs for a large class of transf. groups

• They enable unique properties• Localized G-convs• Atrous G-convs• Deformable G-convs• Flexibility in kernel resolution (# basis functions) vs sampling resolution (# grid points)

• Experimental results• G-CNNs outperform 2D CNNs• Localized G-CNNs generally outperform full/dense G-CNNs• Atrous G-CNNs generally outperform full/dense G-CNNs

42

Page 43: Group Equivariant CNNs beyond Roto-Translations - 4TU

Thank you for your attention!

Ph.D. position on this topic coming up at AMLab, University of Amsterdam

Amsterdam Machine Learning Lab

Informatics Institute

University of Amsterdam

Page 44: Group Equivariant CNNs beyond Roto-Translations - 4TU

44

Backup slidesOn SE(2) and SO(3) and Exp/Log map

Page 45: Group Equivariant CNNs beyond Roto-Translations - 4TU

Left-invariant vector fields (push forward of left mult.)

45

Left-invariant vector field

A tangent space at the origin defines a left-invariant tangent bundle on the group

Page 46: Group Equivariant CNNs beyond Roto-Translations - 4TU

The 3D Rotation group and the sphere as a quotient

46

The 3D rotation group The 2-sphere as a quotient group

Page 47: Group Equivariant CNNs beyond Roto-Translations - 4TU

Some animations on vector fields

47

The group structure can be usedto “transport” vectors.

A vector at the origin defines awhole vector field!

This generates a frame ofreference attached to each 𝑔𝑔 ∈ 𝐺𝐺

In a quotient group this frame isnot unique…

Page 48: Group Equivariant CNNs beyond Roto-Translations - 4TU

The exponential map: integrating along a vector field

Link: B-Splines on S2

Page 49: Group Equivariant CNNs beyond Roto-Translations - 4TU

B-splines on quotient groups require symmetry constraints

49

Page 50: Group Equivariant CNNs beyond Roto-Translations - 4TU

50

Backup slidesEquivariance diagram with actual results

Page 51: Group Equivariant CNNs beyond Roto-Translations - 4TU

Real example (rotation invariant features)