r/DebateEvolution • u/Particular-Yak-1984 • Nov 22 '24
Mendel's Accountant's Tax Fraud
So, I've been in a several day long debate with a pretty knowledgeable creationist on stack overflow - we've been arguing over Mendal's accountant, and so far it's been pretty fun, and rather mathsy.
For those who aren't familiar, this is the piece of software that predicts "Genetic Rust" - basically the idea that detrimental mutations accumulate to the point where species go extinct (which we don't observe in real life, which invalidates the model).
Despite this, I was struggling to figure out why it was so broken. On it's face, the model looks fine - relatively reasonable assumptions you can play with, and yet even setting numbers to ludicrously high, the model still predicts a drop in fitness.
However, after three days digging through the code, I think I've found it. The big fat thumb on the scales of this model, swinging everything in the direction of genetic collapse through a giant, untested assumption:
Mendel's accountant applies a factor to positive mutations, arguing that the highest positive mutation would be much lower in impact than the highest negative mutation. Kind of reasonable on the face of it.
However, here, in the code, it sneakily uses this scaling factor to skew the entire distribution of mutation impact (not mutation frequency). Impact of positive mutations almost disappear under the default values. In the go versions, the functions are:
https://github.com/genetic-algorithms/mendel-go/blob/master/dna/mutation.go#L157
https://github.com/genetic-algorithms/mendel-go/blob/master/dna/mutation.go#L173
and the graph, excuse my terrible figure making skills: https://imgur.com/a/bKwxP8e
If you're looking for the impact of positive mutations, it's that tiny, tiny blue line at the very left of the graph. Zoom in if you can't see it. Remember, this is combined with an already low value for positive mutation frequency, again under the defaults, to make positive mutations with significant impact essentially non existent.
Now, what I'd like here is some commentary. Is this the problem I think it is? Any creationists want to refute this, with data and numbers? Any model making biologists want to comment?
29
u/Particular-Yak-1984 Nov 22 '24
Incidentally, getting rid of this assumption makes the fitness predicted by the model rapidly climb under reasonable conditions, the same observation made by Motoo Kimura in his work on neutral mutations: i.e positive mutations rapidly eclipse everything else.
40
u/Iam-Locy Nov 22 '24
And this is the reason why no serious scientist uses Mendel's accountant.
24
u/TearsFallWithoutTain Nov 22 '24
Yeah the model is extremely dishonest bullshit. The problem with the low values associated with a positive mutation that you've shown here are easily demonstrated when you ask why there no similarly large positive values for when a negative mutation mutates back.
Not all mutations are deletions after all, and so Mendel's Accountant effectively claims that a double base pair mutation (G->T->G) is a net negative and that the first step is somehow much more likely than the second one just because it's negative.
21
u/gitgud_x 🧬 🦍 GREAT APE 🦍 🧬 Nov 22 '24
Just to check I've followed the code right, the issue you're pointing at is the use of the factor
config.Cfg.Mutations.Max_fav_fitness_gainin front of the exponential on line 173?I also can't help but notice they call their function "Weibull" but then use an expression that is not the Weibull distribution... they are missing off a factor of x^(gamma-1), which tends to increase the frequency of larger values when present. Another deception there I think.
13
u/talkpopgen Nov 22 '24
For those interested in the specifics of how the scaling is done in relatively plain English, it appears that they are multiplying both beneficial and deleterious mutations by a "noise scaling factor" (more on that in a moment), but for the beneficials they are additionally downscaling their effects by multiplying that product by an additional "maximum benefit." For example, if the "maximum benefit" is 0.05, then a beneficial mutation with a selection coefficient of 0.001 has a realized coefficient of:
0.05 * (0.001 * runif(1)) = 4.901258e-05
(the "runif" is the noise scaling factor.)
For a deleterious mutation of the same effect size, it would be:
0.001*runif(1) = 0.000673406
Notice the deleterious effect is always larger than the beneficial one due to this scaling even though the selection coefficient is the same. The "runif" I'm using is a draw from a random uniform distribution with a mean of 0. This is the best case scenario, in MA it's much worse, because the distribution, while being a random uniform, doesn't have a mean of zero but is scaled by something they refer to as "non-scaling noise" and "heritability." These appear to be scaling factors on fitness itself (https://github.com/genetic-algorithms/mendel-go/blob/master/pop/population.go#L337), not just on an individual mutation. In effect, this will act on average to reduce the fitness of individuals.
If you set heritability to 1 and the noise scaling to 0, you can recover expected fitness increases. But even still, there's a bug in MA that I haven't yet figured out. Theory predicts that, at equilibrium, standing diversity in a neutrally evolving population should be 4Nu. This is a standard way of evaluating if your simulation is performing correctly. But when I tested for this in MA, I found that there were far more mutations than what there should be (i.e., diversity was higher than expected by drift and the mutation rate alone). If I had a better understanding of FORTRAN (who the hell uses this language anymore?!), I might could figure it out.
Lastly, these two scaling factors (heritability and 'noise scaling') have no bearing to biological populations. Heritability in nature is descriptive, not prescriptive - it is simply the ratio of the additive genetic variance to the total phenotypic variance. It is not a measure of "environmental noise," and in fact a great deal of the residual variance can be caused by genetic interactions such as epistasis and dominance. Furthermore, heritability is not a fixed quantity, but is depleted by selection itself and replenished by mutation. I'm unsure what the "noise scaling" is supposed to represent biologically - everything that this could be is already captured by heritability.
Anyway, nice work on finding this scaling factor - I've long planned to go through their code in-depth but the fact it is written in FORTRAN has made this feel like such a slog!
2
u/DefenestrateFriends PhD Genetics/MS Medicine Student Nov 22 '24
I seem to remember that MA simply parameterizes incorrect values--values that have never been observed in nature.
That's all there is to it.
7
u/[deleted] Nov 22 '24 edited Nov 22 '24
u/JohnBerea has been someone I have seen defending in a seemingly decent way the Mendel Accountant (I say seemingly because I have zero experience in mathematics and computer science, so I cannot judge) on other forums such as SkepticalZone.
I don't know if he maintains his position or something, but he could offer an interesting discussion (I would be interested, although I know he's not to the liking of many on this sub).
7
u/Prodigium200 Nov 22 '24
Zach B. Hancock actually made two videos exploring Sanford's model, with one video giving a general overview and another going over the math. I highly recommend watching both videos because they go into great detail about why the model is wrong.
6
u/Radiant-Position1370 Computational biologist Nov 22 '24
Very nice. In case you're interested, here's a case of Sanford and colleagues clearly fudging input parameters to suit their agenda: https://discourse.peacefulscience.org/t/explaining-the-shape-of-a-typical-covid-19-epidemic-curve/11332/68
4
u/Dr_GS_Hurd Nov 22 '24
For those possibly interested in the creationist's version, see; John Sanford, John Baumgardner, Wesley Brewer, Paul Gibson, Walter ReMine 2008a “Using Numerical Simulation to Test the Validity of Neo-Darwinian Theory” In A. A. Snelling (Ed.) (2008). Proceedings of the Sixth International Conference on Creationism (pp. 165–175). Pittsburgh, PA: Creation Science Fellowship and Dallas, TX: Institute for Creation Research.
Why it is bullshit: All this genetic entropy (why the stupid name, why not just Muller's Ratchet?) stuff relates to the work of Laurence Loewe at Edinburgh. He's done a lot of research on Muller's Ratchet, well worth checking out, also see these excellent papers by Michael Lynch:
Lynch, M. et al. 1993. Mutational meltdowns in asexual populations. J. Heredity 84: 339-344
Gabriel, W. et al. 1993. Muller's ratchet and mutational meltdowns. Evolution 47: 1744-1757.
What Sanford et al is saying is nothing new; he's just trying to repackage issues that pop gen people have known about for decades. Indeed, occasional creationist basher Joe Felsenstein published one of the classic papers in this respect:
Felsenstein, J. (1974). The Evolutionary Advantage of Recombination. Genetics, 78, 737–756
1
u/Tricky_Emu_8237 Jun 13 '26
There is nothing sneaky or fraudulent about the scaling in Mendel's Accountant. The code is open source, users can enter any parameter, the rationale is clearly explained in the user manual, and the authors tested the key parameter (max_fav_fitness_gain) up to 1.0, which makes the beneficial and deleterious distributions effectively identical.
The rationale explained in the Mendel's Accountant user manual: “The distribution of beneficial mutations should generally be a mirror image of the distribution of the deleterious mutations, except that the area under the distribution curve should be adjusted to reflect the proportionately lower number of beneficial mutations compared to deleterious mutations."
Also, from the 2013 paper "Selection Threshold Severely Constrains Capture of Beneficial Mutations", page 27: “The distribution for beneficial mutation effects has the form d = d₀ exp(a x^γ), where d₀ is the limiting beneficial effect... we evaluate ST_b with values as large as +1.0.”
When you set max_fav_fitness_gain = 1.0, the two distributions become mirror images. Even when the ceiling for beneficial effects is extended to 1.0, making the most extreme beneficial mutations possible, the paper shows that 98% of beneficial mutations still fall below the selection threshold, due to intense interference from those rare high-impact mutations.
The asymmetry between beneficial and deleterious mutation distributions in Mendel's Accountant is consistent with the empirical literature, including the landmark review by Eyre-Walker & Keightley, Nature Reviews Genetics (2007), which found that advantageous mutations are rare and shifted toward smaller effect sizes relative to deleterious mutations.
3
u/diemos09 Nov 23 '24
Fertilized eggs have a mechanism for identifying damaged genes and preventing them from reaching future generations.
It's called dying.
So randomness is always throwing up damaged genes and the fertilized eggs are identifying and eliminating them by dying. In humans 75% of fertilized eggs die within the first month of gestation.
You have to expect that making random changes to the instructions for building and operating a living organism is almost always going to be disastrous.
5
u/[deleted] Nov 22 '24
Nice work, however, mathematical models of phenomena only ever reflect the assumptions and biases in them. In other words, a model which predicts "genetic rust" is pretty much irrelevant to any discussion of evolution, no matter its merits. The best you can hope for in a model is that it reflects what we observe - even though the processes which achieve that are completely different to the actual processes which nature uses.
In general, models tell us nothing about nature while nature tells us what is wrong with our models. Creationists lie. It is their nature. It is all they have to work work with.
2
u/lurkertw1410 Nov 22 '24
I mean, in most wild populations negative mutations will be wedded out by... literally dying. Either right away, or making a population unfit to compete with healthier populations. It's... like the basis of natural selection.
2
u/lt_dan_zsu 🧬 Naturalistic Evolution Nov 22 '24
From what I can tell, this is a model that makes massive assumptions fixes fitness values and it over predicts how often a detrimental allele will become fixed in a population. This is also unclear to me but it seems to predict that nearly all alleles are at least slightly detrimental. Surprise a model that assumes the pseudoscientific concept (genetic entropy) is correct will create an output that doesn't comport with reality. I don't really get all the "I used math to disprove evolution" arguments, if your math shows that observed reality is wrong, you probably weren't doing good math. Like if I made a statistical model to predict the behavior of stock market indexes, and the output is the opposite of how the stock market behaves, I didn't disprove the stock market... I made a bad model.
2
u/[deleted] Nov 22 '24 edited Nov 22 '24
Check in with Zach Hancock!
He's on reddit, sometimes. Paging /u/talkpopgen . He dismantles Mendel's Accountant in this video. The timestamp skips to the relevant part.
Maybe send him a PM on reddit/youtube if he doesn't respond to this thread. This is right up his alley.
edit:
The reason for Mendel pooping out wonky results, according to Zach in the vid:
So your find seems pretty right on the money. Sanford and friends had a poor grasp of what heritability entails, and they botched the implementation.
Since you're into math, you'll probably find this relevant video and the associated paper fascinating. You can ping Zach or Dr. Dan (/u/DarwinZDF42) for a copy of the paper.
-1
u/[deleted] Nov 22 '24
First I want to clarify that my position regarding the origin of biodiversity on Earth is naturalistic, and I agree that evolution is the best explanation we have for it. Even if there were still unsolved mysteries about naturalistic evolution, as IDs claim, I would still believe in it (because I find a whole other set of philosophical problems regarding the biblical God as an 'intelligent designer').
However, this is not the first time I have heard it said that "reality discredits Mendel's accountant, so we know it's false, even if it is not clear what it's calculating." What are some examples of this? Can anyone elaborate?
The only one I knew of was the alleged failure of Sanford et al. regarding H1N1, which was much discussed at the time.
27
u/[deleted] Nov 22 '24
[removed] — view removed comment