45
Persistent Homology: Basics Application to Neuroscience Generalizations Metrics on Persistence Modules and an Application to Neuroscience Magnus Bakke Botnan NTNU November 28, 2014 Magnus Bakke Botnan NTNU Metrics on Persistence Modules and an Application to Neuroscience

Metrics on Persistence Modules and an Application to ... · Persistent Homology: Basics Application to Neuroscience Generalizations Metrics on Persistence Modules and an Application

Embed Size (px)

Citation preview

Persistent Homology: Basics Application to Neuroscience Generalizations

Metrics on Persistence Modules and anApplication to Neuroscience

Magnus Bakke BotnanNTNU

November 28, 2014

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Part 1: Basics

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

The Study of Sublevel Sets

I A pair (M, f ) where M is a topological space and f : M → R suchthat Hk(f −1(−∞, s]) is finitely generated for all s ∈ R.

I For every s ≤ t we get inclusions

f −1(−∞, s] ⊆ f −1(−∞, t]

I ... and at the level of homology

Fs := Hk(f −1(−∞, s])→ Hk(f −1(−∞, t]) =: Ft

Note: homology is computed with coefficients in a field k (usually Z/pZfor p a small prime).

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Persistence Modules

DefinitionA persistence module is a functor F : R≤ → vec (finite dimensionalvector spaces).

ExampleA sublevel filtration f : M → R gives rise to a persistence module.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Persistence Modules

DefinitionLet J ⊆ R be an interval. The interval persistence module over J isthe persistence module I J defined by

I J(t) =

{k if t ∈ J

0 otherwise

with id : I J(t)→ I J(t ′) whenever t ≤ t ′ ∈ J and 0 otherwise.

Note: I J is indecomposable and I ∅ is the 0 persistence module.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Persistence Modules

Theorem (Krull–Remak–Schmidt–Azumaya)If

F ∼=⊕l∈L

I Jl F ∼=⊕k∈K

I J′k ,

then there is a bijection σ : L→ K such that Jl = J ′σ(l) for all l ∈ L. Sowhenever F admits such a decomposition we can characterize it by themultiset Dgm(F ) = {Jl : l ∈ L} of intervals.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Persistence Modules

Theorem (Crawley-Boevey)A persistence module decomposes as a direct sum of interval persistencemodules.

Note: If we replace R with Z then the theorem follows from thestructure theorem for finitely generated modules over a PID.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Persistence Modules

Pointcloud Data

I Let P ⊂ Rn be a finite set of points. The distance function

d : Rn → R, d(x) = minp∈P||x − p||2

defines a sublevel filtration of Rn. We depict the sublevel sets asballs of radius r around the points of P.

I The subelevel set d−1(0, r ] is homotopy equivalent to the nerve ofthe cover formed by the union of radius r balls around each point ofP.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Persistence Modules

(Complex gettinghard to draw by hand. . . )

ε

εH1

H0

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Interleavings

Two persistence modules F and G are ε-interleaved if there exist anε ≥ 0 and two families of homomorphisms {φt : F (t)→ G (t + ε)}t∈Rand {ψt : G (t)→ F (t + ε)}t∈R such that the following four diagramscommute for all t ≤ t ′:

F (t − ε) F (t + ε) F (t + ε) F (t ′ + ε)

G (t) G (t) G (t ′)

F (t) F (t) F (t ′)

G (t − ε) G (t + ε) G (t + ε) G (t ′ + ε)

Note: 0-interleaving means that F and G are naturally isomorphic.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Interleavings

DefinitionThe interleaving distance dI between two persistence modules F and Gis

dI (F ,G ) = inf[ε ∈ [0,∞)|F and G are ε-interleaved]

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Interleavings

DefinitionA matching between Dgm(F ) and Dgm(G ) is a subsetS ⊆ (Dgm(F ) ∪ {∅})× (Dgm(G ) ∪ {∅}) such that every element ofDgm(F ) and Dgm(G ) appears in exactly one pair.

DefinitionThe bottleneck distancebetween F ∼=

⊕J∈Dgm(F ) I

J

and G ∼=⊕

J∈Dgm(G) IJ is

defined by

dB(F ,G ) = infS∈Match(F ,G)

max(J1,J2)∈S

dI (IJ1 , I J2 )

Dgm(F )

Dgm(G )

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Interleavings

Algebraic Stability Theorem (AST)

Theorem (Chazal et al., Bauer & Lesnick)The interleaving distance equals the bottleneck distance:

dI = dB

Thus, the interleaving distance can be computed by matchingindecomposables.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Interleavings

Application 1: Stability

Let f , g : M → R be such that |f (x)− g(x)| ≤ ε for all x ∈ M.

I We get inclusionsf −1(−∞, x ] ⊆ g−1(−∞, x + ε] ⊆ f −1(−∞, x + 2ε]

I ... and homomorphisms Fx → Gx+ε → Fx+2ε.

I This defines an ε-interleaving between F and G .

I Thus, dI (F ,G ) ≤ ε and sublevel persistence is stable.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Interleavings

Application 2: Approximations

I Need to approximate persistence computations as the memoryneeded for the standard constructions grows exponentially in thenumber of input points.

I A set of k close points introduces 2k − 1 simplices in the simplicialcomplex.

I With AST we can give provable error bounds in the bottleneckdistance by defining an interleaving between the approximatepersistence module and the original one.

I Joint work with Gard Spreemann.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Interleavings

5000 points on RP2 embedded in R4 ((x , y , z) 7→ (xy , xz , y2 − z2, 2yz)).Note: Z2 coefficients.

0.000 0.108 0.216 0.324 0.432 0.540Birth

0.000

0.108

0.216

0.324

0.432

0.540

Dea

th

H1

0.000 0.108 0.216 0.324 0.432 0.540Birth

0.000

0.108

0.216

0.324

0.432

0.540

Dea

th

H2

0.000 0.108 0.216 0.324 0.432 0.540Birth

0.000

0.108

0.216

0.324

0.432

0.540

Dea

th

H3

0.0 0.1 0.2 0.3 0.4 0.5Scale

0

200000

400000

600000

800000

1000000

1200000

Sim

plex

coun

t

ε = 1No collapseNet tree

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Part 2: An Application to Neuroscience

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Place Cell Data

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Place Cell Data

Place Cells and Place Fields

I A place cell is a neuron within the hippocampus that becomesactive when then animal enters a particular place in theenvironment. Such a region is a place field of the neuron.

I The collection of place cells is thought to act as cognitiverepresentation of the environment.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Place Cell Data

Spike Trains

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Homology of Neural Network

Homological Analysis of Place Cell Network

I The place fields cover the environment so the spatial topologyshould be detectable from place cell correlations.

I There are place cells with spatially separate place field centers thatare highly-correlated as some cells only fire when the animals headpoints in a specific direction. Such firings also introduce non-trivialtopology in the network.

I The cells also fire due other external factors (stress, fear, lightconditions etc.).

I Joint work with the Roudi group at the Kavli Institute, Nils Baasand Gard Spreemann.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Homology of Neural Network

Example Place Fields

Figure: Place fields for two place cells recorded from a rat exploring a 1m x 1mbox.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Homology of Neural Network

Setup:

I k place cells {c1, . . . , ck} in the hippocampus.

I Compute correlation corr(ci , cj) between any pair of place cells.

Let ∆k−1 be the full simplicial complex having the place cells as0-simplices. Define a filtering function f : ∆k−1 → R by

I f (ci ) = 0

I f ([ci , cj ]) = 1− corr(ci , cj)

I Inductively we define the filtering function on a higher-dimensionalsimplex to the maximum filtration value over all its faces.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Homology of Neural Network

Simulated Data

0 10 20 30 40

0

10

20

30

40

(a) Place Field

45°

90°

135°

180°

225°

270°

315°

0.1 0.2 0.3 0.4 0.5 0.6 0.7

(b) Head Direction and Activity

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Homology of Neural Network

Simulated Data: Persistence Diagrams

0.0 0.4 0.8 1.2 1.6 2.0Birth

0.0

0.4

0.8

1.2

1.6

2.0

Deat

h

H1

(a) Persistence diagramfor H1 where theenvironment is a boxwith a cylinder in themiddle.

0.0 0.4 0.8 1.2 1.6 2.0Birth

0.0

0.4

0.8

1.2

1.6

2.0

Deat

h

H1

(b) Same as (a) butwithout head directiontuning.

0.0 0.4 0.8 1.2 1.6 2.0Birth

0.0

0.4

0.8

1.2

1.6

2.0

Deat

h

H1

(c) Same as (a) butwithout spatial tuning.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Homology of Neural Network

Future Plan

We will fit a model to the real data and try to understand the points inthe persistence diagram by removing the following in succession:

I Spatial tuning: we expect to see a persistent H1 coming frompreferences in head direction.

I Head direction tuning: we don’t know what will come out.Random-like or do we find interesting structure?

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Homology of Neural Network

Real Data: Persistence Diagram

0 6 12 18 24 30Birth

0

6

12

18

24

30

Deat

h

H1

Figure: Persistence diagram for H1 computed from real data recorded from arat exploring a square.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Part 3: GeneralizationsJoint work with Mike Lesnick.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

Generalizations

Why only restrict the domain of our functors to R? We can studyfunctors

I F : Rn → vec.

I ... or more generally from any poset.

I ... or even more generally between arbitrary categories C and D.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

I Carlsson and Memoli (2013)show that single linkageclustering (H0 in persistence) isthe unique hiearchical clusteringmethod satisfying certaindesirable properties(’functoriality’).

I Not so nice in practice due tothe chaining phenomenon(illustrated).

I Idea: filter by both density andradius → 2D persistencemodule.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

......

... · · ·

V0,2 V1,2 V2,2 · · ·

V0,1 V1,1 V2,1 · · ·

V0,0 V1,0 V2,0 · · ·

I We get a persistencemodule of this form.

I These persistencemodules are verycomplicated objects andthere is no generaldecomposition into’simple’indecomposables.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

But the interlaving distance generalizes readily:

I F ,G : Rn → vec are ε-interleaved for ε = (ε, . . . , ε) ∈ Rn if we havetwo families of homomorphisms {φt : F (t)→ G (t + ε)} and{ψt : G (t)→ F (t + ε} such that the interleaving diagrams commutefor all t ≤ t′:

F (t− ε) F (t + ε) F (t + ε) F (t′ + ε)

G (t) G (t) G (t′)

F (t) F (t) F (t′)

G (t− ε) G (t + ε) G (t + ε) G (t′ + ε)

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

Definition (Interlaving Distance)

dI (F ,G ) = inf[ε ∈ [0,∞)|F and G are ε-interleaved].

But can we compute this?

I For ε = 0 this belongs to a certain module isomorphism problemwhich can be checked in polynomial time. There are alsorandomized algorithms since invertible maps are abundant.

I For ε > 0: open problem! Naıvely one can solve a system ofmultivariate quadratic equations but this is NP-hard.

I Being an ε-interleaving morphism for ε > 0 is not a generic property(in any dimension) → no randomized algorithms.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

Indecomposables can be computed but the interleaving distance can notbe computed by a matching of indecomposables as the following exampleof 2-interleaved persistence modules illustrates:

Two indecomposables One indecomposable

......

......

k2 k2 k2 k2 · · ·

k2 k2 k2 k2 · · ·

k2 k2 k2 k2 · · ·

k2 k2 k2 k2 · · ·

......

......

k2 k2 k2 k2 · · ·

k k2 k2 k2 · · ·

0 k k2 k2 · · ·

0 0 k k2 · · ·

( 01 )

( 01 )

( 11 )

( 11 )

( 10 )

( 10 )

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

Zigzag Diagrams

Maybe we cannot understand the full decomposition but we can choose1D paths

......

...

· · · Vi,j+2 Vi+1,j+2 Vi+2,j+2 · · ·

· · · Vi,j+1 Vi+1,j+1 Vi+2,j+1 · · ·

· · · Vi,j Vi+1,j Vi+2,j · · ·

......

...

· · · ← Vi,j+2 → Vi+1,j+2 ← Vi+1,j+1 → Vi+2,j+1 ← Vi+2,j → · · ·

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Multidimensional Persistence

Zigzag diagrams decompose nicely

Theorem (Gabriel’s Theorem)Diagrams of the form

· · · ↔ Vi ↔ Vi+1 ↔ Vi+2 ↔ · · ·

decompose into simple pieces like in 1D persistence.

I For a zigzag module V we have a well-defined diagram Dgm(V ).

I For zigzag modules V ,W of the same type we have a distance dBbetween their diagrams.

I But how do we get an algebraic description of this metric? Notclear...

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Levelset Zigzag Persistence

Levelset Zigzag Persistence

We return to the situation of a real-valued function f : M → R. LetMt = f −1(t) be the levelset at t and MI = f −1(I ) for intervals I ⊂ R.We assume that f is of morse type:

I There is a finite set of real-valued indices a1 < a2 < · · · < an calledcritical values, such that over each open interval

I = (−∞, a1), (a1, a2), . . . , (an−1, an), (an,∞)

the slice MI is homeomorphic to a product of the form M ′ × I , withf being the projection onto the factor I .

I Each homeomorphism M ′ × I → MI extends to a continuousfunction M × I → MI , where I is the closure of I ⊂ R.

I We assume that each Mt has finitely generated homology.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Levelset Zigzag Persistence

Given (M, f ) of Morse type we select a set of indices si such that

−∞ < s0 < a1 < s1 < a2 < · · · < sn−1 < an < sn <∞

and define an associated zigzag diagram

M00 → M1

0 ← M11 → M2

1 ← · · · → Mnn−1 ← Mn

n

where M ji = M[si ,sj ] = f −1[si , sj ]. Upon taking homology we get the

levelset zigzag persistence f . We denote its persistence diagram byDgmZZ(f ).

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Levelset Zigzag Persistence

Example from Carlsson, de Silva, MorozovSoCG’2009

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Levelset Zigzag Persistence

Theorem (Diamond Principle, Carlsson et al. SoCG’2009)Any two monotone zigzags in the pyramid diagram carry the sameinformation in their persistent homology. In particular, levelset zigzagcarries more information than sublevel persistent homology.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Levelset Zigzag Persistence

Theorem (Stability, Carlsson et al.)

dB(DgmZZ(f),DgmZZ(g)) ≤ ||f − g ||∞

As in the 1D case we would like an algebraic description of theBottleneck distance.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Levelset Zigzag Persistence

I Define a persistence module F : closed(R)→ vec byF [i , j ] = Hk(f −1[i , j ])

I Using the diamond principle one can show that such a functordecomposes into a direct sum of four types of simpleindecomposables.

(−∞,−∞)

(∞,∞)

ab

(a)

(−∞,−∞)

(∞,∞)

ab

(b)

(−∞,−∞)

(∞,∞)

ab

(c)

(−∞,−∞)

(∞,∞)

ab

(d)

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Levelset Zigzag Persistence

ObservationIf ||f − g ||∞ ≤ ε then we get inclusions

f −1[i , j ] ⊆ g−1[i − ε, j + ε] ⊆ f −1[i − 2ε, j + 2ε]

and thus an ε-interleaving between F and G .

ConjectureThe relation from 1D persistence generalizes to levelset zigzagpersistence, i.e. dI = dB

I Partial result: we have reduced the problem to case of persistencemodules built from pieces of type (a) on the previous slide.

I Approaches from 1D persistence don’t work.

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Cosheaves

Other Aspects

I The previous discussion works equally if we study open sets of M.This defines a functor F : open(R)→ vec known as the Leraypre-cosheaf. Or, if we dualize, the Leray pre-sheaf.

I This has spawned a lot of interesting research into generalizations ofpersistent homology (Curry, Ghrist, MacPherson, Patel et al.).

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience

Persistent Homology: Basics Application to Neuroscience Generalizations

Cosheaves

Thank you!

Magnus Bakke Botnan NTNU

Metrics on Persistence Modules and an Application to Neuroscience