liveBook · Manning

Log-ratio

As explained in Build AI Drug Discovery Pipelines

A log-likelihood ratio is the logarithm of the ratio between two likelihoods, used here to compare the plausibility of mutated and reference protein sequences.

A log-likelihood ratio (LLR) compares how plausible a protein model finds a mutation with the original, or wild-type, amino acid. It is the logarithm of the mutant probability divided by the wild-type probability, given the surrounding sequence. section 12.3.5

To score a mutation, mask its position in the protein sequence and ask a pretrained model for the probabilities of both amino acids. Subtract the log probability of the wild type from that of the mutant. A positive score means the model favors the mutant; a negative score means it favors the wild type. section 12.3.5

LLR = log P(m | context) - log P(w | context)

The score compares the mutant m and wild type w in the same sequence context. section 12.3.5

Scoring a substitution

To assess a change from alanine to cysteine at position 42, mask that position and compare the model’s predicted probabilities for cysteine and alanine. The resulting score can help prioritize the variant for experimental testing. section 12.3.5

Scoring many substitutions produces a mutation landscape that can reveal positions where changes appear more or less tolerable. LLRs often correlate with experimental measurements of mutation effects, but model plausibility is not itself an experimental result. section 12.3.5 section 12.4

Figure 12.12 A zero-shot mutation landscape predicted by ESM-2. The x-axis represents the residue position, and the y-axis represents the 20 possible AA mutations. The color indicates the Log-Likelihood Ratio (LLR): brown regions indicate deleterious mutations that the model views as evolutionarily unlikely, while white/blue regions indicate neutral or beneficial mutations.

This landscape displays predicted scores across positions and possible amino acid substitutions. section 12.3.5

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Explains masked-position probability comparison and its interpretation, without implementing the scoring procedure.
Examples
Uses an alanine-to-cysteine substitution at position 42 and a predicted mutation landscape.
What you can do after
Evaluate mutation plausibility and prioritize variants for experimental testing.
How it connects
Connects mutation scoring to zero-shot inference, mutation landscapes, and pseudo-perplexity.

Also explained in

Compare how 2 books explain log-ratio →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.