Computer Model That Locked Down The World Turns Out To Be Shitcode

Submitted by Mark E. Jeftovic, of Axis of Easy

It was an Imperial College computer model that forecasted 500K deaths in the UK (and 2.5 million in the US) should policymakers pursue a “herd immunity” approach (a la Sweden), that influenced them to reverse course and go full lockdown instead. The model was produced by a team headed by Neil Ferguson, (who recently resigned his post advising the UK government when it surfaced that he was himself violating lockdown directives by breaking self-isolation for dalliances with a married woman).

The source code behind the model was to be made available to the public, and after numerous delays and excuses in doing so, has finally been posted to GitHub

code review has been undertaken by an anonymous ex-Google software engineer here, who tells us the GitHub repository code has been heavily massaged by Microsoft engineers, and others, in an effort to whip the code into shape to safely expose it to the pubic. Alas, they seem to have failed and numerous flaws and bugs from the original software persist in the released version. Requests for the unedited version of the original code behind the model have gone unanswered.

The most worrisome outcome of the review is that the code produces “non-deterministic outputs”

Non-deterministic outputs. Due to bugs, the code can produce very different results given identical inputs. They routinely act as if this is unimportant.

This problem makes the code unusable for scientific purposes, given that a key part of the scientific method is the ability to replicate results. Without replication, the findings might not be real at all – as the field of psychology has been finding out to its cost. Even if their original code was released, it’s apparent that the same numbers as in Report 9 might not come out of it.

The documentation proffers the rationalization that iterations of the model should be run and then differing results averaged together to produce a resultant model. However, any decent piece of software, especially one that is creating a model, should produce the same result if it is fed the same initial data, or “seed”. This code doesn’t.

“The documentation says:

The model is stochastic. Multiple runs with different seeds should be undertaken to see average behaviour.

“Stochastic” is just a scientific-sounding word for “random”. That’s not a problem if the randomness is intentional pseudo-randomness, i.e. the randomness is derived from a starting “seed” which is iterated to produce the random numbers. Such randomness is often used in Monte Carlo techniques. It’s safe because the seed can be recorded and the same (pseudo-)random numbers produced from it in future. Any kid who’s played Minecraft is familiar with pseudo-randomness because Minecraft gives you the seeds it uses to generate the random worlds, so by sharing seeds you can share worlds.

Clearly, the documentation wants us to think that, given a starting seed, the model will always produce the same results.

Investigation reveals the truth: the code produces critically different results, even for identical starting seeds and parameters.

In one instance, a team at the Edinburgh University attempted to modify the code so that they could store the data in tables that would make it more efficient to load and run. Performance issues aside, simply moving or optimizing where the input data comes from should have no effect on the output of processing, given the same input data. What the Edinburgh team found however, was this optimization produced a variation in the output, “the resulting predictions varied by around 80,000 deaths after 80 days” which is nearly 3X the total number of UK deaths to date.

Edinburgh reported the bug to Imperial, who dismissed it as “a small non-determinism” and told them the problem goes away if you run the code on a single CPU (which the reviewer notes “is as far away from supercomputing as one can get”).

Alas, the Edinburgh team found that software still produced different results if it was run on a single CPU. It shouldn’t, provided it is coded properly. Whether the software is run on a single CPU or multi-threaded, the only difference should be the speed at which the output is produced. Given the same input conditions, the outputs should be the same. It isn’t, and Imperial knew this.

Nonetheless, that’s how Imperial use the code: they know it breaks when they try to run it faster. It’s clear from reading the code that in 2014 Imperial tried to make the code use multiple CPUs to speed it up, but never made it work reliably. This sort of programming is known to be difficult and usually requires senior, experienced engineers to get good results. Results that randomly change from run to run are a common consequence of thread-safety bugs. More colloquially, these are known as “Heisenbugs“.

Another team even found that the output varied depending on what type of computer it was run on.

In issue #30, someone reports that the model produces different outputs depending on what kind of computer it’s run on (regardless of the number of CPUs). Again, the explanation is that although this new problem “will just add to the issues” …  “This isn’t a problem running the model in full as it is stochastic anyway”.

Subscribe
Notify of
guest
15 Comments
RiNS
RiNS
May 8, 2020 11:09 am

comment image

ICE-9
ICE-9
May 8, 2020 11:13 am

Old Monte Carlo simulation code – usually written for 32-bit single processors – has a a terrible time handling multi-threading. And if Excel is used as the calculation engine, it adds its own problems with multi-threading as well (4 CPUs tops with Excel 2013). Code like this, when run on a multi-processor machine has trouble “remembering” which trial outcome goes with which input set, and it jumbles up the inputs and outputs in the outcome arrays. Even commercial stochastic modelling software like Crystal Ball and @Risk screws up – one has to disable multi-threading in the Excel options.

Seems like another good example of Intellectual Idiots. But as the great statistician George Box once said, “All models are wrong. But some models are useful.” Useful for whom is the real question.

Double-Ought Nothing (EC)
Double-Ought Nothing (EC)
  ICE-9
May 8, 2020 12:22 pm

“All models are wrong. But some models are useful.”

Can we just fucking talk without going all conspiracy theory? It’s been so worked over that “it’s the Jews” is almost one of the first principles here so let’s skip all the allusions and insinuations. That phrase is a mental default like the term “it’s politics” was in the military – an easy explanation for all explainable situations.

I like that line, it says that there is no absolute truth, especially in computer models. I recall Doc Pangloss illustrating an idea – he said, if you break down the trajectory of an arrow by time, down to nano-seconds and more, then you can show the arrow never lands.

Stephen Hawkin explained that conundrum with the use of a black hole. He said that if a man could reach the surface of a black hole, a star so dense and gravity so strong than no light can escape and time stops, he would forever be about to step onto the surface.

ICE-9
ICE-9
  Double-Ought Nothing (EC)
May 8, 2020 1:31 pm

How did a technical comment about Monte Carlo simulation software morph into Jewish conspiracy? Dude, lay off the drugs. George Box was like the Einstein of statistics, and he came from industry, not government or academia.

DinCO
DinCO
  ICE-9
May 8, 2020 8:24 pm

Yup, Box and Hunter. Statistical analysis – used a lot for analysis of DOE’s (design of experiments) in semiconductor manufacturing. Spend a career doing this stuff, retire and spend time with “others” (outside the industry) and THEN realize that not many look at the world as one big experiment waiting to be analyzed.

Trapped in Portlandia
Trapped in Portlandia
May 8, 2020 11:55 am

As an engineer who used a slide rule in college, I never trust big computer models. Too much goes on into the black box that professionals don’t know or understand. Then they trust and publish the results as gospel even though they have no idea of the how or why of the results. As Ice-9 said, these are Intellectual Idiots.

ICE-9
ICE-9
  Trapped in Portlandia
May 8, 2020 12:17 pm

In your day, if I recall they had technicians on the payroll whose job it was was to check and verify the calculations submitted by engineers.

In 27 year career in upstream oil & gas exploration, development, and production I have rarely seen initial conclusions verified by a second set of calculations. We’re talking billions in investment capex. You would be amazed at the magnitude of junior level type mistakes that make it through the “Value Assurance Review” process all the way through to FID approval. In fact, the entire shale gas / oil collapse is a result of this sort of lack of oversight and a push to meet bonus KPIs with bogus assumptions forced on young engineers and a big cohort of H-1B indentured servants who will cook any set of numbers for a green card.

Double-Ought Nothing (EC)
Double-Ought Nothing (EC)
  ICE-9
May 8, 2020 1:26 pm

Not that I had any problem with your comment, Icee, it was thought provoking.

Anymouse
Anymouse
  ICE-9
May 8, 2020 1:40 pm

Point well taken:
Fact: you need a state license to cut hair
Fact: there are no licenses required to write code.

(I would be in favor of licensing coders, same way they license Engineers who build bridges)

the only requirement is it has to work (and even then, it might work only once, and then it craps out, so is it a bug? or a feature?)

I have to test this shit for a living, all sorts of crap is passed off as “a solution”, and a lot of it is copy/pasted from the web, or Git Hub.

If the Simulation code was posted on Git-hub, all the IP has been replaced with black boxes of magic random number generators.

Tell me, who would post their Intellectual Property to Git-Hub, for the world to see?

Anonymous
Anonymous
  Anymouse
May 8, 2020 4:01 pm

In business, to ‘code’ you do have take alot of training classes, etc. and pass exams (generally on line) over the material before they will let you near it. In academia & government? Not sure.

I would certainly not be in favor of governmental licenses for coding, or anything else actually.

Anonymous
Anonymous
  Trapped in Portlandia
May 8, 2020 3:58 pm

But, the purveyors of those models believe in them like gospel. They can be very convincing to people that have no experience with them.

Gerold
Gerold
May 8, 2020 2:22 pm

I once worked with our IT Dept. as a key user during a conversion/migration to a new system/platform. It was an eye-opening experience.
I’ll never forget a senior analyst telling me that transferring data from one ERP module to another during regular operations was “like throwing a bucket of data over the wall, and most of it gets there.” He added, “most of the time.”
That’s why I don’t trust computers.

TN Patriot
TN Patriot
  Gerold
May 9, 2020 4:01 pm

I had the same experience and the “fairly simple” weekend data transfer did not get finalized until late Wednesday night. We had to run our business without computers for 3 days, we were three days late getting our training completed while we tried to enter the 3 days’ transactions into the new system and keep our business going.

DinCO
DinCO
May 8, 2020 7:59 pm

In this morning’s blog, Martin Armstrong did a review of this software and also concluded it is garbage. How did this crap get pulled on the world without some review ?

I have Reviewed Ferguson’s Code – It’s a Joke

TN Patriot
TN Patriot
  DinCO
May 9, 2020 4:03 pm

Government was the customer and they do not bother with accuracy, only which friend/donor is selling the product.