M = 2 # the population has two age groups

N = 5e4 # and this is the total population

# model parameters

beta = 0.02 # infection rate

gIa = 1./7 # removal rate of asymptomatic infectives

gIs = 1./7 # removal rate of asymptomatic infectives

alpha = 0.2 # fraction of asymptomatic infectives

fsa = 0.8 # the self-isolation parameter

# set the age structure

fi = np.array([0.25, 0.75]) # fraction of population in age age group

Ni = N*fi

# set up initial condition

Ia0 = np.array([10, 10]) # each age group has asymptomatic infectives

Is0 = np.array([10, 10]) # and also symptomatic infectives

R0 = np.array([0, 0]) # there are no removed individuals initially

S0 = Ni - (Ia0 + Is0 + R0) # initial number of susceptibles

# 2. Define function that generates two-step release protocol

def get_events(protocol= [50,100]):

end_phase_1, end_phase_2 = protocol

C = np.array([[18., 9.], [3., 12.]])

events = []; contactMatrices = []

# Note that the event functions take a vector argument

# "xt" instead of a tuple (S, Ia, Is).

# When defining the event functions for the SIR

# model, the following correspondence has to be used:

# S == xt[ :M]

# Ia == xt[1*M:2*M]

# Is == xt[2*M:3*M]

# (For any model, the order for the event functions is

# exactly the same as in the arguments of model.simulation)

#

# This is a dummy event which will never occur;

# it is used to set the initial contact matrix

events.append( lambda t, xt: 1. )

contactMatrices.append( C )

# Event 1: contact matrix reduced by a factor of 4 once

# number of symptomatic infectives exceeds a threshold

# ("start of full lockdown")

lockdown_threshold_on = 1900

def event1(t,xt):

return np.sum(xt[2*M:3*M]) - lockdown_threshold_on

event1.direction = +1 # need to pass threshold from below for event

events.append(event1); contactMatrices.append( 0.25*C )

# Event 2: contact matrix at 75% of original contact matrix after

# a given time ("start of partial lockdown").

def event2(t,xt):

return t - end_phase_1

events.append(event2); contactMatrices.append( 0.75*C )

# Event 3: original contact matrix is restored after a given time

# ("end of partial lockdown").

def event3(t,xt):

return t - end_phase_2

events.append(event3); contactMatrices.append( C )

return events, contactMatrices

# 3. Define cost function

maximal_value_for_Is = 2000

def evaluate_cost_function(t_arr,traj,protocol,events_occured,

sdc_prefactor=1.,

sdc_rate=1/7.):

infinity = 1e300 # using np.inf would be more proper, but will

# result in warnings throughout the minimization once a protocol

# is probed that violates one of the hard constraints.

#

# hard constraints:

# - times of protocol need to be non-negative

if (np.array(protocol) < 0).any(): return infinity

# - second stage of intervention needs to end after first stage ends

if protocol[0] > protocol[1]: return infinity

# - second stage of intervention needs to end before 700 days

if protocol[1] > 700: return infinity

# - number of symptomatic infectives should

# never exceed a given maximal value

if np.max( np.sum( traj[2*M:3*M],axis=0 ) ) > maximal_value_for_Is:

return infinity

# Evaluate results of protocol.

# Which phases have occured in the simulation?

have_lockdown_start = False

have_lockdown_end_0 = False

have_lockdown_end_1 = False

for i,e in enumerate(events_occured):

if e[1] == 1:

lockdown_start = e[0]

have_lockdown_start = True

elif e[1] == 2:

lockdown_end_0 = e[0]

have_lockdown_end_0 = True

elif e[1] == 3:

lockdown_end_1 = e[0]

have_lockdown_end_1 = True

# calculate cost function

cost = 0.

# cost of social distancing

if have_lockdown_start:

if have_lockdown_end_0:

cost += sdc_prefactor* np.exp(sdc_rate* \

(lockdown_end_0-lockdown_start))

else:

cost += infinity

#

if have_lockdown_end_0 and have_lockdown_end_1:

cost *= np.exp(0.2*sdc_rate*(lockdown_end_1-lockdown_end_0))

# cost of infection

cost += np.trapz( np.sum( traj[2*M:3*M],axis= 0 ),t_arr)

return cost

# 4. Define function that evaluates the cost of a given protocol

def evaluate_cost_of_protocol(model,protocol,

verbose=False,return_trajectory=False,

sdc_prefactor=10.,

sdc_rate=1/7.):

# define events corresponding to given protocol

events, contactMatrices = get_events(protocol)

# run simulation

Tf = 1000; Nt = (Tf +1)*10

result = model.simulate(S0, Ia0, Is0,

events=events,contactMatrices=contactMatrices,

Tf=Tf, Nf=Nt)

# evaluate cost

cost = evaluate_cost_function(t_arr=result[’t’],

traj=result[’X’].T,

protocol=protocol,

events_occured=result[’events_occured’],

sdc_prefactor=sdc_prefactor,

sdc_rate=sdc_rate)

if return_trajectory:

return cost, result[’t’], result[’X’], result[’events_occured’]

else:

return cost

# 5. Define minimiser

def minimizing_function(sdc_prefactor,sdc_rate,

protocol):

#This is the function that will be minimised by the cma-es algorithm

costs = evaluate_cost_of_protocol(model=model,

protocol=protocol,

sdc_prefactor=sdc_prefactor,

sdc_rate=sdc_rate,

return_trajectory=False)

return costs

def find_optimal_protocol(initial_guess,sdc_prefactor,sdc_rate,

model,

verbose=True,initial_variance=5.):

func = partial(minimizing_function, sdc_prefactor, sdc_rate)

# set parameters for minimisation based on cma-es algorithm

number_of_threads = 4

number_iterations = 1000

p = Pool(number_of_threads)

options = cma.CMAOptions()

options[’popsize’] = 12

# run minimisation

start_time = time.time()

optim = cma.CMAEvolutionStrategy(initial_guess, initial_variance,

options)

iteration = 0

while not optim.stop() and iteration < number_iterations:

positions = optim.ask()

values = p.map(func, positions)

optim.tell(positions, values)

optim.disp()

iteration += 1

end_time = time.time()

if verbose:

print("Time: ", end_time - start_time)

print("Value: ", optim.best.f)

print("Parameters: ",optim.best.x)

return optim.best.x

# 6. Find optimal protocol for three different scenarios

# Initialise model

parameters = {’alpha’:alpha,’beta’:beta, ’gIa’:gIa,’gIs’:gIs,’fsa’:fsa}

model = pyross.control.SIR(parameters, M, Ni)

initial_guess=[70,200] # use same initial guess for all minimisations

sdc_prefactor = 1. # means that social distancing cost and

# cost of infection have the same weight in our model

# Low, intermediate, and high cost rate for social distancing:

sdc_rates = [1e-2,1e-1,1.]

optimal_protocols = []

for i,sdc_rate in enumerate(sdc_rates):

optimal_protocol = find_optimal_protocol(initial_guess=initial_guess,

sdc_prefactor=sdc_prefactor,

sdc_rate=sdc_rate,

model=model)

optimal_protocols.append(optimal_protocol)

# 7. Visualise results

def plot_result(protocol,model,

title=’Optimised intervention parameters’,

t_max=None):

#

cost, t_arr, traj, events_occured = evaluate_cost_of_protocol(

model=model,

protocol=protocol,

return_trajectory=True)

Is = np.sum(traj[:,2*M:],axis=-1)

fig, ax = plt.subplots(1,1,figsize=(7,5))

ax.set_title(title)

ax.axhline(maximal_value_for_Is,color=’red’,ls=’--’,

label=r’Constraint’)

ax.axvspan(events_occured[0][0],events_occured[1][0],

color=’crimson’,label=’Intervention 1’,alpha=0.2)

ax.axvspan(events_occured[1][0],events_occured[2][0],

color=’orange’,label=’Intervention 2’,alpha=0.2)

ax.plot(t_arr,Is)

if t_max == None:

ax.set_xlim(np.min(t_arr),np.max(t_arr))

else:

ax.set_xlim(np.min(t_arr),t_max)

ax.set_ylabel(’Symptomatic infectives’)

ax.set_xlabel(r’time [days]’)

ax.legend(loc=’upper right’,fontsize=12,framealpha=1.)

plt.show(); plt.close(fig)

optimal_protocol_labels = [’Low cost of social distancing’,

’Intermediate cost of social distancing’,

’High cost of social distancing’]

t_max = [700,250,250]

for i,optimal_protocol in enumerate(optimal_protocols):

plot_result(protocol=optimal_protocol,model=model,t_max=t_max[i],

title=optimal_protocol_labels[i])

Figure 1: Optimisation of NPI protocol parameters, c.f. example 7. The
protocol consists of two durations, namely the time of a full lockdown
(initial contact matrix reduced via a prefactor 1/4), and a subsequent partial
lockdown (initial contact matrix reduced via a prefactor 3/4). The cost of a
protocol is comprised of a i) cost for social distancing (= reducing the
entries of the contact matrix), and ii) a cost of infection. As a hard
constraint, the protocol must keep the number of infectives below a defined
threshold, shown as horizontal dashed line. The optimal protocol minimises the
total cost. Subplots (a), (b), (c), show three results of optimisation for the
same system, depending on the cost of social distancing.

###  8 Model sensitivity

Here we illustrate the usage of PyRoss to study model sensitivity. We use four
different models, SIR, SEIR, SIR with stages, and SEIR with stages. The models
predict similar epidemic curve before the lockdown, while the they show
distinct behavior after lockdown. We show that the addition of an exposed
$E_{i}$ compartment (to give an age-structured SEIR model) makes the
infectious number grows beyond the lockdown for the time scale of the
incubation. Note that while this example employs UK age groups and contact
structure, the model parameters are not fitted to real epidemiological data.

⬇

import numpy as np

import pyross

import matplotlib.pyplot as plt

## population and age classes

M=16 ## number of age classes

my_data = np.genfromtxt(’India-2019.csv’, delimiter=’,’, skip_header=1)

Ni = (my_data[:, 1]+ my_data[:, 2])[0:M]

# Get individual contact matrices

CH, CW, CS, CO = pyross.contactMatrix.India()

# Generate contact matrix

generator = pyross.contactMatrix.ContactMatrixFunction(CH, CW, CS, CO)

Tf=42; Nf=600

times= [21, Tf] # temporal boundaries between different contact-behaviour

aW, aS, aO = 0.0, 0.0, 0.0

# prefactors for CW, CS, CO:

interventions = [[1.0,1.0,1.0], # before first time

[aW, aS, aO], # between first and second time

]

# generate corresponding contact matrix function

contactMatrix =
generator.interventions_temporal(times=times,interventions=interventions)

# ## SIR

beta = 0.01646692 # probability of infection on contact

gIa = 1./7 # removal rate of asymptomatic infectives

gIs = 1./7 # removal rate of symptomatic infectives

alpha = 0. # asymptomatic fraction

fsa = 1 # suppresion of contact by symptomatics

# initial conditions

Is_0 = np.zeros((M)); Is_0[6:13]=14; Is_0[2:6]=13

Ia_0 = np.zeros((M))

R_0 = np.zeros((M))

S_0 = Ni - (Ia_0 + Is_0 + R_0)

parameters = {’alpha’:alpha,’beta’:beta, ’gIa’:gIa,’gIs’:gIs,’fsa’:fsa}

model = pyross.deterministic.SIR(parameters, M, Ni)

dataSIR =model.simulate(S_0, Ia_0, Is_0, contactMatrix, Tf, Nf)

I1 = model.Is(dataSIR)

# ## SEIR

beta = 0.027 # probability of infection on contact

gIa = 1./7 # removal rate of asymptomatic infectives

gE = 1/2.72 # removal rate of exposeds

gIs = 1./7 # removal rate of symptomatic infectives

alpha = 0. # asymptomatic fraction

fsa = 1 # suppresion of contact by symptomatics

Is_0 = np.zeros((M)); Is_0[6:13]=14; Is_0[2:6]=13

Ia_0 = np.zeros((M))

E_0 = np.zeros((M));

R_0 = np.zeros((M))

S_0 = Ni - (Ia_0 + Is_0 + R_0)

param={’alpha’:alpha,’beta’:beta,’gIa’:gIa,’gIs’:gIs,’gE’:gE,’fsa’:fsa}

model = pyross.deterministic.SEIR(param, M, Ni)

dataSEIR =model.simulate(S_0, E_0, Ia_0, Is_0, contactMatrix, Tf, Nf)

I2 = model.Is(dataSEIR)

# SIR with stages (SIkR)

beta = 0.01324 # probability of infection on contact

gI = 1./7 # removal rate of infectives

gE = 1/2.72 # removal rate of exposeds

kI = 32; # # of stages of I class

I0 = np.zeros((kI,M));

for i in range(kI):

I0[i, 6:13]=14; I0[i, 2:6]=13

S0 = np.zeros(M)

for i in range(M) :

S0[i] = Ni[i] - np.sum(I0[:,i])

I0 = np.reshape(I0, kI*M)/kI

parameters = {’beta’:beta, ’gI’:gI, ’kI’:kI}

model = pyross.deterministic.SIkR(parameters, M, Ni)

dataSIkR=model.simulate(S0, I0, contactMatrix, Tf, Nf)

I3 = model.I(dataSIkR)

# SEIR with stages (SEkIkR)

beta = 0.0188 # probability of infection on contact

gI = 1./7 # removal rate of infectives

gE = 1/2.72 # removal rate of exposeds

kI = 32; # # of stages of I class

kE = 2; # # of stages of E class

S0 = np.zeros(M)

I0 = np.zeros((kI,M));

E0 = np.zeros((kE,M));

for i in range(kI):

I0[i, 6:13]=14; I0[i, 2:6]=13

for i in range(kE):

E0[i, 0:16]=14

for i in range(M) :

S0[i] = Ni[i] - np.sum(I0[:,i]) - np.sum(E0[:,i])

I0 = np.reshape(I0, kI*M)/kI;

E0 = np.reshape(E0, kE*M)/kE;

parameters = {’beta’:beta, ’gE’:gE, ’gI’:gI, ’kI’:kI, ’kE’ : kE}

model = pyross.deterministic.SEkIkR(parameters, M, Ni)

data=model.simulate(S0,E0,I0,contactMatrix,Tf,Nf); I4 = model.I(data)

asI1,asI2,asI3,asI4 =
I1.sum(axis=1),I2.sum(axis=1),I3.sum(axis=1),I4.sum(axis=1) #sum over all ages

plt.plot(t, asI1, ’-’, lw=lwd, color=’#A60628’, label=’SIR’)

plt.plot(t, asI3, ’-’, lw=lwd, color=’#348ABD’, label=’SIkR’)

plt.plot(t, asI2, ’-’, lw=lwd, color=’goldenrod’, label=’SEIR’)

plt.plot(t, asI4, ’-’, lw=lwd, color=’forestgreen’, label=’SEkIkR’)

plt.xlabel(’Days’); plt.ylabel(’Infected individuals’);

Figure 1: Model-dependence of dynamics after lockdown. In example 8, the
models SIR, SEIR, SIR with stages, and SEIR with stages, are considered.
Parameters are chosen such that the initial grow rates are comparable.
Initially, all models use the full contact matrix, which is the sum of home,
work, school, and other contacts. At a fixed time, a lockdown is modeled by
retaining only the home contacts. This plot illustrates the resulting
different model dynamics at the initial phase of the lockdown.

##  Chapter 5 Conclusion

This report has presented an overview of PyRoss, a Python library that
integrates compartment models of epidemics with Bayesian inference and
optimization tools.

The current focus of PyRoss, and hence of this report, is on well-mixed, age-
structured models with a modest number of contact channels (home, school,
workplace, other). However, PyRoss allows these channels to be expanded
indefinitely in principle, so that more complex contact information relating
to particular working or social environments can be incorporated as available.

Likewise PyRoss allows the disease stages themselves to be subdivided at will.
This enables the statistics of objective medical states, such as
hospitalization and intensive care or ventilator use, to be modelled. By also
allowing an indefinitely expandable number of compartments per disease stage,
the residence time distribution in such stages can be varied from the
exponential decay of simple compartment models to the sharply-peaked
distribution that underlies time-since-infection models [10, 11, 12, 13, 14,
15]. Certain other mathematical limitations can be overcome similarly.

NPIs are viewed within PyRoss as strategies to influence contact matrices,
generally in a time-dependent fashion, through variations in contact rate, or
transmission rate at contact, or both. These interventions can be represented
in as much social detail as is resolved by the contact matrices themselves.

A Bayesian system of inference for model parameters, and for forecasting with
error estimation, is fully integrated into PyRoss. The former is a crucial
feature which allows comparison between models based on evidence. This can
guide a principled expansion in the number of compartments up to a level of
granularity justified by the data, and can warn when this has gone too far.
The approach guards against over-fitting of historic data, leading to precise
but inaccurate forecasting – a risk faced by parameter-rich, data-poor models
in any field of science.

One can expect robust inference from historic data to prove crucial for
forecasting the future course of an epidemic, particularly where sequenced or
nuanced NPIs are involved. Accordingly, PyRoss’s Bayesian parameter estimation
tools allow the fitting of time-dependent contact-matrix parameters
representing NPIs. Prior estimates (supplied perhaps by expert judgement) of
the effect of an NPI on contact statistics can therefore be continuously
improved, after the NPI is implemented, by feeding the observed results back
into the system (Fig. 1). Observed outcomes for one NPI (such as sudden
lockdown) can inform the prediction of others (such as a sequential, age-
stratified unlock).

Within PyRoss, given a user-defined cost function that encodes their harm,
NPIs can be optimized and ranked by minimization of the chosen cost function.
The actual choice of cost functions is, of course, morally and politically
problematic. However, there are many other areas of planning where saving life
is weighed against economic cost, including decisions about where and whether
to build a new hospital, or indeed a new road.

The principles of compartment modelling embraced by PyRoss, when constrained
by a disciplined approach to parameter and uncertainty estimation, are, we
believe, more powerful than is widely assumed, but of course not all-powerful.
Known challenges include situations in which the well-mixed approximation does
not hold at small scales, such as the fact that isolation by household can
allow rapid disease spread within each household while preventing it at
societal level. Redesign of the compartment structure to reflect a different
‘unit of infection’, such as a household, may help in some such cases.

In contrast, there is no problem of principle in extending compartment models
to societies that are locally well mixed but heterogeneous at larger scales.
Different contact matrices can be assigned at regional level and/or to micro-
locations such as specific workplaces or social venues. Once such geo-social
compartments are resolved, the transition rates between them are controlled by
human mobility which can itself be modelled by jumps into and out of
compartments representing journeys (within which infection can of course
occur). NPIs can then separately target either the locationally specific
contact matrices, or the transfer of people between locations. In a
forthcoming report we will describe PyRossGeo, an extension of PyRoss along
these lines.

This report has focussed on the design principles and capabilities of PyRoss,
illustrated by very simple examples of its use. We have not deployed it
directly here to address aspects of the current COVID-19 crisis, but for an
example of its use in doing so, see [16]. (Note that since that paper was
written, the capabilities of PyRoss have advanced dramatically.)

The PyRoss library is open-source. We positively encourage its use by other
scientists, whether seasoned epidemic modellers or those new to the field. We
hope it can contribute to a stronger scientific platform for evidence-based
decision making as the current pandemic continues, and also before the next
one.

### Acknowledgement

The work described in this report was completed in the six weeks spanning
April to mid-May 2020 as a contribution to the Rapid Assistance in Modelling
the Pandemic (RAMP) initiative, coordinated by the Royal Society. The GitLab
platform enabled seamless collaboration under lockdown conditions. We are
grateful to the numerous developers who contribute to the open-source platform
on which PyRoss is built and without which it would not exist. We acknowledge
advice from Graeme Ackland, Daan Frenkel, Julia Gog, Chris Rogers, and Richard
Wilkinson. We thank the code review team of RAMP’s Rapid Review Group at
Oxford for their scrutiny of the PyRoss library and for their suggestions for
improvement; RAMP’s Red Team at Edinburgh further code review and stress
testing; and those who opened issues and offered suggestions on GitHub.
Remaining defects in the PyRoss library and in this report are the
responsibility of the authors. This work was funded in part by the European
Research Council under the EU’s Horizon 2020 Program, Grant No. 740269; by the
Royal Society through a Research Professorship held by MEC, and by an Early
Career Grant to RA from the Isaac Newton Trust.

## References

  * [1] R. M. Anderson, B. Anderson, and R. M. May.  Infectious diseases of humans: dynamics and control.  Oxford university press, 1992.
  * [2] M. J. Keeling and P. Rohani.  Modeling infectious diseases in humans and animals.  Princeton University Press, 2011.
  * [3] N. T. J. Bailey.  The mathematical theory of infectious diseases and its applications.  Charles Griffin & Company Ltd, 5a Crendon Street, High Wycombe, Bucks HP13 6LE., 1975.
  * [4] D. Anderson and R. Watson.  On the spread of a disease with gamma distributed latent and infectious periods.  Biometrika, 67(1):191–198, 1980.
  * [5] H. J. Wearing, P. Rohani, and M. J. Keeling.  Appropriate models for the management of infectious diseases.  PLoS medicine, 2(7), 2005.
  * [6] O. Krylova and D. J. D. Earn.  Effects of the infectious period distribution on predicted transitions in childhood disease dynamics.  Journal of The Royal Society Interface, 10(84):20130098, 2013.
  * [7] A. L. Lloyd.  Realistic distributions of infectious periods in epidemic models: changing patterns of persistence and dynamics.  Theoretical population biology, 60(1):59–71, 2001.
  * [8] H. Barbosa, M. Barthelemy, G. Ghoshal, et al.  Human mobility: Models and applications.  Physics Reports, 734:1–74, 2018.
  * [9] S. M. Jenness, S. M. Goodreau, and M. Morris.  Epimodel: an r package for mathematical modeling of infectious disease over networks.  Journal of statistical software, 84, 2018.
  * [10] W. O. Kermack and A. G. McKendrick.  A contribution to the mathematical theory of epidemics.  Proceedings of the royal society of london. Series A, Containing papers of a mathematical and physical character, 115(772):700–721, 1927.
  * [11] J. Reddingius.  Notes on the mathematical theory of epidemics.  Acta biotheoretica, 20(3-4):125–157, 1971.
  * [12] L. Sattenspiel, K. Dietz, et al.  A structured epidemic model incorporating geographic mobility among regions.  Mathematical biosciences, 128(1):71–92, 1995.
  * [13] F. Hoppensteadt.  An age dependent epidemic model.  Journal of the Franklin Institute, 297(5):325–333, 1974.
  * [14] O. Diekmann, J. A. P. Heesterbeek, and M. G. Roberts.  The construction of next-generation matrices for compartmental epidemic models.  J. Royal Soc. Int., 7(47):873–885, 2010.
  * [15] H. R. Thieme and C. Castillo-Chavez.  How may infection-age-dependent infectivity affect the dynamics of HIV/AIDS?  SIAM Journal on Applied Mathematics, 53(5):1447–1479, 1993.
  * [16] Rajesh Singh and R Adhikari.  Age-structured impact of social distancing on the covid-19 epidemic in india.  arXiv preprint arXiv:2003.12055, 2020.
  * [17] D. J. C. MacKay.  Information theory, inference and learning algorithms.  Cambridge University Press, 2003.
  * [18] D. J. C. MacKay.  Bayesian interpolation.  Neural computation, 4(3):415–447, 1992.
  * [19] N. M. Ferguson et al.  Impact of non-pharmaceutical interventions (npis) to reduce covid-19 mortality and healthcare demand.  London: Imperial College COVID-19 Response Team, March, 16, 2020\.
  * [20] S. Towers and Z. Feng.  Social contact patterns and control strategies for influenza in the elderly.  Math. Biosci., 240(2):241–249, 2012.
  * [21] N. M. Ferguson et al.  Strategies for mitigating an influenza pandemic.  Nature, 442(7101):448–452, 2006.
  * [22] H. W. Hethcote.  The mathematics of infectious diseases.  SIAM review, 42(4):599–653, 2000.
  * [23] J. Glasser, Z. Feng, A. Moylan, S. Del Valle, and C. Castillo-Chavez.  Mixing in age-structured population models of infectious diseases.  Mathematical Biosciences, 235(1):1–7, 2012.
  * [24] K. Prem, A. R. Cook, and M. Jit.  Projecting social contact matrices in 152 countries using contact surveys and demographic data.  PLoS Comp. Bio, 13(9):e1005697, 2017.
  * [25] R. Ross.  An application of the theory of probabilities to the study of a priori pathometry.  Proceedings of the Royal Society of London, 92(638):204–230, 1916\.
  * [26] S. Busenberg and C. Castillo-Chavez.  A general solution of the problem of mixing of subpopulations and its application to risk-and age-structured epidemic models for the spread of aids.  Mathematical Medicine and Biology: A Journal of the IMA, 8(1):1–29, 1991.
  * [27] J. Wallinga, Peter T., and M. Kretzschmar.  Using data on social contacts to estimate age-specific transmission parameters for respiratory-spread infectious agents.  American journal of epidemiology, 164(10):936–944, 2006.
  * [28] R. F. Pawula.  Approximation of the linear boltzmann equation by the fokker-planck equation.  Phys. Rev., 162:186–188, Oct 1967.
  * [29] C. W. Gardiner.  Handbook of stochastic methods.  Springer Berlin, 1985.
  * [30] N. G. Van Kampen.  Stochastic processes in physics and chemistry, volume 1.  Elsevier, 1992.
  * [31] M. Komorowski, B. Finkenstaedt, C. V Harper, and D. A Rand.  Bayesian inference of biochemical kinetic parameters using the linear noise expansion.  BMC Bioinformatics, 10(343), 2009.
  * [32] R. Singh, D. Ghosh, and R. Adhikari.  Fast bayesian inference of the multivariate ornstein-uhlenbeck process.  Phys. Rev. E, 98:012136, Jul 2018.
  * [33] D. Maclaurin, D. Duvenaud, and R. P. Adams.  Autograd: Effortless gradients in numpy.  In ICML 2015 AutoML Workshop, volume 238, 2015.
  * [34] https://github.com/kbarbary/nestle.
  * [35] J. Skilling.  Nested sampling for general bayesian computation.  Bayesian analysis, 1(4):833–859, 2006.
  * [36] James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, and Skye Wanderman-Milne.  JAX: composable transformations of Python+NumPy programs, 2018\.
  * [37] D. T. Gillespie.  Exact stochastic simulation of coupled chemical reactions.  The Journal of Physical Chemistry, 81(25):2340–2361, December 1977\.
  * [38] D. T. Gillespie.  Approximate accelerated stochastic simulation of chemically reacting systems.  The Journal of Chemical Physics, 115(4):1716–1733, July 2001.
  * [39] Y. Cao, D. T. Gillespie, and L. R. Petzold.  Efficient step size selection for the tau-leaping simulation method.  The Journal of Chemical Physics, 124(4):044109, January 2006.
  * [40] G. Wanner and E. Hairer.  Solving ordinary differential equations II: Stiff and differential-algebraic problems.  Springer Berlin Heidelberg, 1996.
  * [41] E. Hairer, S. P Nørsett, and G. Wanner.  Solving ordinary differential equations I: Nonstiff problems, 1993\.
  * [42] H. P. Langtangen and L. Wang.  Odespy.  https://github.com/hplgit/odespy, 2014.
  * [43] P. Virtanen, R. Gommers, T. E. Oliphant, et al.  Scipy 1.0: fundamental algorithms for scientific computing in python.  Nature methods, 17(3):261–272, 2020.
  * [44] https://www.populationpyramid.net/.
  * [45] Z. Feng and H. R. Thieme.  Endemic models with arbitrarily distributed periods of infection i: Fundamental properties of the model.  SIAM Journal on Applied Mathematics, 61(3):803–833, 2000.
  * [46] R. Pastor-Satorras, C. Castellano, P. Van Mieghem, and A. Vespignani.  Epidemic processes in complex networks.  Reviews of modern physics, 87(3):925, 2015.
  * [47] M. Y. Li and J. S Muldowney.  Global stability for the seir model in epidemiology.  Mathematical biosciences, 125(2):155–164, 1995.
  * [48] J. A. P. Heesterbeek.  A brief history of $R_{0}$ and a recipe for its calculation.  Acta biotheoretica, 50(3):189–204, 2002.
  * [49] S. Townley, D. Carslake, O. Kellie-Smith, D. Mccarthy, and D. Hodgson.  Predicting transient amplification in perturbed ecological systems.  Journal of Applied Ecology, 44(6):1243–1251, 2007.
  * [50] I. Stott, D. J. Hodgson, and S. Townley.  Beyond sensitivity: Nonlinear perturbation analysis of transient dynamics.  Methods in Ecology and Evolution, 3(4):673–684, 2012.
  * [51] M. Asllani, R. Lambiotte, and T. Carletti.  Structure and dynamical behavior of non-normal networks.  Science Advances, 4(12):1–9, 2018.
  * [52] M. Asllani and T. Carletti.  Topological resilience in non-normal networked systems.  Physical Review E, 97(4):1–12, 2018.
  * [53] L. N. Trefethen and M. Embree.  Spectra and pseudospectra: the behavior of nonnormal matrices and operators.  Princeton University Press, 2005.

## Appendix: Simple versus Complicated Models

Figure 1: Predictions from an unstructured SI5R model in Simulana. Simulana is
an imagined country where epidemics are correctly described by the Covid-Sim
algorithm of [19] with some particular parameter set.

Let us imagine an alternative universe which contains a country resembling the
UK, called Simulana, for which the CovidSim model, with a specific parameter
set as selected in [19], describes the disease dynamics as well as one could
wish. The government of Simulana allow the epidemic to run its course without
NPIs. Suppose that the only data available to modellers in Simulana are time-
resolved national aggregate statistics $(S(t),I(t),R(t))$ for the number of
susceptibles, infecteds, and removeds. To forecast the epidemic, the modellers
adopt an age-unstructured SIkR model, with $k$, the number of infected sub-
compartments discussed above, set to $k=5$. We emphasise that this is an
utterly basic model. Nonetheless, by fitting to the available data up to (say)
the point where $S=I$, Simulana’s modellers are able to predict its remaining
course reasonably well, as shown in Figure 1. Note that only the maximum a
posteriori (MAP) prediction is shown although PyRoss can deliver the full
posterior distribution if required.

These predictions raise the following question: Unless the specific CovidSim
parameters that correctly describe epidemics in Simulana are disclosed upfront
by revelation, is CovidSim in general much better at predicting epidemics
there than, say, SI5R?

Interpreting this question in a strictly Bayesian sense of ‘which model has
more evidence’, we suspect the answer is ‘no’ – although to confirm this
quantitatively would require a more precise delineation of CovidSim’s free
parameters than we currently have. This is because the Bayesian ‘Occam
factors’ penalize models with parameters that are unconstrained by the data
available: the evidence for these models is small, whereas parsimonious models
always have larger evidence if equally capable of fitting the data.

But even if the question is interpreted less formally, we might also suspect a
negative answer. Given the limited medical data available in Simulana, it is
not clear that this can constrain CovidSim’s parameters sufficiently to give
forecasts that are any more reliable than those of much simpler models. This
is despite the fact that using CovidSim the epidemic in Simulana’s could be
forecast perfectly in principle if the correct parameters were known.

In the above example, the modellers of Simulana received only aggregate
patient data; alternatively they might receive data stratified by age,
geography etc.. In this case the shortcomings of SI5R for Simulana would soon
be revealed by the Bayesian approach. However, a generalized compartment model
might well still beat CovidSim at ‘predicting its own future’. Of particular
promise are models whose compartments broadly aligned with the granularity of
the data available, creating inbuilt parsimony.

It is very important to recognize that the above paragraphs contain no
specific criticism of CovidSim itself, or any other particular model. Instead
they express a more general concern about basing predictions on any model
whose parameters have proliferated beyond the ability of data to estimate
them. Such concerns apply not only for epidemics but across many other
disciplines. They are one of the reasons so many scientists today prefer a
Bayesian approach to model and parameter selection, as offered by PyRoss for
compartment models.


Rhythm

> “Compositional activity proves meaningless in the absence of a corresponding
> bodily gestalt.” — Ellington’s Law by Warren Burt

> “Jazz without the beat, most musicians know, is a telephone yanked from the
> wall, it just can’t communicate.” — Leonard Feather, British author and jazz
> enthusiast.

##  1 Understanding Rhythm Through Modeling

A fundamental assumption in this work is that representation and modeling are
ways to understand complex real-world processes, in particular, the activity
of human perception of rhythm. Theories can then be formulated and verified
using empirical data and models, which in turn can be updated to reflect new
knowledge. Thus, modeling the cognitive processes associated with rhythm and
music in general, can yield better understanding of the functions underlying
specific behavioral responses to music and rhythm. This knowledge is
potentially useful to composers, performers, designers of codec111The term
codec stands for “compression/decompression”. A codec is an algorithm, or
specialized computer program that does exactly that. Popular audio codecs
include MPEG 1 Layer 3 (mp3) and Sony minidisc. algorithms, interactive music
and media systems [Desain:92]. These models embody functional relationships
between physical properties of sound and resulting human behavior and
sensations. Thus it is important to make distinctions between the physical
properties of sound, called phenomenal, that can be measured and their
perceptual correlates.

Physical properties of sound | Perceptual correlates
---|---
Frequency | Pitch
Signal Intensity | Loudness
Differences in sounds with identical loudness and pitch | Timbre
Table : Properties of sound and their perceptual correlates

##  2 Time

###  Temporal Representations in Music

Music is time-based art form that always occurs in some cultural context.
Accordingly, the representation of musical time is culturally dependent.
Different cultures have time represented differently in their cognitive
structures, for example, in some contexts, time is seen as a circular
structure, rather than a continuum [Gardenfors:2000]. Musical enculturation is
thus a combination of perception and the organisation of sounds based on
internalised cultural templates [Smith:99, p. 5]. Different areas of research
also have different perspectives and interests in representing time. For
example, while musicologists might be interested in representations that
facilitate notation and transcription, composers and performers might be more
interested in representations that are designed to work in process-oriented
real-time systems [Honing:93]. There are several different views of temporal
representation in music. These include tacit, implicit and explicit time.
Tacit time frameworks do not represent temporal evolution; there is only an
idea of “now”. Implicit time structures employ no definitive time relations
since time is represented as an absolute, e.g. note lists, while explicit time
structures represent time as relations that can be compounded to form higher
level notions of time. Other questions that come up in the time modeling
process deal with absolute versus relative time bases, discrete versus
continuous representations and point-based versus intervallic time primitives.
Point-based implies that events are duration-less and occur serially while
intervallic refers to differences between events that form the basis for
meaningful relations (intervals that occur before, after, during) [Honing:93].

Low Level: Expression |  Perceptually represented as departures
---|---
| from canonical proportional values; poorly
| quantified, and experienced as expressive
| rather than durational effects.
|  In Performance, represented as programmed
| variations in the rate of the clock controlling
| beat durations (see level 2), and as modifications
| of the procedures specifying individual notes
Middle Level: Rhythm |  Perceptually represented as collection
and meter | of grouped durational equalities and
| inequalities organized around a metrical
| framework (when the music has a meter)
|  In Performance, represented as a
| collection of untimed procedures, organized
| metrical markers which are directly timed by
| a programmable clock.
High Level: Form |  Perceptually represented as a structure
| of hierarchical relations, constructed by means
| of memory processes and perception, and
| distinguished from level 2 structures by
| exceeding the length of the perceptual present
|  In Performance, represented as a hierarchical
| memory structure that forms the highest levels
| of a motor program
Table : A summary of structural levels in musical time based on meter and
their cognitive/perceptual properties [Clarke:87, p. 233].

###  Causal versus Non-Causal Analysis

A further point regarding time arises when an interpretive process must
examine some data structured in time. Some theories propose digesting whole
chunks of data as a unit while others choose to process the data sequentially
in time or causally. Opponents of the former process, claim that “theories
that behave symmetric with respect to time have to be wrong on that basis
alone. … [those] theories tend to model the perceiver more like a musicologist
studying the score, instead of a first time listener” [Desain:92]. On the
other hand, proponents claim that the non-causality of such models embodies a
certain amount of enculturated knowledge that is essential to any
interpretation, citing that performers have spent time with their music and
have definite intentions before a show [Smith:99, p. 55]. Analytically, causal
methods can be seen as a subset of the larger non-causal methods, even though
the tools may not be related. In any case, because humans infer musical
structure based on both universal “hard-wired” low level processing of sensory
data (bottom-up processing) and culture specific knowledge, expectations and
predictions (top-down processing) [Todd:94, p. 27], robust models of rhythm
perception must account for both bottom-up and top-down processing and cross-
cultural variances. This makes room for multiple interpretations in which both
causal and non-causal methods are useful.

0 to 2-5 msecs apart | Beats are perceived as simultaneous,
---|---
| indistinguishable (even with different
| loudness, but same duration) as a single
| event.
2-5 to 40 msecs apart | Beats are distinguishable, but no order
| relation can be indicated.
30 to 50 msecs apart | Beats above this can produce an order
| relation.
Table : A table summarising Leigh Smith’s review of Pöppel’s taxonomy of
elementary time experiences [Smith:99, p. 14]

###  Specious Present and Auditory Stores

Another aspect of time deals with the interval in which events are processed –
the specious present. Later called the psychological, perceptual or subjective
present, it is related to the duration within which one experiences a sequence
of events as simultaneously present in consciousness [Gabrielsson:89, p.
97][Fraisse:63]. Parncutt defines this perceptual present as a “continuous
time interval comprising all real-time percepts and sensations simultaneously
available to attention, perception and cognitive processing” [Parncutt:94, p.
451][Smith:99, p. 12]. Enabling this present is echoic memory, a kind of
auditory sensory memory possessing a high degree of structure and organization
[Parncutt:94, p. 451]. Echoic memory which is acoustic should be
differentiated from iconic memory which is visual. There have been many
different estimates in the literature on the size of echoic memory and the
“integrating buffers”, most of them limiting the echoic memory to less than
500 msec and the subjective present to 4 seconds, with experimental results
ranging between 2 and 10 seconds [Smith:99, p. 12-3] [Parncutt:94, p. 451].
Parncutt stresses that because the “present is so highly adaptive, no fixed
parameter values can be expected to describe it adequately” [Parncutt:94, p.
451-2]. Furthermore, the present also depends on the rate events occur and
their complexity and structure [Parncutt:94, p. 452].

###  Synchronisation

Synchronisation is another aspect of rhythm that emerges from a notion of
time. Mari Riess Jones in an article entitled “Time, Our Lost Dimension:
Toward a New Theory of Perception, Attention and Memory” states that the
“human system in general and the perceptual system in particular depend upon
the properties of endogenous rhythmic processes in the nervous system”
[Jones:76]. Additionally, many studies have suggested the presence of internal
clocks and have noted the strong connection between physical actions and
perception [Smith:99, p. 17]. In reaction to a sound stream, humans are able
to forecast and coordinate motor action to coincide with future events from
the sound stream. Smith claims that regularity is less important to the act of
synchronisation than the listener’s expectations and ability to predict, since
accelerating and decelerating rhythms can be timed [Smith:99]. Jones suggests
that parts of the synchronisation process are based on temporal expectancy.
Thus relations between certain time differences (time deltas) will hold for
subsequent ones. This allows the listener to extrapolate time trajectories
that predict when events will occur [Jones:76].

##  3 Definitions

How should we define rhythm? Smith reports a variety of responses from the
literature [Smith:99, p. 9-10]. Eric Clarke used the term broadly to apply to
“regular, periodic features of the temporal structure of music and to
aperiodic features” [Clarke:85structure]. Dowling states that rhythm is a
temporally extended pattern of durational and accentual relationships, while
Parncutt claims that musical rhythm is an acoustic sequence evoking a
sensation of pulse [Parncutt:94, p. 451]. Scheirer cites Handel’s claims that
“the experience of rhythm involves movement, regularity, grouping, and yet
accentuation and differentiation” [Scheirer:98tempo]. According to
psychological studies done by Gabrielsson on human “subjects”, rhythm like
timbre is a multi-dimensional quality. From the empirical studies, Gabrielsson
points out the existence of at least fifteen dimensions which “lend themselves
to grouping into three categories” related to structural, motional and
emotional aspects of rhythm. Refer to Table 4.

Structural Aspects | Meter, position and strength of accents,
---|---
| type and prominence of basic pattern, number
| of different kinds of subdivisions within
| beats, uniformity versus variation and
| simplicity versus complexity
Motional Aspects | Tempo and overall rapidity, however motional
| characters exist such as walking, dancing,
| jumping, rocking, swinging, graceful and driving
| forward
Emotional Aspects | Vitality versus dullness, excitement versus
| calmness, rigidity versus flexibility and
| solemnity versus playfulness
Table : Gabrielsson’s dimensional categories for rhythm [Gabrielsson:89, p.
107]

There are problems in modeling the “dimensions” mentioned above because the
interpretive ambiguity of the dimensions and characters do not lend easily to
symbolic or quantitative representation.

##  4 Pulse

Parncutt’s definition of a musical rhythm is an acoustic sequence evoking a
sensation of pulse. How should we define pulse? If a car drives by loudly
broadcasting music, in the several seconds within which the music is in
earshot, the pulse would be the subjective evaluation of the feel or
impression of movement inferred from the music. If that music happened to be
tabla drumming, Olatunji, Faithless or Subotnick, each would leave a different
but firm impression in the mind of the listener. The percept of pulse is
confined to the time interval called the subjective present [Parncutt:94, p.
451]. While rhythm deals with grouping and time hierarchies and tempo involves
the rate at which rhythmically significant events occur, pulse corresponds to
a “sense of equally spaced phenomenal impulses” [Scheirer:98tempo]. For many
kinds of music, the pulse is the “foot-tapping” beat. Pulse has also gone by
other names like tactus, defined by Lerdahl and Jackendoff to describe the
most salient hierarchical level at which the listener will tap their foot in
accompaniment to a rhythm [Smith:99, p. 31]. Parncutt defines it as a trivial
sense of expectancy. Once a pulse is established, subsequent events are
“expected” with some time trajectory. This is of course related to our
discussion above of synchronisation, where motor actions move along time
trajectories inferred from this expectation [Parncutt:94, p. 453].

###  Pulse Outside A Metrical Context

In non-metric musics, the pulse may not necessarily correspond to an
isochronous period. Researchers agree that the idea of a basic pulse in such
music is “usually misplaced” [Magill:97, p. 190] Magill reports that

> “West African drum ensemble music takes a multilayered approach to rhythm,
> with all the parts being related to a fundamental time line, often played on
> a bell… Bell patterns can nearly always be subdivided into a number of
> regular pulses (usually 8, 12, or 16). Time lines or bell patterns betray
> asymmetric construction and sound syncopated to Western ears” [Magill:97, p.
> 190].

For example, in the Anlo drumming style from southern Ghana, Pantaleoni points
out that it is “the bell that regulates the play, and not the steady pulse
some player or observer might feel, because the bell can put each pattern into
its proper places, while a simple pulse can only regulate the speed with which
the pattern is played” [Pantaleoni:72, p. 60]. Magill states that in many West
African drumming styles while some instruments reinforce an underlying fast
pulse, others might highlight portions of a bell pattern while others provide
a complex overlay of rhythms and meters [Magill:97, p. 190]. In any case,
while regular pulses are quite common, the traditional cultural view is that
they are of peripheral importance compared to the asymmetric time line. The
definition of pulse needs to be revised to be a periodic structuring or
synchronization framework, since in the kinds of music discussed above,
asymmetric time lines and isochronous pulses are both constructs within which
higher levels of rhythmic time are structured.

####  The Fastest Pulse

Attempts to understand non-metric music have also emerged in the form of
concepts like the “fastest pulse”. The fastest pulse is defined as the “beat
with the shortest duration in the music considered” [Smith:99, p. 33] Smith
cites Koetting’s warning that the fastest pulse does not seem to describe how
African timing is perceived [Smith:99, p. 33]. Pantaleoni comments

> “I have not found it to be a concept familiar to those African drummer with
> whom I have worked, nor does it seem to be an easy concept for them to use
> once it has been explained. Perhaps it is simply difficult for a performer
> to think as an analyst, but in the absence of some kind of positive support
> from the musicians themselves it cannot be assumed that a convenient
> analytical tool corresponds to the basic pulse or principle of timing which
> actually functions in the playing of the music” [Pantaleoni:72, p. 58].

While clearly limited from a compositional and improvisational point of view,
the idea of the fastest pulse might still be useful in analysis. As will be
seen in the next chapter, analyses that determine the fastest pulse, per
extracted stream, are a useful interpretive tool.

###  Beat Induction

Beat induction is a synchronization process with a phenomenal pulse. There
have been many successful attempts to measure the pulse computationally in
Western classical and popular music, using that information to drive a foot-
tapping process. Eric Scheirer used filterbanks and parallel comb filters to
extract amplitude envelopes and infer the beat from arbitrarily complex
musical signals [Scheirer:98tempo]. Povel and Essens introduced the idea of
“internal clocks” which are selected based on a set of inter-onset interval
inputs. Desain and Honing have several computational beat-tracking methods to
their name. Given an onset stream, their models return the beat of the stream.
Different from the previous methods, Desain and Honing use a causal process
model which takes the onset inputs sequentially and updates an expectancy
measure. The beat is then inferred from regions of high expectancy. Large and
Kolen’s beat-tracking model is based on non-linear oscillators. From a stream
of onsets, a “gradient-descent method” is employed to continually update the
period and phase of an oscillator, which represents the pulse
[Large:94][Scheirer:98tempo]. Goto presented a system which “combines both
low-level “bottom-up” signal processing and high-level pattern matching and
“agent-based” representation to beat-track and do simple rhythmic grouping for
popular music” [Scheirer:98tempo][Goto:98]. Leigh Smith has also explored a
multiscale representation of musical rhythm. Onset streams or pulse trains are
first decomposed using a Morlet wavelet basis. The “foot-tapping” pulse of a
section of music is then extracted by correlating frequency modulation ridges
extracted from the wavelet decomposition using stationary phase, modulus
maxima, dilation scale derivatives and local phase congruency. Refer to
[Smith:99] for definitions and implementation details.

###  Tempo

Tempo is defined here as the rate at which rhythmically significant events
occur. In music with an isochronous pulse, tempo is the rate of the tactus. In
much Western music and popular music, this is the “foot tapping” rate. In non-
metrical settings, there may not be any explicit overall tempo. In this case,
there may be multiple rhythmic layers each with its own individual rate. Tempo
is however best used in a metrical setting. Commercial software systems
express tempo in terms of beats per minute (BPM), while numerous scores have
subjective tempo indications like Larghissimo or Prestissimo or more concrete
markings like quarter note equals sixty. Within the above framework how do
variations in tempo affect the interpretation of rhythmic structure? Clarke
reports that slow tempi aid the cognitive process of segmentation at
structural boundary points while at higher tempi, music tends to be grouped
into fewer units. This is claimed to occur because of the limits of the
subjective present. In other words, at faster tempi, more elements are packed
into the subjective present; thus given fixed maximum neural processing rates,
music is subdivided into larger groups in accordance with its structural
properties [Smith:99, p. 36].

##  5 Grouping

Experiencing rhythm occurs as a whole sequence or pattern, not as individual
events. Within the subjective present, how a sequence is formed by segregating
a stream of events is called grouping. This can take the form of phrases or
motives. In many cases, the number of events grouped together depends on the
presentation rate, so the faster the rate, the more members are included in
the group. This extends up to perceptual limits. Some rhythmic groups are
presented so quickly that they’re not perceived as individual rhythms or
events but are lumped together to form a pitch percept. Within a sequence of
events, certain ones with objective accents or differences suggest or confirm
the presence of a perceptual group boundary. Quantities responsible for the
percept of a group boundary include perceptual limits on memory and attention
and cognitive representations. Smith points out two principal grouping
principles: The run principle and the gap principle. The run principle
proposes that the longest run of similar events will begin a rhythmic pattern.
Listeners tend to group sounds of the same intensity together. Runs of
different intensity will be organized so that the longest runs are placed at
the beginning or end of the pattern, never in the middle. The gap principle
refers to boundaries that are formed between dissimilar elements. Rests
partition elements while elements close in time tend to be grouped [Smith:99,
p. 28]. These principles are based on Gestalt principles of perceptual
organization and Bregman’s seminal work on auditory scene analysis
[Bregman:90]. Additionally, higher level grouping structures are bounded by
repetitions. A single change in an established pattern can affect the entire
grouping percept [Smith:99, p. 28]. Parncutt defines two independent kinds of
temporal grouping, serial and periodic. Serial grouping (related to the gap
principle) is dependent on the serial proximity of adjacent events in time,
pitch and timbre. “According to Lerdahl and Jackendoff (1983), serial grouping
in music includes “motives, themes, phrases, periods, theme-groups, sections,
and the piece itself” [Lerdahl:83]. Periodic grouping on other hand, depends
on the relative times and perceptual properties of nonadjacent events
[Parncutt:94, p. 412].

###  Meter

Meter can be seen as a form of periodic grouping. Parncutt states that it
groups events into equivalence classes, such as all nth beats of a bar
[Parncutt:94, p. 412]. He further classifies periodic grouping as being an
aggregate of two stages, pulse sensation and perceived meter. Interestingly
enough, Halsband conversely states that grouping “plays a major role in the
perception of all metrically organized music” [Halsband:94, p. 266]. While
grouping is a psychological term, meter is a product of music theory and
associated forms of notation. Repetition in meter, as in other groupings,
plays an integral role in the determination of a metrical percept. However,
the perceived meter in a performance may not necessarily correspond to the
notated meter. In many of these cases, some initial metrical orientation
influences the interpretation of subsequent sequences. There are rarely
explicit rules to outline an interpretation; in improvisational styles,
performances “unbounded by a strict metric frame are not free in the sense of
being unrhythmic. Rather, they are driven by rhythmic goals that are elastic”
[Berliner:94, p. 158]. Handel showed empirically that difficult rhythms with
atypical metrical accenting were perceived in terms of elemental grouping
schemes, rather than as a meter with a timing interval [Smith:99, p. 31].
Thus, a metrical percept is a regular alternation of strong and weak beats.
What then qualifies an event as particularly strong or weak?

Well-Formedness Rule 1 | Every attack point must be associated with
---|---
| a beat at the smallest level metrical level
| present at that point in the piece.
Well-Formedness Rule 2 | Every beat at a given level must also be a
| beat at all smaller levels present at that
| point in the piece.
Well-Formedness Rule 3 | At each metrical level, strong beats are
| spaced either two or three beats apart.
Well-Formedness Rule 4 | The tactus and immediately larger metrical
| levels must consist of beats equally spaced
| throughout the piece. At subtactus metrical
| levels, weak beats must be equally spaced
| between surrounding strong beats.
Table : A summary of Lerdahl and Jackendoff’s Metrical Well-Formedness Rules
from their “Generative Theory of Tonal Music” [Lerdahl:83].

###  Accentuation

Accents are differences in adjacent events that separate them and suggest
particular grouping configurations. Smith cites Lerhdahl and Jackendoff as
distinguishing three kinds of accents, phenomenal, metrical and structural
according to their effect on groups [Smith:99, p. 19]. Phenomenal accents are
said to exist superficially, stressing a single moment and enabling
syncopations. Metrical accents occur when the emphasised beat is part of a
repeating metrical pattern. Structural accents occur at points hierarchically
higher than meter. For example, structural accents could delimit phrases or
sections. Furthermore, a “phenomenal accent functions as a perceptual input to
metrical accent” [Lerdahl:83]. Accents occur when there are changes in
duration, inter-onset interval (IOI), pitch, articulation, timbre or
combinations thereof. Similarly changes in phrase length, time expectancies,
event density (flams, fills, etc) or multiple event synchronisation can cause
accentuation [Smith:99, p. 19] [Parncutt:94, p. 426]. Articulation is one way
to signify an accent. Berliner remarks that in the jazz idiom, ghosting “on-
beat pitches in an eight-note sequence creates de facto accents on every off-
beat, increasing rhythmic tension. Reversing the procedure relieves rhythmic
tension… Similarly the varied application of hard, soft and ghosted attacks
can shift accents within a repeated eight-note triplet, changing its perceived
rhythmic configuration and its relative syncopated quality” [Berliner:94, p.
156].

5in!AllThatJazz.pdf

Figure : “For a swinging performance the first of each pair of eight notes is
played longer than the second. The melody line also hangs behind the cymbal
beat, except for the occasional off-beat synchronisation, which keeps the band
together” [Hamer:2000]

Accentuation is not always applicable to specifying grouping structure and its
use varies with the musical context. For instance, using the Anlo dance
drumming example, Pantaleoni reports that “variation in loudness (phenomenal
accents) is indeed an important part of the character of a rhythmic line in
Atsiã, but no evidence indicates that its contribution is more than melodic…
Dynamic stress would seem to be individual, decorative, incidental, and often
illusory, hardly a likely clue to rhythmic organisation” [Pantaleoni:72, pp.
54].

##  6 Expressive Timing

Many authors have explored what is known in rhythmic performances as
expressive timing. Discrepancies can always be found in the timing dictated by
a score and that which occurs in a performance. Barring mistakes, which really
are not plausible with highly trained musicians familiar with the music, these
deviations are “related to the structural properties of the music and to the
ways the performers organize” these properties [Clarke:85structure]. In an
analysis of Erik Satie’s “Gnossienne No. 5”, Clarke reports that

> “the tempo marking is followed by the instruction “souple et expressif”.
> This is relevant to subsequent analysis, since it suggests that the
> performance of the piece should avoid metronomic tendencies in the left
> hand, and may encourage a rhythmic flexibility in the right hand that
> conventional notation cannot convey” [Clarke:85, p. 300].

Research has thus focused on determining exactly what deviations from the
score contribute to a subjective feeling of expression that is not
“metronomic”. First some definitions: expressive timing refers to deviations
in notated times that suggest particular structural interpretations or give
the temporal development of the music a particular feel or sense of movement.
Smith cites certain kinds of expressive timing as having evolved from a
performance practice known as rubato, literally “robbed time” [Smith:99, pp.
37]. In computer music, terms like “micro-tempo” are used to describe this
expressive phenomenon of local tempo changing from event to event. In all
cases, these expressive timing transformations are used by performers either
in response to structural features in the score or in attempt to explore new
interpretive configurations or impose a particular structure on structurally
indeterminate material [Clarke:85structure].

4.5in!OnBeat.pdf

Figure : “Imagining the beat as an “elliptical figure”, the drummer or bass
player can play either “ahead of the beat” (that is, on the front part of the
elliptical figure), “behind the beat”, (that is on the very end of the
elliptical figure or in varying degrees toward the center of the figure or “on
the beat” (that is, the center of the figure)” [Berliner:94, p. 151].

In the jazz tradition, Berliner says that musicians “talk about playing on
three different parts of the beat without making any difference in the overall
tempo”. On a similar note, Fred Hersch claims that

> “there should be ten, fifteen different kinds of time. There’s a kind of
> time that has an edge on it for a while and lays back for a while. Sometimes
> it rolls over the bar, and sometimes it sits more on the beats. That’s what
> makes it interesting. You can set a metronome here and by playing with an
> edge or playing behind it or right in the center you can get all kinds of
> different feelings. That’s what makes it come alive. People are human, and
> rhythmic energy has an ebb and flow” [Berliner:94, p. 151].

###  Tempo Curves

Tempo curves are one way that timing deviations are represented in
contemporary music software applications for notated music, offering a measure
of “beat-by-beat time deviation from a canonical metrical grid” [Smith:99, p.
39]. This quasi-instantaneous tempo or Local tempo is defined computationally
as the event to event ratio of score time interval to performance time
interval.

$Local\ tempo=Global\ tempo\times{Score\ time\ interval\over Performance\
time\ interval}$

Tempo curves are thus constructed by connecting points with straight line
segments between local tempo measures of each performed note in the score
[Smith:99][Desain:91].

###  Expression and Structure

Desain and Honing warn that while they are useful to study expressive timing,
tempo curves can be is a “dangerous notion”. This is because it encourages
“its users into the false impression that it has a musical and psychological
reality. There is no abstract tempo curve in the music nor is there a mental
tempo curve in the head of the performer or listener” [Desain:91]. This is
because tempo curves by themselves contain no structural information. Thus
global transformations, like scaling the overall tempo curve, will change
timing relationships between notes that are ornamental and invariant with
tempo. Furthermore, attempts to impose a tempo curve from the performance of
one piece onto the score of another shows that tempo curves convey an
erroneous notion that time is independent of the note events that mark it.
This clearly ignores the fact that the expression captured by the tempo curve
can only function with respect to the original music performance from which it
was derived [Smith:99][Desain:91][Desain:91towards]. For a more in-depth
discussion on expressive temporal transformations, refer to Desain and
Honing’s paper called “Towards a Calculus for Expressive Timing in Music”
[Desain:91towards].

##  7 A West African Concept of Rhythmic Time

###  Misunderstandings…

The relative lack of serious research on rhythm in sub-saharan African music
is frankly baffling, given traditions so rich in rhythmic textures and
structures. The Journal de la Discotheque Internationale de Musique Africaine
and the rare article in Music Perception are the only academic journals where
such music is even discussed. On the one hand, this paucity of work is
understandable as most of the research in cognitive sciences is being done in
Western universities with funding from local or national organizations; this
is compounded by the fact that even the relatively simple rhythmic structure
of most occidental music is still largely poorly understood. What is
particularly grievous on the other hand is that the choice of music chosen for
experiments mirrors the aesthetic imperialism present in the global music
industry. Furthermore, within Africa, the majority of research on rhythm
curiously involves Ghanian dance drumming. This in itself is peculiar, as the
Ghanian styles are hardly representative of West African music. In many
respects, any one of the plethora of cultures can hardly represent the varied
use of rhythms. Again, I suspect that the popularity of such studies is
strongly linked to the patronization of Ghanian music schools by the Western
academic elite and well-known composers like Steve Reich, as well as a much
stronger push by Ghanians to export their culture.

###  Asymmetric Cognitive Clocks

One useful research effort that appeared in a recent issue of Music Perception
investigated mental models used by expert African drummers in the production
of polyrhythmic patterns. The paper fits into the category of work which
pursues computational validation of “culturally initiated beliefs” about
cognitive models. (That cultural aspects of a music and its production would
not even be considered in a computational model is bewildering.) Experiments
were conducted by recording the performance of a master Asante drummer’s
spontaneous patterns and responses to a computer generated tone. Quantities
such as pulse hand allocation (left or right), pulse stream size (three or
four) were varied and measured [Magill:97, p. 191]. The goal was to determine
if the African cultural description of the cognitive process involved in
producing rhythm is valid by computationally modeling the process and
experimentally verifying its validity. The performance data was also run
through a pulse-ground(PG) model based on the notion of meter as a means to
check the data against another well understood model [Magill:97, p. 191]. The
model used in the experiments is an asymmetric time-line-ground(TLG) model
that represents a computational elaboration of the multilayered traditional
West African understanding that all instruments in a percussion ensemble play
in relation to a fundamental time-line. The asymmetry of the time-line Magill
claims doesn’t “reduce to one of additive meter” [Magill:97, p. 191] because
much West African music is founded on the presence of parallel isochronous
pulse streams that regularly cut across the additive subgroups. This is
possible because the cycle lengths of the asymmetric time-line are composite
numbers (6, 8, 12, 24). Furthermore, TLG model “allows for the presence of
unequal clock pulses but assumes that where clock intervals are of the same
duration, the variance of those two clock pulses will be equal” [Magill:97, p.
191]. In performances by the master Asante drummer, Magill reports that the
TLG provides a “convincing” fit to seven of the eight tests. The eighth
required some modifications to the basic model. Magill comments further that
the “asymmetric process” need not be based on the single fastest pulse
(additive meter) even though the experimental results can be viewed in this
light.


# Fundamental Groups of 2-Complexes with
Nonpositive Planar Sectional Curvature

Lycka Drakengren

###### Abstract.

We show that the finite simply connected 2-complexes of nonpositive planar
sectional curvature are collapsible. Moreover, we show that each finite
connected 2-complex with negative planar sectional curvature and fundamental
group $\mathbb{Z}$ can be collapsed to a 1-dimensional cycle.

##  1\. Introduction

Cell complexes with nonpositively curved metrics have been of great interest
to many researchers in geometric group theory. As a consequence, several
results are known concerning the fundamental groups of nonpositively curved
2-complexes (see e.g. [OsPr22], [BaBr95]).

For Euclidean complexes, the condition of being nonpositively curved can be
checked using Gromov’s link condition. For 2-complexes, Gromov’s link
condition can be stated in terms of angles: A Euclidean 2-complex is
nonpositively curved if and only if each cycle in the vertex links has length
$\geq 2\pi$.

We therefore find it natural to consider 2-complexes with positive angles
assigned to the corners of each face, without imposing a metric. These are
referred to as angled 2-complexes.

The notion of nonpositive planar sectional curvature for angled 2-complexes
was introduced by Wise in [Wis04], imposing the condition that planar sections
at each vertex have an angle sum $\geq 2\pi$. The definition originates in the
so called Gersten-Pride weight test ([Ger87, p.37]). For this test, we metrize
the vertex links of a 2-complex, defining the length of an edge in the link to
be the size of the angle at the corresponding corner in the 2-complex. The
Gersten-Pride weight test is then satisfied if every cycle in the link of any
vertex has length $\geq 2\pi$.

If angles are assumed to be nonnegative, an angled 2-complex has nonpositive
planar sectional curvature if and only if it satisifies the weight test
[Wis03, p.4]. We will here assume that angles are positive, and refer to the
angled 2-complexes with nonpositive planar sectional curvature as conformally
nonpositively curved 2-complexes.

The property of being conformally nonpositively curved turns out to be less
restrictive than the property of having a nonpositively curved metric. The
presentation complexes of Baumslag Solitar groups are examples of 2-complexes
which can be conformally nonpositively curved without admitting a
nonpositively curved metric [McC03, p.15].

In this paper, we contribute to the classification of finite conformally
nonpositively curved 2-complexes according to their fundamental groups.

We will denote a free face of a 2-complex to be a cell $c$ of dimension $n=0$
or $1$ with the following properties: The cell $c$ is adjacent to one cell of
dimension $n+1$, and not to any other cells of dimension $\geq n+1$. Moreover,
the attaching map of the adjacent $(n+1)$-cell is a homeomorphism on the
preimage of the interior of $c$.

An elementary collapse of a 2-complex is defined to be the removal of the
interiors of a free face of dimension $n$ and its adjacent $(n+1)$-cell. A
collapse of a 2-complex will here denote a sequence of elementary collapses. A
2-complex is collapsible if it can be collapsed to a single point.

The first theorem proved in this paper, stated below, classifies the
conformally nonpositively curved 2-complexes whose fundamental groups are
trivial.

######  Theorem 1.1.

A finite, simply connected, conformally nonpositively curved 2-complex is
collapsible.

Our second theorem, stated below, concerns 2-complexes whose fundamental
groups are $\mathbb{Z}$. We will refer to a 2-complex as being conformally
negatively curved if it satisfies the Gersten-Pride weight test with cycle
lengths being strictly greater than $2\pi$.

######  Theorem 1.2.

Let $X$ be a finite, connected, conformally negatively curved 2-complex. If
$X$ has fundamental group $\mathbb{Z}$, then $X$ can be collapsed to a
1-dimensional cycle.

While Theorem 1.2 gives a classification of finite 2-complexes with
fundamental group $\mathbb{Z}$ being conformally negatively curved, we do not
know whether there are similar results for complexes which are only assumed to
be conformally nonpositively curved.

The structure of the paper is as follows: Section 2 provides a background to
concepts and invariants related to 2-complexes. Theorem 1.1 is proved in
Section 3, using a notion of straight lines as in [Wis04, p.450] and an
application of the Combinatorial Gauss-Bonnet Theorem as in [Wis04, p.455]. In
Section $4$, we prove Theorem 1.2 by considering the $2$ ends of the universal
cover of a conformally negatively curved 2-complex with fundamental group
$\mathbb{Z}$. We prove that there cannot be a straight line whose ends belong
to the same end of the universal cover, hence excluding the case where an edge
in the complex has $3$ or more adjacencies with 2-cells. The remaining case
follows from Theorem 1.1 and the fact that the fundamental group of a compact
surface cannot be $\mathbb{Z}$.

## Acknowledgements

This project was conducted under the Summer Research in Mathematics Programme,
and received funding by the Trinity Summer Studentship Scheme. I owe thanks to
my advisor Henry Wilton for his expert advice and excellent support.

##  2\. Background

In this section, we explain the fundamental concepts which will be used in
subsequent sections. Most definitions are based on terminology by Bridson and
Haefliger [BrHa10], and Wise [Wis04].

######  Definition 2.1.

A (combinatorial) 2-complex $X$ is constructed by gluing together cells of
dimensions $0$, $1$, or $2$ by maps which are homeomorphisms on interiors of
cells. The cells of dimensions $0$, $1$ and $2$ are the vertices, edges and
faces, respectively, of the 2-complex.

For our purposes, we will from now on assume that the 2-complexes are
connected.

######  Definition 2.2.

Define the link of a vertex $v$ in a 2-complex $X$, denoted $Lk_{X}(v)$, to be
a multigraph, whose vertices correspond to the edges adjacent to $v$ in X. Two
(possibly equal) vertices in $Lk_{X}(v)$ are adjoined by an edge for each
corner of a 2-cell the corresponding two edges in $X$ define.

######  Definition 2.3.

An angled 2-complex will here denote a 2-complex where the corners of each
face are prescribed a positive angle, such that the angles in a face with $n$
corners sum up to $(n-2)\pi$.

Each connected component of the link of a vertex $v$ will be assigned a
metric, as follows: Each edge in $Lk_{X}(v)$ will be given a length equal to
the value of the angle at the vertex $v$ for the corresponding corner of a
face in $X$. The length between two vertices in the same component of
$Lk_{X}(v)$ will be given by the minimal sum of the lengths of edges in a path
connecting them.

######  Definition 2.4.

A vertex $v$ in a 2-complex $X$ is said to satisfy the link condition if the
length of each cycle in $Lk_{X}(v)$ is $\geq 2\pi$.

######  Definition 2.5.

An angled 2-complex $X$ is said to have nonpositive planar sectional curvature
if all vertices of $X$ satisfy the link condition. In that case, we will refer
to $X$ as a conformally nonpositively curved complex. Moreover, if the
inequality in Definition 2.4 is strict for each vertex in $X$, we will refer
to $X$ as a conformally negatively curved complex.

Note that Wise’s definition of an angled 2-complex in [Wis04] is slightly more
general, with angles allowed to be chosen arbitrarily or taking negative
values. We will only be interested in the case of positive angles here.
Furthermore, the more general definitions of angled 2-complexes and
nonpositive planar sectional curvature allow the angles of a face with $n$
corners to sum up to a value smaller than $(n-2)\pi$. For our purposes
however, by increasing angles if necessary, we can without loss of generality
assume that the angle sum of a face with $n$ corners is equal to $(n-2)\pi$.

######  Definition 2.6.

A combinatorial map is a continuous map $\tau\colon X\to Y$ between
2-complexes, whose restriction to the interior of single cell in $X$ is a
homeomorphism onto the interior of a cell in $Y$.

We will now define the notion of a straight line segment on a face $f$ in an
angled 2-complex. Note that a face $f$ can be equipped with a combinatorial
map from a Euclidean polygon $T$ such that angles are preserved. We will refer
to $T$ as a Euclidean polygon associated to f.

######  Definition 2.7.

Equip each face $f_{j}$ of an angled 2-complex with an associated Euclidean
polygon $T_{j}$ and a combinatorial map $\theta_{j}\colon T_{j}\to f_{j}$. A
line segment on $f_{j}$ is defined to be the image of a Euclidean line segment
on $T_{j}$ under the map $\theta_{i}$.

The following definitions will be used in Van Kampen’s lemma, relating
nullhomotopic edge loops in $X$ to boundaries of simply connected 2-complexes
which are homeomorphic to a subset of the Euclidean plane.

######  Definition 2.8.

A 2-complex is planar if it is homeomorphic to a subset of the Euclidean
plane.

######  Definition 2.9.

A singular disc diagram is a simply connected planar 2-complex.

######  Definition 2.10.

An edge path in a 2-complex $X$ is a sequence of edges adjoined by vertices.
An edge loop is an edge path which is a circuit.

######  Definition 2.11.

A Van Kampen diagram for an edge loop $\gamma$ in a 2-complex $X$ is a
singular disc diagram $D$ which admits a combinatorial map $\tau\colon D\to X$
such that image of the boundary circuit of $D$ traces out $\gamma$.

######  Definition 2.12.

Let $D$ be a van Kampen diagram for a nullhomotopic loop $\gamma$ in a
2-complex $X$, and $\tau\colon D\to X$ its associated map. Let $f_{1}$,
$f_{2}$ be a pair of faces of $D$ sharing an edge $e$. Let $p_{1}$ and $p_{2}$
be the paths tracing out the boundaries of $f_{1}$ and $f_{2}$, respectively,
starting at the same vertex of $e$ and first traversing $e$. The pair $f_{1}$,
$f_{2}$ is said to be a cancellable pair if the paths $p_{1}$ and $p_{2}$ are
mapped to the same path in $X$ under $\tau$. The diagram $D$ is said to be
reduced if it has no cancellable pairs.

We now state Van Kampen’s lemma ([Wis04, p.442]).

######  Lemma 2.13 (Van Kampen’s lemma).

Each nullhomotopic edge loop in a 2-complex $X$ admits a reduced Van Kampen
diagram.

After one more definition, we conclude this section with a special case of the
Combinatorial Gauss-Bonnet Theorem stated in [Wis04].

######  Definition 2.14.

Denote the Euler characteristic of a graph $G$ by $\chi(G)$. Let $X$ be an
angled 2-complex. For a vertex $v$ of $X$, we let $S(v)$ denote the sum of the
angles at $v$. We define the curvature of v to be the quantity
$\kappa(v)=2\pi-\pi\cdot\chi(Lk_{X}(v))-S(v)$.

######  Theorem 2.15.

Let $V(X)$ denote the vertex set of a planar, finite angled 2-complex $X$. If
$X$ is simply connected, we have the equality $\sum_{v\in
V(X)}\kappa(v)=2\pi$.

##  3\. Collapsibility

In this section we show that the finite, simply connected conformally
nonpositively curved complexes are collapsible. The proof will require some
additional definitions, which are stated below.

######  Definition 3.1.

An immersion between 2-complexes is a locally injective combinatorial map
between the complexes. Let $V(X)$ be the vertex set of a 2-complex $X$. A
near-immersion between 2-complexes is a combinatorial map $\tau\colon X\to Y$
such that $\tau$ is locally injective on $X\backslash V(X)$.

######  Definition 3.2.

An immersed walk in a (multi)graph will be a walk where no traversed edge is
immediately followed by the same edge traversed in the reverse direction.

######  Definition 3.3.

A segmental subdivision of an angled 2-complex $X$ will be denoted a
subdivision $X^{\prime}$ of $X$, with the following properties:

1\. The edges of $X^{\prime}$ are line segments in $X$.

2\. For each corner in $X^{\prime}$, consider the face $f$ of $X$ the corner
belongs to. The angle of the corner is defined to be the angle between the
corresponding line segments in the Euclidean polygon associated to $f$.

Thus $X^{\prime}$ naturally has the structure of an angled 2-complex.

We now describe how to obtain the vertex links in a segmental subdivision
$X^{\prime}$ of a 2-complex $X$. If a vertex $v$ comes from a vertex of $X$,
the link $Lk_{X^{\prime}}(v)$ is obtained as follows: We take the link of $v$
in $X$ and add vertices corresponding to the new edges of $X^{\prime}$ meeting
$v$. Note that a subdivided angle in $X$ consists of angles in $X^{\prime}$
summing up to the value of the original angle. Consequently, the edges
$Lk_{X}(v)$ will be subdivided into new edges with lengths adding up to the
length of the initial edge.

For a vertex $v$ of $X^{\prime}$ lying in the interior of an edge $e$ in $X$,
the link $Lk_{X^{\prime}}(v)$ is constructed as follows: Take two vertices $x$
and $y$ corresponding to the two edges in $X^{\prime}$ adjacent to $v$ along
$e$. Adjoin $x$ and $y$ by an edge for each adjacency of $e$ with a face $f$
in $X$, noting that the same face can be adjacent to $e$ in multiple ways.
These edges will be assigned the length $\pi$. Subdivide each of these edges
by adding vertices for each edge in $X^{\prime}$ meeting $v$, and give lengths
to the new segments according to the angles of corners in $X^{\prime}$. Again,
the lengths of the smaller segments will add up to the length of the original
segment. A cycle in the link will consist of two paths between $x$ and $y$,
and will thus have length $2\pi$.

If $v$ is a vertex of $X^{\prime}$ lying in the interior of a face of $X$, the
link will be a cycle of length $2\pi$ subdivided according to the edges of
$X^{\prime}$ meeting $v$.

In particular, if $X$ is conformally nonpositively curved, a segmental
subdivision $X^{\prime}$ will also be conformally nonpositively curved with
the inherited angle structure.

We will also need a notion of paths on a 2-complex which consist of
concatenated line segments.

######  Definition 3.4.

A segmental path on a 2-complex $X$ will here denote an edge path in a
segmental subdivision of $X$.

######  Definition 3.5.

Consider a segmental path $p$ on $X$ and a corresponding subdivision
$X^{\prime}$ of $X$ in which $p$ is an edge path. Assume that $p$ consists of
the ordered sequence of vertices $(v_{i})_{i\geq 0}$. Let $e_{i}$ be the edge
between $v_{i}$ and $v_{i+1}$ for $i\geq 0$. For $v_{i}$ not an endpoint of
$p$, the segmental path is said to be straight at $v_{i}$ if the points in
$Lk_{X^{\prime}}(v_{i})$ corresponding to $e_{i}$ and $e_{i+1}$ lie at a
distance $\geq\pi$ apart.

If the segmental path $p$ is straight at $v_{i}$ for all $i>0$ such that
$v_{i}$ is not an endpoint of $p$, we say that $p$ is straight.

The main result (same as Theorem 1.1) in this section is stated below,
followed by a lemma that will be used in the proof.

######  Theorem 3.6.

A finite, simply connected conformally nonpositively curved complex is
collapsible.

######  Lemma 3.7.

Let $X$ be a conformally nonpositively curved complex without free faces, and
let $v$ be a vertex of $X$. For each point $x$ on an edge in $Lk_{X}(v)$,
there is a point $y$ in $Lk_{X}(v)$ lying at a distance $\geq\pi$ away from
$x$.

###### Proof.

Because $X$ has no free face, $Lk_{X}(v)$ cannot contain a free face of
dimension 0. Hence, there is a shortest immersed walk of positive length
starting and ending at $x$. This walk will contain a cycle, which because of
the link condition has length $\geq 2\pi$. Consider a point $y$ which is at a
distance $\geq\pi$ away from the first point on the walk belonging to this
cycle, the distance being measured along the cycle. Denote the subwalk from
$x$ to $y$ in the immersed walk by $p$ and the subwalk from $y$ to $x$ by $q$.
Denote the walks obtained by reversing their directions by $p^{-1}$ and
$q^{-1}$ respectively.

Since the walk $p$ is followed by $q$ in an immersed walk, the last visited
edges of $p$ and $q^{-1}$ must be distinct. Hence, for each walk between $x$
and $y$, continuing the walk along $p^{-1}$ or $q$ will in at least one of the
cases yield an immersed walk. In particular, if there were a walk $r$ of
distance $<\pi$ between $x$ and $y$, continuing it along $p^{-1}$ or $q$ we
can obtain an immersed walk based at $x$ of shorter distance, a contradiction.
Hence, $y$ must lie at a distance $\geq\pi$ away from $x$. ∎

Proof of Theorem 3.6. Let $X$ be a finite, simply connected conformally
nonpositively curved complex without free faces. If $X$ is 1-dimensional, by
the simple connectivity, $X$ must be a single point, since a tree with $n\geq
2$ vertices would have free faces of dimension $0$.

Otherwise, we can pick a 2-dimensional face $f_{1}$ of $X$ and create a
straight segmental path on $X$ as follows: Pick a starting point $v_{0}$ on
the face and continue along a line segment $l_{1}$ on the face. As soon as we
hit the interior of an edge $e$, the absence of free faces allows us to pick
an adjacent face $f_{2}$, which is either different from $f_{1}$ or has
multiple adjacencies with $e$.

Denote the point of intersection between $e$ and $l_{1}$ by $v_{1}$. Continue
the segmental path from this point, along a line segment $l_{2}$ in $f_{2}$,
such that the segmental path is straight at $v_{1}$.

Now assume that the line segment $l_{1}$ hits a vertex $v_{1}$ instead of the
interior of an edge. Consider the point $x$ in $Lk_{X}(v_{1})$ corresponding
to the segment $l_{1}$. By Lemma 3.7, there is a point $y$ in $Lk_{X}(v_{1})$
lying at a distance $\geq\pi$ from $x$. This point will in turn be associated
to the direction of a line segment on a particular face adjacent to $v_{1}$.
Continue the path from $v_{1}$ along this new line segment. If this segment
goes along an edge, we continue the segment until we hit the next vertex, and
repeat the previous step with this new segment.

In each step, having traversed a line segment on a face, whenever we hit a
vertex or the interior of an edge we repeat the above steps accordingly. From
this procedure, we will obtain a straight segmental path on $X$.

Since $X$ is finite, we will eventually come to a point where the segmental
path is self-intersecting, or reaches the same edge $e^{\prime}$ a second
time. As soon as either of these cases occurs, we stop the procedure and
denote the terminal vertex of the segmental path by $v_{n}$. Denote this
segmental path by $q$. In the first case, we form a closed path $\gamma$ by
following the part of $q$ starting and ending at the point of self-
intersection. In the second case, let $i$ be the largest value less than $n$
such that $v_{i}$ lies on $e^{\prime}$. We form a closed path $\gamma$ by
taking the subpath consting of vertices $v_{i},\dots,v_{n}$, and continuing it
along $e^{\prime}$ to connect the endpoints $v_{n}$ and $v_{i}$, see Figure 1.

Figure 1. Forming a loop $\gamma$ by connecting a subpath of $q$ along an
edge.

Let $X^{\prime}$ be a segmental subdivision of $X$ such that $\gamma$ is an
edge loop in $X^{\prime}$. The 2-complex $X^{\prime}$ is simply connected,
homeomorphic to $X$ and without free faces. Moreover, since $X^{\prime}$ is a
segmental subdivision, it inherits a conformally nonpositively curved angle
structure.

By Van Kampen’s lemma, since $\gamma$ is null-homotopic, there exists a
reduced Van Kampen diagram $D$ for $\gamma$. Denote by $\tau$ the associated
combinatorial map $D\to X^{\prime}$. Since $\gamma$ is injective by
construction, the diagram $D$ is homeomorphic to a disk. Pulling back the
angles from $X$ to $D$, we obtain an angle structure on $D$.

When $D$ is reduced, the map $\tau$ is a near-immersion. This means that the
link of a vertex $v$ in $D$ locally embeds into the link of the vertex
$\tau(v)$ in $X$. In particular, a cycle in $Lk_{D}(v)$ will map onto a
circuit of $Lk_{X}(\tau(v))$, and will thus have length $\geq 2\pi$. A path
between two vertices in $Lk_{D}(v)$ corresponding to boundary edges of $D$
will be mapped to a walk between vertices corresponding to edges of $\gamma$
in $Lk_{X}(\tau(v))$. Hence, the interior vertices of $D$ will have an angle
sum $\geq 2\pi$. Moreover, since we assumed $q$ to be straight, the angle sums
of the boundary vertices of $D$ will all be $\geq\pi$, with possible
exceptions for at most two vertices. These exceptional vertices correspond to
the endpoints of the subpath of $q$ belonging to $\gamma$.

The links of interior vertices of $D$ are cycles, thus having Euler
characteristic $0$. The links of boundary vertices are paths, with Euler
characteristic $1$. Hence, the curvatures of the interior vertices of $D$ and
of all but at most two vertices on the boundary are $\leq 0$.

If the angles of the exceptional vertices were to have value $0$, the adjacent
edges of $\gamma$ would have to overlap, contradicting the injectivity of
$\gamma$. Hence, the sum of curvatures of the exceptional vertices must be
strictly less than $2\pi$.

By Theorem 2.15, we obtain the contradictory inequality

$2\pi>\sum_{v\in V(D)}\kappa(v)=2\pi.$

In conclusion, each simply connected conformally nonpositively curved
2-complex $X$ must have a free face of dimension $1$ whenever $X$ has
2-dimensional faces. Performing an elementary collapse will result in a
complex which is homotopy equivalent to $X$ and with the number of cells
decreased by $2$. Moreover, since an elementary collapse does not create any
new cycles in the vertex links, the resulting complex will also be conformally
nonpositively curved. Thus, we may continue collapsing the complex until the
resulting complex is 1-dimensional, and hence is a single point. This shows
that $X$ is collapsible. $\Box$

##  4\. Conformally negatively curved complexes with fundamental group
$\mathbb{Z}$

In this section, we prove a similar result to Theorem 3.6 for conformally
negatively curved complexes with fundamental group $\mathbb{Z}$.

Let $\tilde{X}^{(1)}$ be the 1-skeleton of the universal cover of a 2-complex
$X$. We will assign a path metric $d$ to $\tilde{X}^{(1)}$ by assigning all
the edges length $1$.

We now state our theorem (same as Theorem 1.2) which classifies the
conformally negatively curved complexes with fundamental group $\mathbb{Z}$.

######  Theorem 4.1.

A finite, conformally negatively curved complex $X$ with fundamental group
$\mathbb{Z}$ can be collapsed to a 1-dimensional cycle.

The proof will be divided into 2 parts. First, we consider the case where all
edges have at most two adjacencies with 2-cells. Next, we consider the case
where there is an edge with three or more adjacencies with 2-cells.

Proof of Theorem 4.1. Assume that $X$ has no free faces.

Case 1. Assume that no edge has three or more adjacenies with 2-cells. Since
there are no free faces, all edges of $X$ have $0$ or $2$ adjacencies with
2-cells. Assume that $X$ contains at least one 2-cell. Let $X^{\prime}$ be the
subcomplex of $X$ consisting of the union of the 2-cells of $X$. Since $X$ is
obtained from $X^{\prime}$ by attaching 1-dimensional cells to $X^{\prime}$ at
vertices of $X^{\prime}$, the fundamental group of $X^{\prime}$ is either
trivial or $\mathbb{Z}$.

Note that $X^{\prime}$ can be obtained by identifying a finite number of
points on a (possibly disconnected) compact surface. By separating these
points, we obtain a union of compact, connected surfaces whose fundamental
groups must be trivial since compact surfaces cannot have fundamental group
$\mathbb{Z}$. Each of these surfaces admits a nonpositively curved structure
inherited from $X^{\prime}$. Theorem 3.6 tells us that these surfaces each has
a free face, which must be 2-dimensional. This means that $X^{\prime}$, and
hence $X$, also has a free face, a contradiction.

Thus, $X$ must be 1-dimensional. We conclude by noting that any 1-dimensional
connected complex with fundamental group $\mathbb{Z}$ containing no vertex of
degree $1$ must be a cycle.

Case 2. Assume now that there is an edge on $X$ with three or more adjacencies
with 2-cells. In this case, we consider three infinite segmental paths
starting from a point in the interior of this edge, and choose a different
adjacency for each segmental path to traverse when leaving the edge. Moreover,
we assume that each segmental path makes an angle $\pi/2$ with the starting
edge on the face they first traverse, and that each segmental path is
straight. Let $r_{1},r_{2},r_{3}$ be the lifts of the respective segmental
paths to the universal cover $\tilde{X}$, where the angle structure on
$\tilde{X}$ is inherited from $X$.

We will show that any straight segmental path $r$ on $\tilde{X}$ is a proper
ray. Indeed, if there is a compact set $K\subset\tilde{X}$ such that $r$
visits $K$ an infinite number of times, the segmental path must either
intersect itself or hit the same edge twice in $K$. An argument as in the
proof of Theorem 3.6 shows that we can form a nullhomotopic loop from $r$
which is straight at every point except for at most $2$ points. This will
again contradict Theorem 2.15.

Since the fundamental group of $X$ is $\mathbb{Z}$, the universal cover
$\tilde{X}$ has $2$ ends. Since $r_{1},r_{2},r_{3}$ are proper rays, the
pigeonhole principle implies that two of the segmental paths, say $r_{1}$ and
$r_{2}$, must belong to the same end. Let the vertices of $r_{1}$ and $r_{2}$
be $(v_{i})_{i\geq 0}$ and $(w_{i})_{i\geq 0}$, respectively, in the order
they appear on the segmental paths. We want to show that there is a positive
integer $N$ such that, for all $n\in\mathbb{Z}_{\geq 0}$, the vertex $v_{n}$
can be adjoined by a path to $w_{i}$ for some $i\geq 0$ along an edge path in
$\tilde{X}$ consisting of $\leq N$ edges.

Indeed, by the Schwarz-Milnor lemma, there is a ($\lambda,\varepsilon$)-quasi-
isometry $f$ from the 1-skeleton $\tilde{X}^{(1)}$ to $\mathbb{Z}$. By
[BrHa10, p.145, Proposition 8.29], the ends of $\tilde{X}^{(1)}$ correspond to
the ends of $\mathbb{Z}$ under $f$. Assume that the end in $\mathbb{Z}$
corresponding to $r_{1}$ and $r_{2}$ is the end corresponding to an increasing
sequence of positive integers. Then, for each $m\in\mathbb{Z}$, there is a
positive integer $m^{\prime}$ such that $f(v_{n}),f(w_{n})\geq m$ for all
$n\geq m^{\prime}$. Assume that $M\geq 0$ is such that $f(v_{n})\geq f(w_{0})$
for all $n\geq M$. Let $L\geq M$ be a positive integer, and let $k=f(v_{L})$.

Let $l$ be the maximum number of edges of a Euclidean polygon associated to a
face in $X$. The distance between any two nearby points $w_{i},w_{i+1}$ is
less than or equal to $l/2$ for $i\geq 0$. Hence, since $f$ is a
($\lambda,\varepsilon$)-quasi-isometry, the distance between any two points
$f(w_{i}),f(w_{i+1})$ is less than or equal to the constant $A=\lambda
l/2+\varepsilon$. Thus, using the facts that $k\geq f(w_{0})$ and that
$f(w_{i})\to\infty$ as $i\to\infty$, there must be a value of $i\geq 0$ such
that $|k-f(w_{i})|\leq A$.

For this value of $i$, we have
$d(v_{L},w_{i})\leq\lambda(|k-f(w_{i})|+\varepsilon)$. In particular, we can
find an edge path between $v_{L}$ and $w_{i}$ traversing at most
$N_{0}=\lceil\lambda(A+\varepsilon)\rceil+1$ edges. Letting $c$ be the maximum
value of the distances from $v_{n}$ to $r_{2}$ for $0\leq n\leq M$, the value
$N=\max\\{N_{0},\lceil c\rceil\\}$ is an upper bound for the distance between
any point $v_{n}$, for some $n\in\mathbb{Z}$, to $r_{2}$.

Let $L$ be a positive integer, and let $p$ be a path from $v_{L}$ to $w_{i}$,
for some $i\in\mathbb{Z}_{\geq 0}$, which is contained in an edge path of
$\tilde{X}$ consisting of at most $N$ edges. Let $\eta$ be the concatenation
of the subpaths $p_{1}$ and $p_{2}$ of $r_{1}$ resp. $r_{2}$ consisting of the
vertices $v_{0},\dots,v_{L}$ and $w_{0},\dots,w_{i}$, respectively. Form a
loop $\gamma$ by concatenating $p$ and $\eta$. We consider a minimal
subdivision $\tilde{X}^{\prime}$ of $\tilde{X}$ so that $\gamma$ becomes an
edge loop in $\tilde{X}^{\prime}$.

The loop $\gamma$ is nullhomotopic, and so admits a reduced van Kampen diagram
$D$ equipped with a near-immersion $\tau\colon D\to\tilde{X}^{\prime}$.

Since $X$ is conformally negatively curved, there exists a constant
$\varepsilon>0$ such that all vertices of $X$ have curvature
$\leq-\varepsilon$.

Let $B$ denote the number of vertices of $D$ which do not lie on the boundary
$\partial D$. The curvatures of vertices on $\partial D$ mapping under $\tau$
to vertices on $\eta$, not being endpoints of this path, will be $\leq 0$.
Hence, there are at most $N+1$ vertices on $\partial D$ with positive
curvature. Thus, the sum of curvatures of the vertices on $\partial D$ is
$\leq(N+1)\pi$. For vertices in the interior of $D$, the curvature is
$\leq-\varepsilon$. Theorem 2.15 gives us

$2\pi=\sum_{v\in V(D)}\kappa(v)\leq(N+1)\pi-B\varepsilon.$

Hence, we obtain the bound $B\leq(N-1)\pi/\varepsilon$.

Next, we prove that the value $L$ cannot be arbitrarily large. To do this,
will show that the part $Y$ of $\partial D$ mapping to $\eta$ under $\tau$
cannot contain arbitrarily many edges. To begin with, we will find a bound
$D^{\prime}$ on the degree of a vertex of $D\backslash Y$, independent of the
choice of $L$. Let $\alpha$ be the value of the smallest angle in the complex
$X$. Note that the angles of corners at a vertex in $D\backslash Y$ are
inherited from angles of $X$, by the minimality of our subdivision.

If there is a vertex in $D\backslash Y$ of degree $n$, the curvature of this
vertex is $\leq 2\pi-n\alpha$. Theorem 2.15 gives us

(1) $2\pi=\sum_{v\in
V(D)}\kappa(v)\leq(N+1)\pi+(2\pi-n\alpha)=(N+3)\pi-n\alpha.$

This yields a contradiction for large $n$.

We write $D^{\prime}$ for the obtained upper bound for the degree of a vertex
in $D\backslash Y$, being independent of $L$.

Recall that $l$ denotes the maximal number of edges in a Euclidean polygon
associated to a face in $X$. We know that $\eta$ is a straight segmental path,
since the angle between the paths $p_{1}$ and $p_{2}$ at $v_{0}=w_{0}$ is
equal to $\pi$. This means, as in the proof of Theorem 3.6, that $\eta$ does
neither self-intersect, nor cross an edge of $\tilde{X}$ more than once. So
$\eta$ cannot visit a face of $\tilde{X}$ more than $l/2$ times. This means
that there is an upper bound $E$ on the number of edges of a Euclidean polygon
associated to a face in $\tilde{X}^{\prime}$, and hence on the number of edges
of a face in $D$.

Next, we note that each face of $D$ has at least one vertex which does not
belong to $Y$. Consequently, the number of faces of $D$ is bounded above by
the number of corners of vertices in $D\backslash Y$, and hence by the
constant $(B+N-1)D^{\prime}$. Finally, the number of edges of $D$ is less than
or equal to $E$ times the number of faces. In particular, we obtain the bound

$L\leq(B+N-1)D^{\prime}/E.$

So $L$ cannot be arbitrarily large, proving that $X$ cannot have an edge with
three or more adjacencies with 2-cells. This means that $X$ must have a free
face unless $X$ is 1-dimensional, and can thus be collapsed to an
1-dimensional cycle by a similar argument as in the proof of Theorem 3.6.

$\Box$

## References

  * [BaBr95] Ballman, W., Brin, M. (1995). Orbihedra of nonpositive curvature. Publications mathématiques de l’I.H.É.S., Volume 82, pp. 169–209.
  * [BrHa10] Bridson, M.R. and Haefliger, A. (2010). Metric spaces of nonpositive curvature. Springer-Verlag, Berlin.
  * [Bro08] Brown, K.S. (2008). Lectures on the Cohomology of Groups. Available at: https://pi.math.cornell.edu/~kbrown/papers/cohomology_hangzhou.pdf
  * [Ger87] Gersten, S.M. (1987). Essays in Group Theory. Springer-Verlag, New York.
  * [Hat02] Hatcher, A. (2002). Algebraic Topology. Cambridge University Press, Cambridge.
  * [McC03] McCammond, J. (2003). Constructing non-positively curved spaces and groups. Day 4 of a course at the Durham symposium on geometric and cohomological group theory. Available at: https://web.math.ucsb.edu/~mccammon/slides/durham4.pdf
  * [OsPr22] Osajda, D. and Przytycki (2022). Tits Alternative for 2-dimensional CAT(0) complexes. Forum of Mathematics, Pi, Volume 10, No. e25.
  * [Sta71] Stallings, J. (1971). Group theory and three-dimensional manifolds. Yale University Press, New Haven and London.
  * [Wis03] Wise, D.T. (2003). Nonpositive immersions, sectional curvature, and subgroup properties. Electronic Research Announcements of the American Mathematical Society, Volume 9, pp. 1–9.
  * [Wis04] Wise, D.T. (2004). Sectional curvature, compact cores, and local quasiconvexity. Geometric and Functional Analysis, Volume 14, pp. 433–468.

Lycka Drakengren, Trinity College, Cambridge CB3 9DH, UK
Email address<EMAIL_ADDRESS>