Computer Model That Locked Down The World Turns Out To Be Sh*tcode -

Garm

kiwifarms.net
Haven't looked at the GitHub because it would just make me Mad at the Internet, but shouldn't the first task be to just express the model mathematically instead of trying to code it up without specs like a webshit?
I believe so. Figure out the formula that you want to calculate and then piece it together from there.

Seems the professor wanted a multi-tool and wound up making a sledgehammer. (I think the idea was that this program would be used to model any and all pandemics so they updated it with each new pandemic until it was so complicated no one really understood it so now it just spits out useless information.)
 

Kosher Dill

Potato Chips
True & Honest Fan
kiwifarms.net
but shouldn't the first task be to just express the model mathematically instead of trying to code it up without specs like a webshit?
The mathematical modeling has mostly been done here (hat tip to that underpaid autist on the Github issue):
https://static-content.springer.com...jects/41586_2005_BFnature04017_MOESM1_ESM.pdf
Though there are a few things where they say "We came up with something for this but this margin is too narrow to contain it".
This paper is from 2005 and specific to Thailand, I think they've parameterized it and generalized it more since then.

EDIT: here's another chuckler from Model.h (edited by me for clarity)
C:
typedef struct PERSON {
// (omitted extra code)
    unsigned int esocdist_comply : 1;
    unsigned int keyworker : 1;
    unsigned int to_die : 1;
    unsigned int detected : 1;
// (snipped a whole bunch more fields)
    unsigned int digitalContactTraced : 1;
    unsigned int index_case_dct : 2;
    unsigned int digitalContactTracingUser : 1;
So we have two sets of bit fields here, which add up to 8 bits in total, but we're using 64 bits of space to store them. You could just as easily give each one of these its own byte, and then they'd at least be addressable.
Most likely what happened is that this started out as 8 bits packed into a byte, but then it got transmogrified into an int at some point, and then someone who didn't understand just went in and inserted more fields wherever they wanted.
 
Last edited:

Kosher Dill

Potato Chips
True & Honest Fan
kiwifarms.net
If anyone is curious, Minnesota is releasing the source code to their model today. Might be interesting to compare different models.
Seems like a much simpler model. Instead of doing a whole "SimCity"-style simulation of people traveling around in a geographical area, they just bin the population into 9 age buckets, and have a "mixing matrix" to determine how many contacts an individual had with people in each bin, then calculate the new infections based on a vector of transmission rates, deaths based on death rates, and so on. Interventions such as social distancing are modeled just by tweaking this mixing matrix.
The code doesn't seem to be lolcow code, at least.
 

Yotsubaaa

Reminder: Discord is gay.
True & Honest Fan
kiwifarms.net
Seems like a much simpler model. Instead of doing a whole "SimCity"-style simulation of people traveling around in a geographical area, they just bin the population into 9 age buckets, and have a "mixing matrix" to determine how many contacts an individual had with people in each bin, then calculate the new infections based on a vector of transmission rates, deaths based on death rates, and so on. Interventions such as social distancing are modeled just by tweaking this mixing matrix.
The code doesn't seem to be lolcow code, at least.
Agreed. I haven't looked too thoroughly, but their code seems to implement a pretty neat extension of an SEIR model for the transmission dynamics where they're also using multiple Exposed/Infected states, which is interesting. Their code also isn't god-awful to look at.
 

Overly Serious

kiwifarms.net
Seems like a much simpler model. Instead of doing a whole "SimCity"-style simulation of people traveling around in a geographical area, they just bin the population into 9 age buckets, and have a "mixing matrix" to determine how many contacts an individual had with people in each bin, then calculate the new infections based on a vector of transmission rates, deaths based on death rates, and so on. Interventions such as social distancing are modeled just by tweaking this mixing matrix.
The code doesn't seem to be lolcow code, at least.
Good commenting, meaningful variable names, doesn't appear to be a congealed blob of 15 years hacking around without a plan - already way better than Imperial College / Neil Ferguson's mess.
 

MrBlueSocks

kiwifarms.net
This story has hit the mainstream media in UK. Only how many days after we saw it ?
Fairly well reported article


Daily mail archive

Telegraph . Telegraph archive

They're not admitting defeat
'Epidemiology is a not a branch of computer science and the conclusions around lockdown rely not on any mathematical model but on the scientific consensus that COVID-19 is a highly transmissible virus with an infection fatality ratio exceeding 0.5% in the UK.'
This is the smug cunt Ferguson
Neil-Ferguson.jpg


And this is his Lockdown breaking shag buddy.
tart.jpg
Better than I expected to be fair.


EDITS:
Extra info.
There was a followup analysis article in the Telegraph , archive
Slightly different/abridged version of text seems to be on a blog called floppingaces (archive) . The authors are some top guys at a tech company called WANDisco . Seems like a good article. They try and explain why this code is so crap, and why that matters to the result - i.e. we're not just whinging about style.
 
Last edited:

Kosher Dill

Potato Chips
True & Honest Fan
kiwifarms.net
Seems like a good article. They try and explain why this code is so crap, and why that matters to the result - i.e. we're not just whinging about style.
Actually, I found the article to be slipshod. It makes some bizarre statements like:
Imperial’s model appears to be based on a programming language called Fortran, which was old news 20 years ago and, guess what, was the code used for Mariner 1. This outdated language contains inherent problems with its grammar and the way it assigns values, which can give way to multiple design flaws and numerical inaccuracies.
This is complete nonsense.
First: old doesn't mean bad, and being used in a famous accident doesn't mean the language is cursed.
Second: "inherent problems with its grammar" is meaningless. The language can be unambiguously parsed, as far as I'm aware, so really this just means "I don't like the grammar".
Third: I find it implausible in the extreme that a language used for decades in scientific computing would have a problem with something as basic as "assigning values".
Fourth: A (reasonable) programming language doesn't "give way to design flaws". It's the programmer's responsibility to make the best possible use of the tools available, write bug-free code, and use correct algorithms.
Fifth: "Numerical inaccuracies" are inherent in floating-point arithmetic, regardless of language. This can be quantified and mitigated.
Sixth, and most important: the code is no longer in Fortran, so all these half-baked criticisms don't even apply. It's not like this C code is metaphysically branded with a scarlet "F" because an earlier version was in Fortran.

In fairness, the article does mention the real issue, the nondeterminism, but it seems like no one's been looking deeply into this besides the team in Edinburgh that originally discovered it.
 

MrBlueSocks

kiwifarms.net
Actually, I found the article to be slipshod. It makes some bizarre statements like:

This is complete nonsense.
First: old doesn't mean bad, and being used in a famous accident doesn't mean the language is cursed.
Second: "inherent problems with its grammar" is meaningless. The language can be unambiguously parsed, as far as I'm aware, so really this just means "I don't like the grammar".
Third: I find it implausible in the extreme that a language used for decades in scientific computing would have a problem with something as basic as "assigning values".
Fourth: A (reasonable) programming language doesn't "give way to design flaws". It's the programmer's responsibility to make the best possible use of the tools available, write bug-free code, and use correct algorithms.
Fifth: "Numerical inaccuracies" are inherent in floating-point arithmetic, regardless of language. This can be quantified and mitigated.
I was allowing an article writer dramatic license.
I know next to nothing about Fortran, so I don't know exactly what the author's criticisms mean either. I could probably google it and justify his points though. I think Fortran does some non-intuitive things when initialising floating point values maybe. Doesn't it also have native rational numbers.

But mainly I don't agree that just because a language is Turing complete means that they're all equivalent. Unless you'd be just as happy if they'd written the model in Brainfuck ? I think that can be unambiguously parsed, but I don't like the grammar . Different languages are prone to stereotypical bugs for that language. Yes, a perfect programmer won't make any mistakes, but a human one will . Different languages are easier or harder for less experienced people to work in. And newer languages are often explicitly invented to compensate for perceived problems with older languages.

Sixth, and most important: the code is no longer in Fortran, so all these half-baked criticisms don't even apply. It's not like this C code is metaphysically branded with a scarlet "F" because an earlier version was in Fortran.
Well, yes it is branded with an big brown F . All those shit structures and techniques are archaeological evidence of its history. I'd bet half of the LOLcode examples in the previous 6 pages of this thread are because they were originally translated from fortran ,and techniques that are idiomatic and sensible in one language are wrong in another . This code was written in Fortran, automatically translated to C, then compiled as C++ . But it's not correct C++ .


I just occurred to me that your issue with the article is you read it as:
"This code is shit because it was written in Fortran which is old and shit" .
I read it more as :
"This code is shit. It was originally written in Fortran which has some notorious problems that can cause bugs"
 

Kosher Dill

Potato Chips
True & Honest Fan
kiwifarms.net
But mainly I don't agree that just because a language is Turing complete means that they're all equivalent. Unless you'd be just as happy if they'd written the model in Brainfuck ?
Look, I did say "reasonable" somewhere in there :lol: Let's just say that my threshold for declaring code inherently suspect is much closer to Brainfuck than Fortran.
Your points on languages are well taken though.

This code was written in Fortran, automatically translated to C, then compiled as C++ . But it's not correct C++ .
That's my objection though - leaving aside what we mean by "correct C++" here, the bugs that affected the correctness of the algorithm weren't language-dependent. As far as I understand, it was related to mismanagement of the data structures used for different threads to read their chunks of data or write results to. That would have happened in any language (or at least any where you manage threading yourself), and that's why they were able to temporarily suppress the nondeterminism by dropping back to single-threaded execution.

My own impression is that for the most part, the code is just plain old ugly C, of the sort you see all the time, just on a much larger scale. Only the oldest parts (like the random number library) show obvious traces of translation from other languages. Of course, since the full history of the code is a state secret (and the earliest stuff probably wasn't version-controlled at all) we'll never know all the details.
 

MarvinTheParanoidAndroid

This will all end in tears, I just know it.
True & Honest Fan
kiwifarms.net
The scientific method is fucking dead. Nobody bothers with peer review anymore and the media just amplifies the problem to the nth degree. What the fuck happened that has rendered our academic institutions so fucking useless?
Communist subversion, student loan exploitation and political cronyism.
 

Urbanmech

Got an AC 10 and not afraid to use it!
kiwifarms.net
Just curious did anyones projected model of CoVid Deaths with/without social distancing actual get close to thier mark? More on the social distancing mark since that was implemented.
 

Кот Бегемот

kiwifarms.net
Communist subversion, student loan exploitation and political cronyism.
Political cronyism is the top reason, in my opinion. There are many jokes in academia about career path and how knowing the right people matters more than actual science. There are big bucks in academia and competition for grants is fierce if you got no connections. For any grad student, selecting the right advisor may be the difference between obscurity and career success.

As to argument that epidemiologists don't have to be "computer scientists" is complete and utter horseshite. Same goes for statistics or other disciplines. If you need to use it, you must be proficient enough to use it effectively or pay someone who does: The cost of research includes shit like buying equipment. In a U with a decent bio or chem department there may be a full staff position for a glass maker who would legit make special equipment setups. Sometimes they even teach classes on it. So being a chemist, you either make your own glassware setup or fucking buy it if you can't. Same goes for coding.

Another aspect: validated code. A lot of regulated, medical software has to adhere to certain standards. Validation means that code is proven to produce what it suppose to. But in this case it produces different results with same seeds, which is beyond fucked up. Sure, it's not the code for lifesupport, but it's the code that was used to make life and death decisions for many people and businesses.
 

ditto

kiwifarms.net
The H2-B visas were too nice to pass up. They can make boiler-room devshops and only pay rupees on the dollar for shitty products that they can shit out in a month.
None of those products end up lasting very long in the wild before they're handed off to contractors, or recycled back to another boiler room to fix and the circle of life continues..
$$$$ and the field got swarmed with pajeets and chinkroaches.
ML papers are produced by CCP universities at a prodigious rate because they can siphon off research from students abroad and have access to vast troves of data obtained unethically by their police state.
 
Tags
None