Some principles of network epidemiology

Lockdowns and “flattening the curve” are very much in the news right now, so I thought it was timely to post about some principles of network epidemiology. The charts below (click to zoom) show the simulated spread of a disease (in a small “toy” population of 2000) subject to certain assumptions. The blue lines show the total number of cases over time (adding up those infected, recovered, and dead). This total number is important because some percentage of the final total will die, and we want to minimise that (if we can). The red lines show the number of current infections over time. This is important because some percentage of the red numbers are in hospital, and the red peak therefore represents peak load on the medical system.

In the top row, we have connections happening at random, with increasing social distancing happening from left to right. Moderate social distancing doesn’t change the fact that almost everybody gets the disease, but it does delay and reduce the peak, thus taking strain off the medical system. Extreme social distancing saves many lives, but only if social distancing is continued for a long time (in real terms, until a vaccine is available, which is almost certainly not sustainable).

In the middle row, we have the same number of contacts happening as in the top row, but most of the contacts are within limited social circles. Such contacts, between family members and close friends, are less serious than contacts with strangers. If Peter is your close friend, and you catch the virus, then there’s a reasonable chance that Peter caught it the same way, and so there’s a reasonable chance that your contact with Peter makes no actual difference. If Peter is a spouse, child, or flatmate, that’s quite a good chance. Contacts with strangers, however, can spread the disease from one social circle to another, and so are far more serious.

In the bottom row, we again have the same total number of contacts happening, but a few “super spreaders” have many more contacts than average (while the majority have slightly less than average, to compensate). This third scenario is significantly worse than the top row – higher, earlier, red peaks, and many deaths even when there is extreme social distancing. Unfortunately, experience has shown that medical personnel, in spite of the fantastic work that they do, have the potential to be serious “super spreaders,” because:

  • they have contact with many patients;
  • the patients are strangers; and
  • the patients are more likely than average to be elderly and/or vulnerable.

This is why personal protective equipment (PPE) for medical personnel is so critically important, as are good testing protocols for medical personnel. Other kinds of “super spreaders” also occur, of course, and it is important to identify them, test them, and provide them PPE (or stop them doing what they’re doing, if it’s non-essential – some jurisdictions with supposedly strict rules are still allowing prostitutes to operate, for example).

Overall, if we look at columns in the picture (all three charts in each column have the same total number of contacts), we see that the kind of contact is just as important as the number of contacts. Isolation regulations in some jurisdictions don’t always recognise that fact, unfortunately.

Scientific alignment

I was thinking recently about the alignment (in the Dungeons & Dragons sense) of fictional scientists (see diagram above).

I was brought up on the Famous Five children’s stories by Enid Blyton. Perennially popular, even though flawed in certain ways, these novels star a rather grumpy scientist called Quentin (who had more than a little to do with my own desire to become a scientist). Quentin is certainly altruistic:

‘These two men were parachuted down on to the island, to try and find out my secret,’ said her father. ‘I’ll tell you what my experiments are for, George—they are to find a way of replacing all coal, coke and oil—an idea to give the world all the heat and power it wants, and to do away with mines and miners.’
‘Good gracious!’ said George. ‘It would be one of the most wonderful things the world has ever known.’
‘Yes,’ said her father. ‘And I should give it to the whole world—it shall not be in the power of any one country, or collection of men. It shall be a gift to the whole of mankind—but, George, there are men who want my secret for themselves, so that they may make colossal fortunes out of it.’
” (Enid Blyton, Five On Kirrin Island Again, 1947)

However, Quentin works for no organisation (barring some government consulting work) and draws no regular salary. He is clearly Chaotic Good.

Long before Quentin, Victor Frankenstein in Frankenstein (Mary Shelley, 1818) created his famous monster out of selfishness and hubris. However, he also desires to make things right, so Frankenstein seems to me Chaotic Neutral.

On the other hand, the experiments of Doctor Moreau in The Island of Doctor Moreau (H. G. Wells, 1896) mark him as Chaotic Evil. The same is true of the scientist Rotwang in the movie Metropolis (1927), who is the prototype of the evil “mad scientist” of many later films – in contrast to good “mad scientists” like Emmett “Doc” Brown in the Back to the Future movies (1985, 1989, 1990).

In all cases, however, there seems to be a bias towards portraying scientists as Chaotic. This is a little strange, because the organisational structures, processes, and rules governing science in the real world are better described as “ordered” or Lawful (in the Dungeons & Dragons sense). Perhaps chaotic characters are just more fun?

Not that everyone follows all the rules and procedures of course. When I take the What is your Scientific Alignment? test, my personal alignment comes out as Neutral Good.

Looking back: 1987

In 1987, my PhD work at the University of Tasmania was beginning to take shape, and I produced a technical report with some preliminary results. I also started a side-project on functional programming language implementation which was to result in the design of a novel computer (a computer, sadly, that was never actually built, although many people joined in on the hardware aspects).

Also in that year, Supernova 1987A became visible within the Large Magellanic Cloud (picture above taken by the Kuiper Airborne Observatory). The programming language Perl also appeared on the scene, and Per Bak, Chao Tang, and Kurt Wiesenfeld coined the term “self-organized criticality.” Prompted by a discovery in 1986, physicists held a conference session on high-temperature superconductivity, billed as the “Woodstock of physics.” The immediate benefits were somewhat over-hyped, however.

The usual list of new species described in 1987 includes Fleay’s barred frog from northern New South Wales and south-eastern Queensland (picture below taken by “Froggydarb”).

In the world of books, James Gleick popularised chaos theory with his Chaos: Making a New Science, Allan Bloom wrote The Closing of the American Mind (which Camille Paglia called “the first shot in the culture wars”), and Donald Trump co-wrote Trump: The Art of the Deal (nobody imagined that he would be President one day).

Horror writer Stephen King had a good year, with The Tommyknockers and several other novels being published. The term “steampunk” was coined in 1987, and Orson Scott Card’s Speaker for the Dead, the sequel to Ender’s Game, won the Hugo Award for best science fiction or fantasy novel (it also won the Nebula Award in 1986, the year it was published).

In music, The Alan Parsons Project released their album Gaudi (which included the single below), U2 released The Joshua Tree, and Linda Ronstadt, Emmylou Harris, and Dolly Parton released Trio. The Billboard top song for 1987 was the rather silly 1986 single “Walk Like an Egyptian.”

Films of 1987 included 84 Charing Cross Road (based on the wonderful 1970 book by Helene Hanff), Bernardo Bertolucci’s The Last Emperor, Japanese hit A Taxing Woman (マルサの女), sci-fi action film Predator, Australian film The Year My Voice Broke and, of course, the cult classic The Princess Bride (based on the 1973 novel by William Goldman).

In this series: 1978, 1980, 1982, 1984, 1987, 1989, 1991, 1994, 2000, 2004, 2006, 2009.

The worms crawl in, the worms crawl out

Underneath (or, perhaps, to the side of) adult culture sits an often poorly documented culture for children alone. There are, of course, many songs and stories directed by adults to children, but true child culture consists of games, riddles, songs, stories, and rules directed from children to other children.

A rather dark example, largely specific to North America, is the Hearse Song below (the video gives a more complete version, but I must warn my readers – it’s really very gross, and not at all suitable for adults):

Don’t ever laugh as a hearse goes by
For you may be the next to die
They wrap you up in a big white sheet
From your head down to your feet
They put you in a big black box
And cover you up with dirt and rocks …
And the worms crawl in, the worms crawl out
The worms play pinochle on your snout …

The song is essentially a form of gallows humour picked up by children at around age 10 – about the age that children first come to grips with the inevitably of death (although it is rather surprising, given that the US is a majority-Christian society, that Christian views of death barely appear in the song at all). The excellent article on the song by Charles Doyle also reports military versions of the song from World War I recorded by Carl Sandburg and John J. Niles, but those appear to draw on earlier childhood versions.

I’ve been experimenting with a textual analysis focussing on song snippets containing lines devoted to interment (2 to 6 lines, depending on the version). I compared versions with a variation of the Levenshtein distance at the word level, using a table of related words, and allowing for permuted lines. The multi-dimensional scaling diagram below collapses the calculated distances into two dimensions. The phrase “Doyle var” refers to variants listed by Doyle (e.g. “They put you in a big white shirt / And cover you up with rocks and dirt”), whereas “Alternate” refers to versions I have collected myself on the Internet (e.g. “They wrap you up in a bloody black sheet / And throw you down a thousand feet”). A large amount of mishearing and misremembering seems to be going on.

The numbers in brackets on the chart indicate the number of lines in each snippet. The 2-line child versions form a visible cluster in the diagram, with 4-line versions by modern bands (Harp Twins and Rusty Cage) a little more distant, and the World War I versions on the periphery all quite different:

Distances can also be visualised as an UPGMA tree. However, this cannot really be interpreted as an evolutionary tree, in that the 4-line band versions seem to be combining lines from multiple 2-line versions. Indeed, there seems to be a large pool of rhyming pairs within the culture that is assembled and reassembled in various ways, rather than any canonical song. Perhaps this reflects the character of the verbally innovative child culture in which the song (or, rather, song family) dwells.

Seven varieties of metaphysics

I was having a discussion with someone recently on metaphysics, so I thought I would blog about it. Here are seven varieties of metaphysics, describing three “layers” of reality (and yes, I am oversimplifying for brevity).

The first is Platonism. Plato believed that there was a hierarchy of Forms (Ideals), of which the highest was The One (Plato’s version of God). These Forms or Ideals were the true reality, and the physical objects we touched, saw, and tasted were only shadows of that true reality (that is the point of the allegory of the cave). The physical orange which we see and eat reflects Ideals such as “Fruit,” “Sphere,” and “Orange.” Neoplatonism continues and extends this point of view.

Saint Augustine and many later Christians held to a Christianised Platonism, in which the Ideals were thoughts in the mind of God (the Christian God, naturally). The physical objects we touched, saw, and tasted had a greater importance in Christian Platonism than they did for Plato – after all, when God created those objects, “God saw that it was good.” Much as with Platonism, the regularities that people see in the physical universe are explained by the fact that God created the universe in accordance with regularities in the Divine thoughts. However, Christian Platonism does not have the metaphysical hierarchy that Platonism or Neoplatonism have – in Christian Platonism, God makes direct contact with the physical universe.

Aristotle also reacted to Plato by increasing the importance of the bottom layer, and Aristotle’s thought was Christianised by Thomas Aquinas as Thomism. However, in Thomism the all-important bottom layer does very little except to exist, to have identity, and to have properties assigned to it. It is also not observable in any way. This can be seen in the Catholic doctrine of transubstantiation. According to the Tridentine Catechism of 1566, the bread and the wine of the Eucharist lose their bottom (“substance”) layer (“All the accidents of bread and wine we can see, but they inhere in no substance, and exist independently of any; for the substance of the bread and wine is so changed into the body and blood of our Lord that they altogether cease to be the substance of bread and wine”), while the bottom (“substance”) layer of the body and blood of Christ becomes metaphysically present instead.

Idealism denies that the physical universe exists at all. The followers of Mary Baker Eddy take this view, for example, as did George Berkeley. Only thought exists. To quote a famous movie line, “there is no spoon.” These thoughts may be independent of whatever God people believe in or, as in monistic Hinduism, they may be actually be the thoughts of God (in which case, only God exists).

The last three kinds of metaphysics deny the existence of any kind of God. In Platonist Materialism, this denial is combined with a Platonist approach to mathematics, about which I have written before. Mathematics exists independently of the physical universe, and controls the physical universe, in the sense that the physical universe follows mathematical laws. Roger Penrose is one of many scientists holding this view.

In what I am calling Extreme Materialism, the existence of an independent mathematical world is also denied, i.e. there is an empiricist approach to mathematics (mathematics simply describes observed regularities in nature). This view seems to be increasing in popularity among non-religious people, although it causes philosophical problems for mathematics.

Finally, the concept of the Mathematical Universe holds that the so-called “physical universe” is itself composed only of mathematical objects – only mathematics exists (which makes this, in fact, a kind of Idealism).

In praise of the humble flagellum

The bacterial flagellum (above) is a fascinating device. It contains a molecular motor which rapidly rotates the filament. Whipping around, the filament drives the bacterium forward. In some bacteria, running the motor in reverse causes a random tumble. Amazingly, the combination of forward motion, random tumbling, and a simple sensor allows a bacterium to “home in” on a target (see four simulated example runs below). The idea is to do a random tumble whenever the sensor shows the bacterium heading in the wrong direction. An actual steering mechanism is not necessary – the bacterium gets to the target in the end.

William Dembski and Michael Behe famously argued (via the somewhat informally articulated concepts of specified complexity and irreducible complexity) that the flagellum was too complex to have evolved. Their argument fell apart with the discovery that the flagellum shares components with other bacterial gadgets, such as the injectisome, and thus could potentially have evolved in stages (although in fact the injectisome seems to have evolved as a simplification of the flagellum, and the evolutionary history of the flagellum remains a mystery).

The fundamental point that Dembski and Behe were attempting to make can be illustrated by the simple experiment summarised in the chart above. This experiment presupposes three genes (A, B, and C) all created by single point mutations on copies of existing genes, such that the combination of all three genes creates a useful widget. In the “flat landscape” case, this combination must arise entirely by chance. This takes a very long time (on the experimental assumptions used, an average of almost 14,000 generations). Dembski and Behe were probably right to suggest that, if the bacterial flagellum had to arise that way, it could not have evolved in the time available since the earth was formed.

In the “parallel evolution” case, however, each of the genes A, B, and C are assumed to be independently beneficial. The A-B-C combination then evolves very quickly. Evolution of the bacterial flagellum may have included aspects of parallel evolution, if components of multiple older widgets were “co-opted” for the flagellum.

The evolution of the bacterial flagellum is generally assumed to have instead been a case of “sequential evolution” (gene A is beneficial on its own, gene B is beneficial in the presence of gene A, gene C is beneficial in the presence of genes A and B, etc.). However, it is not at all clear what the sequence of genes producing the bacterial flagellum might have been (suggestions on this topic by Liu and Ochman have been criticised), nor is it clear what the sequence of intermediate benefits might have been (given that the injectisome was not an intermediate stage). Further research on the humble, but amazing, bacterial flagellum is clearly still required.