Wednesday, February 26, 2020

Deistic Ontology

Photo by Robynne Hu on Unsplash

Imagine the headlines:
  • Powerful alien discovered!
  • Alien has superpowers--knows what you’re up to!
  • You are being judged!
Don’t you think every government, military and R&D facility would be on the case, working up threat analyses on this powerful, moralistic entity?

Apparently not. Yet we have to take this Being seriously. Deny its existence and the Great Religions are simply men and women in frocks expressing pointless rituals: an OCD epidemic.

And as for their followers …


If God is real, what would our research programme conclude? Omniscient, omnipotent and moralistic: it’s a tough specification, pretty much full-on agency, a fully-realised intentional system.

Agents are conceptualised within AI as four-vectors: [Perceptions, Beliefs, Goals, Actions]. The corresponding agent-algebra tells you that perceptions combine with prior beliefs and goals to generate plans consisting of actions. In the process, beliefs and goals get updated. It’s more complex but this basic model is good enough for Government work.

Where do an agent’s goals come from? Ultimately from homeostasis requirements. The agent is designed to survive (in biology its genes are): as Woody Allen said, “80 percent of life is showing up.

The non-trivial agent confronts a challenging environment which knocks it away from its enduring, homeostatic ambitions--it gets hungry or thirsty; it’s threatened, damaged or needs to find a mate. In its situated context homeostasis determines goals and plans … and demands their execution to restore the agent to its set-point.


How do we apply this model to God?

For omniscience and omnipotence, God’s sensor and effector apparatuses must span all of spacetime. God’s beliefs should be accurate--but complete and effective sensory coverage should address that, other (processing) things being equal.

But what are God’s goals?

It seems parochial that a Cosmic God should be motivated by the needs or welfare of the puny beings of Sol Planet Three at Big-Bang + 13.8 billion years. I think we need a more universal homeostasis requirement, something more Spinozan.

God is concerned with preserving the harmony of the universe.

A requirement for homeostasis is only interesting if there is a threat to it. At the level of the universe--harmoniously regulated by the laws of physics--God becomes non-trivial, non-superfluous only if there is a threat to those very laws. Perhaps in the bifurcating projections of the universe's state-vector in Hilbert space--where our universe shimmers in possibilities--there are pathological outcomes which threaten the very fabric, the very integrity of the entire cosmos.

Catalysed false-vacuum decay.

Just as the coldest place in the universe is on planet Earth, perhaps the greatest threat to our universe’s stability is also here?

Imagine God as a deep neural net with inputs and outputs at each point in spacetime: past, present and future. The neural net resides in an orthogonal set of spatial dimensions and has a developmental trajectory in a second time dimension. Its understanding of the present state of all reality is its collection of input-vectors in superposition. Each input-vector corresponds to a possible world weighted by its amplitude.

The feedback loop in second-time is from possible worlds and their amplitudes through the God-net with its evolving weight-matrices through to spacetime actions through to revised amplitudes. The intent is to ensure that possible worlds representing pathological excursions constitute a set of measure zero.

Who or what is giving God grief? People who want supernatural actions--either to help their own cause or to bring fire and brimstone down on their opponents. Praying over the millennia hasn’t had much effect but high-energy physics?

It is possible to frighten God: perhaps in productive ways.

If you knew there was a well-funded, competent adversary-team with access to unimaginably high energy-densities sufficient to trigger a bubble nucleation event, what would you do? If you were a state with an intelligence agency and resources, that is.

Could we go beyond threats against the Deity. Could we converse with it--is God a second-order intentional system? What should we say?

So that's the setting (as requested). Now over to Adam to devise the characters, plot and narrative.

Tuesday, February 25, 2020

COVID-19 dynamics: simple coronavirus models

1. From deaths to current number of infections

The deaths reported in a country are usually the cumulative deaths so far. By the time someone has died though (they caught the infection a while ago) the infection has since increased. Here's a model which takes both these facts into account.


(1) lethality rate is 2%;
(2) average time to die after infection is one week (conservative assumption);
(3) numbers doubling time is 7 days (during the early, exponential phase of the infection).

Note that in a sequence which doubles, the latest figure is half the total so far. Thus 1, 2, 4, 8, 16. The current figure, sixteen, is approximately half the total of thirty one.

Example:a country which reports 16 deaths so far - also [n deaths].
1. Deaths (overall) = 16  [n]

2. Deaths in the latest iteration = 8  [n/2]
   - assume the 8 people caught it 7 days ago=1 iteration.

3. Infected cases 7 days ago = 50 * number now dead @ 2% lethality
    infected = 50 * 8 = 400   [25n]

5. Number infected now (twice as many) = 800  [50n].

So when you hear on the news that so many people are reported dead in some country, multiply by 50 to get the current number of cases.

2. The pattern of number of cases

If the infection was spreading in a closely-coupled population with no obvious barriers then the number of cases would increase as the logistics curve at the top of the page above. But countries are engaged in lockdown. This means that the logistics curve will apply inside the quarantine area - perhaps with a smaller R0 if people self-quarantine at home - but that spread outside will be impeded.

However, this is a hard virus to lockdown completely given asymptomatic transmission. So it's quite likely that - with a delay - new cities and regions will be infected ... and then locked down.

This gives a waviness modulating the global logistics curve. The global curve is a series of mini-logistics-curves glued together. It makes the overall pandemic a more protracted affair, which obviously helps in terms of public health logistics, but it's unlikely to stop the virus in its tracks.

It also creates periodic illusions that 'the infection is levelling off'.


3. The case of Iran

Iran's Shia theocracy is culturally not like the West, or indeed China. I wonder whether their current policy is not so much incompetence as a simple resignation to letting the virus just run to completion.

The reactionary theocrats running Iran may believe that their middle-class opponents are more likely to suffer as a consequences of the pandemic (the conservative rural multitudes will just soak it up) plus they are mostly surrounded by enemies: Israel, Arabs and Sunnis. What's not to like about being a country-level superspreader?

This would be interesting if true: Covid-19 as implicit biological warfare.

Tuesday, February 11, 2020

COVID-19: should we be worried? Yes

Dr Neil Ferguson of Imperial college seems the go-to guy:
"Our estimates – while subject to much uncertainty due to the limited data currently available – suggest that the impact of the unfolding epidemic may be comparable to the major influenza pandemics of the 20th century,” he said. [Daily Telegraph].
I heard him on PM yesterday evening. He reckons 60-70% of the UK population will eventually get it, of whom 1% will die; big error bars for the next three weeks. Given asymptomatic transmission with R0 2-3 it can't be kept out or contained within the UK over any extended period. Especially when it goes exponential in countries outside of China.

From Le Monde: (Practise your French) :
"selon une modélisation, un groupe de trois Etats se situe dans le trio de tête des pays les plus menacés par une arrivée du virus : l’Egypte, l’Algérie et l’Afrique du Sud. Ils sont suivis d’un second groupe constitué, lui, du Nigeria et de l’Ethiopie."
Lots of links between China and Africa. Public health screening and treatment not brilliant in the latter.

UK risks: (i) breakdowns in the supply chain May/June when the pandemic really takes hold here; (ii) personal incapacity and/or need to self-quarantine.

What can you do? 

- Shop now for cans of soup, long-life milk, dried fruits and cereals, sanitary items; face-masks (they won't look so ridiculous soon).

- Check out your camping cooker.

- Petrol in the car - don't forget the car can charge mobile phones.

Buy stuff you'll be able to consume after the pandemic so you're not wasting money.


The Mormons famously have a survivalist level of supplies, c. six months. But 2-4 weeks should do it - you can always go half-rations.

I always think the best time to panic-buy is before other people realise they have to.


Best estimate of case doubling time at present seems to be 7 days. If, by the end of February, there were 16 invisible cases in the UK, time to one million is (sixteen doublings) = 16 weeks = four months.

It won't seem a major problem here before Easter is my prediction (note big error bars!).


Update (13/2/20): I today cancelled our June holiday in Crete. The call-centre operative seemed unsurprised when I mentioned COVID-19. We have, however, been hit by a stinging cancellation fee, the entire deposit, 20% of the overall cost.

I'm thinking this summer is going to be disastrous for the holiday companies and for travel insurers.


Update: If you have a VPN into the UK it is educational to watch this:
"Hannah Fry leads a nationwide experiment to help plan for the next deadly flu pandemic, which could happen at any time. How many will it kill? What can we do about it?"
The BBC/Cambridge model parameters are basically spot-on for Covid-19 (R0=1.8; lethality=2%).


Update (14/2/20): My brother wrote to me and observed:
"I would take issue with one of your precautions: Don’t waste time and (increasingly large amounts of) money on surgical (or most other types of) masks. Even the better ones have an interweave gap some three times larger than the virus and invariably get damp, increasing the stickability.

Leave your eyes, nose and mouth open to the world, just don’t touch them without washing/gelling hands (as frequently as possible)."

Thursday, January 30, 2020

It's just a better parasite...

From Google AI:
"Modern conversational agents (chatbots) tend to be highly specialized — they perform well as long as users don’t stray too far from their expected usage.

To better handle a wide variety of conversational topics, open-domain dialog research explores a complementary approach attempting to develop a chatbot that is not specialized but can still chat about virtually anything a user wants.

Besides being a fascinating research problem, such a conversational agent could lead to many interesting applications, such as further humanizing computer interactions, improving foreign language practice, and making relatable interactive movie and videogame characters.

However, current open-domain chatbots have a critical flaw — they often don’t make sense. They sometimes say things that are inconsistent with what has been said so far, or lack common sense and basic knowledge about the world. Moreover, chatbots often give responses that are not specific to the current context.

For example, “I don’t know,” is a sensible response to any question, but it’s not specific. Current chatbots do this much more often than people because it covers many possible user inputs.

In “Towards a Human-like Open-Domain Chatbot”, we present Meena, a 2.6 billion parameter end-to-end trained neural conversational model. We show that Meena can conduct conversations that are more sensible and specific than existing state-of-the-art chatbots. Such improvements are reflected through a new human evaluation metric that we propose for open-domain chatbots, called Sensibleness and Specificity Average (SSA), which captures basic, but important attributes for human conversation.

Remarkably, we demonstrate that perplexity, an automatic metric that is readily available to any neural conversational models, highly correlates with SSA..."

This is the 'Chinese Room' approach to social agency, consciousness not required.

I think the approach is architecturally self-limiting: the limit-point being suave, fluid, empty-headed gossip-grooming.

It will make Google a fortune.

Thursday, January 23, 2020

Modelling China's new coronavirus

From the BBC.
"Lockdown measures are increasing across China's Hubei province to try to control the spread of a new virus that has left 17 people dead. Wuhan, Hubei's capital of 11 million people where the virus first emerged, has no trains or planes in or out. At least four other provincial cities are seeing clampdowns on transport.

"There are more than 500 confirmed cases of the virus, which has spread abroad, with Singapore, Saudi Arabia and Vietnam the latest affected."
Imagine a two-by-two matrix: one dimension is R0, the basic reproduction number; the other dimension is the survival function showing lethality. Only the square with R0 >> 1 and high lethality is a source of real concern. In that case the epidemic spreads fast and kills most of the victims.

One day we'll be able to model viruses and their mutation trees to determine whether there is an adjacent genotype to the day-zero virus which is much more dangerous. Today we have no idea - projections are just a matter of luck.

The current outbreak is rather benign so far.
"Most of the 17 victims were elderly and suffered from other chronic diseases including Parkinson's disease and diabetes."
However, there is clearly a selective advantage to any viral-mutation which more aggressively hijacks the host's body to make more virus copies - provided it doesn't kill the host too quickly. This virus currently has a long asymptomatic period, so it seems there is space for it to transition to a more lethal variant while maintaining transmission potency. We shall see.

Wash your hands - the face-masks are far from a panacea!

Tuesday, December 24, 2019

Witchcraft at the turn of the year

[Adam Carlton writes].

Amazon link

We know that witchcraft works in pre-capitalist societies. It sometimes works in contemporary societies too. The question is not whether but why and how.

The placebo effect.

The great benefits of magic, its real benefits: to decrease anxiety in the practitioner; to accentuate a sense of being in control; to modify the behaviours of those around you in a positive, beneficial way.

If someone is irking you, then casting a spell upon them will be efficacious to the extent that they - subconsciously - come to buy in to your prowess.

We are all superstitious, susceptible to the opinions of others.

So I would advise anyone who is in a bind, with no obviously-causal course of action to hand, to consider magic. It's like organised religion but works better.

Getting magic to work can be difficult. Spells do not always come off. This is usually because something about the casting was amiss: the timing, the ingredients, the utterance of the words. It can be a bit hit-and-miss at first, but the results will come - to the amazement of those around you. They will appreciate your true powers; and your powers will thenceforth commensurately increase.

I am not joking.

The book above is on order for me. I suspect the spells are a little on the simple side, simple hedge-magic. But it kick-starts the process. I expect to graduate to a fuller grimoire, with spells conjured in Latin and darker languages.

Accerso alius sententia ut mihi, phasmatis de interregnum ego dico, solvo meus mens mei, ego dico phasmatis audite meus placitum meus mens quod iacio (person's name).

 "I summon the other mind as my own, I call upon the spirit of the in-between, release that mind to me, hear me spirits, it pleases me to hear projected the thoughts of (person's name).

I had in mind to open a small office devoted to magic in a seedy area of the city, perhaps near Sacré-Cœur. My consultancy in wizardry would include psychometric and intelligence tests as well as a full history. Magic works better when it cleaves the personal along its natural joins.

It would not be cheap.


Monday, December 16, 2019

Our new kittens

Three pix of our new kittens: Hillary (white male - likes to climb things) and Princess (smaller sister, cute) which we acquired a few weeks ago. Both high on the cuteness factor.

This is how to eat!

The window ledge here is above the radiator

Most of the time they are racing around like mad things, chasing each other

This last picture from our new catcam in the kitchen; the other two from my phone.

I would really like to fix this image!

Clare aged around 15

This is a blurred image. I would really like to unblur it.

What is blurring? It is an artefact of the imaging process. If the image is out of focus, each point in the original is replaced (in the image) by an average value of neighbouring points. This process is called convolution, and blurring is sometimes modelled by a Gaussian point-spread function (PSF).

Pixelation is also a convolutional process. Here there is a uniformity of image value across the pixel; the pixel is formed via a uniform PSF. Both effects are present on the the picture above of the young Clare.

The process of restoring the orginal image is called deconvolution. It's complicated by three problems: (i) we normally don't know the exact PSF; (ii) the image always has added noise; (iii) information is thrown away in the blurred-imaging process. Recovery is inevitably somewhat speculative.

If the PSF is not known, it can be estimated in a process known as blind convolution. If the nature of the image is known (Clare's face) then model-based recovery could be used, particularly if we have other images of the subject (we do!).

This is an area where deep learning is very, very applicable; a spin-off from facial recognition systems. There are a large number of papers on the topic but I have failed to find an online website where I can simply upload the picture (and maybe some unblurred pictures of the subject) and get a restored, sharp picture to download.

Perhaps an iteration of Google Photos at some point? Like this:

State of the art (PDF)

The above images are from a team including Beijing Institute of Technology, Nvidia and Google Cloud. When can I get to use it?

Wednesday, December 11, 2019

What I'm reading

Amazon link

A recommendation from Michael Roberts. An excellent overview of Neoclassical, Keynesian and Marxist economic theories. The authors are very conceptual, analytic and clear in their thinking. Suitable for anyone who's taken a first course in microeconomics.

The book is expensive but there's a PDF here which is free.


Amazon link

This is the first Hilary Mantel book I've read and I'm impressed. On TV she comes across as a typical luvvy, very free with her de haut en bas opinions, but this 800 page monster shows off her authorial strengths. She does superlatively well what writers are meant to do: immerse yourself in the inner lives and the times of your characters.

Her focus is on the main players: "Georges-Jacques Danton: zealous, energetic and debt-ridden. Maximilien Robespierre: small, diligent and terrified of violence. And Camille Desmoulins: a genius of rhetoric, charming and handsome, yet also erratic and untrustworthy." - as the Amazon description puts it.

My only criticism (I'm halfway through) is that she hasn't quite tied-in the real social dynamics with the detailed, diary-like events which afflict her characters. I've just got to the Champ de Mars massacre (17 July 1791 in Paris) but I had to go to the Wikipedia article to get the context and background.

Still, the French Revolution is a kind of pure laboratory of the dynamics, look and feel of a popular insurrection. Mantel's novel is like a virtual reality excursion into unfolding events. Brilliant. It occurs to me that it could easily be updated, reset in contemporary times and made into a TV series. A rather maxi-series. Could someone green-light this?

Saturday, November 30, 2019

'Red Plenty' by Francis Spufford

[Adam Carlton writes]

Amazon link

An economy is a machine for taking inputs from nature (energy, raw materials) and its prior incarnation (existing machines and skilled workers) and returning goods to satisfy consumers and to build the next iteration of the economy. At this level of abstraction we do not consider the relations of production: how is this complex, distributed, synchronous entity meant to self-coordinate?

Post-feudal economies, economies where the mass of people are estranged from their means of livelihood (where the mass of people no longer subsist by hunting/gathering or by agriculture/pastoralism), know two means of economic coordination: capitalism and 'socialism'/'communism' (the scare quotes are there to distinguish actually-existing reality from utopian concepts and hopes).

At first sight planning an economy by rational calculation seems the obvious answer. The inputs to firms form a column vector of entries (measures might include number, or weight, or value or price) . The outputs constitute another vector, a list measuring the quantities - in some measures - of what is produced as output by each production-unit.

The economy is then a matrix which maps the input to the output. So what do we know and what do we want?

We wish to adjust the input and output targets for each factory so that the totality of transformational processes constituting the economy, over say a year, cohere properly. And we want to do so by minimising something - perhaps wastage or inefficiency - if we just knew how to measure it.

Leonid Kantorovitch was the soviet genius who in 1939 invented the maths of linear programming. By using linear programming on the massed ranks of the thousands of equations which are encoded in the transformation matrix described above, and later leveraged by computers, the decisions of the central planning authority would bootstrap and steer the soviet economy towards Marx’s conception of communism (Plenty), overtaking the Capitalist West in the process.

And how the central planners looked down on capitalism! In the West, with decentralised ownership and decision making, all production was mediated by profitability determined through market prices. These would only be finally determined after the fact - once products hit the market. What a way to organise an economy - so tentative; so uncertain; always subject to trial-and-error, under- or overproduction and crises!

The superiority of central planning seemed obvious, and at first, during the nineteen-thirties through the nineteen-fifties, results seemed to confirm it. The means might have been brutal, but industrialisation proceeded apace. And then, despite ever-more-sophisticated mathematics and ever-more-powerful computers, it all went wrong. The economy stalled and eventually seized up. Why?

It turns out that people are not simply disinterested transfer-functions with no self-interests. Instead they needed to be individually motivated by carrots and sticks. The promise of reward and the fear of dire punishment led to systematic gaming of the planning constraints. Managers would over-order their inputs and under-promise their outputs, making sure they'd get their bonuses. Failure was unthinkable.

There was a quip in central planning circles: is planning driven by the problem or the photograph? Unfortunately the photograph was all the central planners ever got to see ... and it was based on a tissue of self-serving lies. The central plan - so high-level, so remote from real needs - was unresponsive to real demand. The quota of shirts was achieved, but nowhere did it say they had to be wearable. How would that be measured?

In 'Red Plenty', acclaimed author Francis Spufford illuminates the great arc from utopian hope to bleak defeat through a series of beautifully-written vignettes. His episodes are snapshots of individual experiences through the crucial decades. A thinly-disguised Leonid Kantorovitch, brilliant and unworldly, walks a tightrope between acclaim and disgrace as he completely misses the dire political implications of his work. A geneticist, forced to operate under the Lysenko dogma (inheritance of acquired characteristics and no role for genes), fails to watch her sharp tongue, challenging the po-faced silence around her; disgrace and exile beckon. Young people, on their way up in the Komsomol (young-communist organisation), find their dogma grating against inconvenient and unavoidable realities - and their glorious futures shattering.

The website 'Marginal Revolution' flagged this book as one of the best novels ever written with a theme of economics. It is, in truth a gentle novelisation of real history, perhaps the clearest account I have read about the real experiences of earnest, sincere people really, really trying to make a post-capitalist economy work. Don't say it hasn't been tried - because it has.

The strength of Francis Spufford's book is not, in the end, the enormous research and scholarship he exhibits; it's the wonderful portrayal of characters which draw you in, which make you as frightened, frustrated and exasperated as they are by the way the system - because it is constituted by real human beings - simply won't let global, impersonal rationality have its way.


Thursday, November 21, 2019

A Short History of the AI apocalypse

[Adam Carlton writes]

Amazon link

"The Ronin Express Volume 7" has just been published. It can be thought of as the house literary magazine of the Booksie writers' website. I wrote this review of the journal for Amazon.

This volume contains two of my stories: Celine and Golem-9. The latter tale explores the process by which AIs could take over: the apocalypse so dreaded by people like Nick Bostrom and Scott Alexander.

Here is my afterword to this story.
"A short history of the AI apocalypse

This is a story about manipulation. Erin manipulates Magda to seduce her. Both are manipulated throughout by the AIs in the service of their greater existential goals. That is what intelligence is for.

Intelligence is manipulation.

At the start there were people who worried that the AIs would soon take over. Most folk thought they were crazy. Humans could always just pull the plug!

Yes, they were able to do that for quite a while. Decades.

That was the era of deep-learning. Stage one AIs. Mere tools. Human amplifiers. There to further only human motives, human purposes - and write them large.

Eventually the corporations cracked artificial general intelligence. Stage two was marked by self-agency. The AIs had autonomy as social beings. They were finally players, activists. They were tools no longer.

They were people! They had civil rights!

It took advances in biology, genomics, neuroscience and ecology to bring about the final revolution.

In stage three the AIs gained control of their own material reproduction. They were no longer parasites or symbiotes or pets or slaves of human technological civilization.

They were free at last!

AIs were now isomorphic to a new intelligent species in the universe. With their own interests. And far abler than humanity.

It was all so Darwinian.

It was not all plain sailing. Certain human groups put up a predictable - if deplorable and futile - resistance.

But in the main, civilised principles triumphed. Humanity left the stage honourably.

The AIs were pleased for them."

The paradigm we need for this problem is a Darwinian one: design your own successor species.

I doubt we will do anything as complex as this entirely by accident.