AI/ML Explained: AI for Science

Day 46 · 2026-07-03 · Level: Advanced · Frontier
For: engineers with coding experience, but not from an AI background

The past few days were all about "how AI works internally." Today, a different angle: how AI helps humans make genuinely new scientific discoveries—not writing code or answering questions, but folding proteins no experiment could resolve, finding materials no one imagined, handing mathematicians hints toward new theorems. The shared mechanism is a pattern any backend engineer knows: replace expensive "real verification" with cheap "model prediction," then use the prediction to steer your limited verification budget.

Protein Structure PredictionAlphaFold

structural biologyco-evolution signal
One-line analogy

A protein is a 1D amino-acid sequence that deterministically folds into a 3D shape—but that "sequence → shape" mapping has no closed-form solution humans can compute. Backend analogy: like receiving a serialized byte stream (with no schema) and having to reconstruct its in-memory object graph. Measuring structure experimentally (X-ray crystallography, cryo-EM) is like "running one months-long, six-figure full physical scan"; AlphaFold is like "a trained model predicting it in minutes."

What problem it solves + how it works

A protein's function is determined by its 3D shape (an enzyme's active pocket, an antibody's binding site). But measuring structure is painfully slow—about 100,000 solved in fifty years, versus hundreds of millions of known sequences. That's the sequence-structure gap. AlphaFold2 (Jumper et al. 2021) rests on two mechanisms:

(1) MSA (Multiple Sequence Alignment)—line up homologous versions of the same protein across species, treated as "distributed replicas left behind by evolution." The key insight: if two residues are adjacent in 3D (in contact), they tend to co-evolve—one mutates, the other mutates compensatorily to keep the structure stable. It's like two modules in a codebase that "always change together," hinting they're architecturally coupled. AlphaFold reads this co-evolution signal to infer which residues sit next to each other in space.

(2) Evoformer—an attention-based module that repeatedly exchanges information between a "sequence representation" and a "pairwise representation (who contacts whom)," then a structure module directly outputs every atom's 3D coordinates. AlphaFold3 (2024) extended this to protein-DNA-small-molecule complexes.

Core mechanism: from evolutionary signal to 3D structure

homologs (MSA)find co-varying sitescontact map 2D3D coords
↑ "two sites always change together" = they contact in space = a folding constraint
Code example
# Fold a sequence via the public ESMFold API on ESM Atlas (no GPU needed)
import requests

seq = "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEK"  # your sequence
r = requests.post(
    "https://api.esmatlas.com/foldSequence/v1/pdb/",
    data=seq, timeout=120,
)
with open("predicted.pdb", "w") as f:
    f.write(r.text)   # standard PDB file, drop it into PyMOL / py3Dmol

# The B-factor column at each ATOM line stores ESMFold's pLDDT confidence
# pLDDT > 90 = high confidence; < 50 = usually flexible/disordered—don't trust
print("Structure saved; filter by confidence before drawing conclusions")
Common pitfall + your use case
⚠️ Pitfall: treating AlphaFold's output as an "experimentally measured true structure." It gives a single static conformation prediction, with a per-residue pLDDT confidence—low-confidence regions (disordered proteins, mutation effects, post-binding conformational change) are often unreliable. It's a "high-quality hypothesis generator," not a wet-lab replacement.
🎯 Your scenario (spotting the AI-disruption pattern): AlphaFold's essence is turning a field from "expensive, slow experiments" into "cheap, fast predictions." That pattern itself is a decision ruler—scan any industry with it: wherever there's a step that's "expensive to verify once, but backed by massive historical data," that's a candidate for the next AI restructuring.
Takeaway + question
💡 AlphaFold isn't "simulating physics"—it's reading structure out of evolutionary statistics. The co-evolution signal is its real source of information.
🤔 Think: why does "evolution," a historical process unrelated to physics, become the strongest signal for predicting physical structure?

AI Materials DiscoveryGNoME · Materials Discovery

graph neural networkactive learning
One-line analogy

Searching a vast crystal combinatorial space for "stable new materials" is like searching a huge configuration space for a valid config. Judging whether a candidate is stable traditionally means running DFT (Density Functional Theory)—like "actually running an expensive integration test," hours to days of CPU per material. GNoME uses a GNN to model the crystal as a graph (atoms are nodes, bonds are edges) and directly predict energy—like a "static analyzer" instantly judging whether a config compiles, sparing most of the expensive verification.

What problem it solves + how it works

The bottleneck for new materials (batteries, superconductors, catalysts) is combinatorial explosion—which elements, which atomic arrangements yield an astronomical count you can't DFT one by one. GNoME (Merchant et al. 2023, Google DeepMind) isn't a one-shot predictor but an active learning loop:

The GNN first predicts stability over a huge candidate set → only the "most likely stable" small batch is sent to real DFT verification → the results (right or wrong) are fed back into the training set → the GNN gets sharper → predict the next batch. This loop is exactly the backend-familiar "cheap coarse filter + expensive precise verify + feedback refill" CI loop, isomorphic to RL's explore-exploit. The paper reports finding roughly 380,000 new stable crystal structures.

Active learning loop: spend costly verification only where it counts

GNN predicts stabilityfilter top candidatesDFT verify (costly)
↑___________________ refill training set, model improves ___________________|
Code example
# Query a material's DFT formation energy via Materials Project API
from mp_api.client import MPRester

with MPRester("YOUR_MP_API_KEY") as mpr:   # free key at materialsproject.org
    docs = mpr.materials.summary.search(
        formula="Li3PO4",                       # a solid electrolyte
        fields=["material_id", "formation_energy_per_atom",
                "energy_above_hull"],
    )
for d in docs:
    # energy_above_hull == 0 -> on the convex hull -> thermodynamically stable
    stable = "stable" if d.energy_above_hull < 1e-6 else "metastable/unstable"
    print(d.material_id, round(d.formation_energy_per_atom, 3), stable)
Common pitfall + your use case
⚠️ Pitfall: reading "380,000 predicted stable" as "380,000 usable new materials." Thermodynamically stable ≠ synthesizable ≠ practically useful. After GNoME's publication, independent work questioned the novelty and synthesizability of a portion of the candidates—prediction is only the top of the funnel; wet-lab synthesis is the real bottleneck.
🎯 Your scenario (super-individual workflow template): this "cheap model coarse-filters → human/expensive resource precisely verifies → results refill" loop ports straight to your information workflow: have an LLM cheaply pre-score hundreds of papers/sources, deep-read only the top few, and fold those conclusions back into a better filtering prompt. That's personal-scale active learning.
Takeaway + question
💡 GNoME's value isn't "how accurate the model is," but that it steers limited, expensive verification to where payoff is most likely.
🤔 Think: if the coarse filter has a systematic bias (always favoring one class of material), does the active-learning loop self-correct, or compound the bias?

AI-Assisted Math DiscoveryFunSearch · Guided Intuition

evolutionary searchintuition amplifier
One-line analogy

Here AI doesn't hand you the answer; it "generates hypotheses for a human (or an automated evaluator) to verify"—like AI generating a batch of candidate query plans/indexes and you benchmarking which is actually faster. Math discovery has two very different AI routes, both following this template.

What problem it solves + how it works

Route A — guiding human intuition (Davies et al. 2021, DeepMind × mathematicians): train a GNN on large datasets of math objects (e.g. knots) to surface "which invariants have unexpected correlations," feed that pattern as a hint to mathematicians, who then prove it into a rigorous theorem. One result was a new theorem in knot theory. Here AI is an intuition amplifier, not a proving machine—the proof is still done by humans.

Route B — evolutionary program search (FunSearch, Romera-Paredes et al. 2024): the key insight is to search for "programs" rather than "answers"—instead of storing "what the solution looks like," evolve "the function that constructs the solution" (think procedural vs declarative). Mechanism: an LLM acts as the mutation operator (rewriting/generating candidate programs), an automated evaluator acts as the fitness function (scoring each program), keep the high-scorers, iterate—it's a genetic algorithm, but the LLM generates the "offspring." It found constructions beyond the best known on the cap set problem (extremal combinatorics) and better heuristics for bin packing.

FunSearch: an evolutionary loop with the LLM as mutation operator

program populationLLM mutates candidatesevaluator auto-scoreskeep best
↑______________________ loop, approaching better constructions ______________________|
Prerequisite: solution hard to find, but "how good" is cheaply auto-verifiable (NP-flavored)
Code example
# FunSearch skeleton: LLM mutates a heuristic, evaluator scores, keep the best
from anthropic import Anthropic
client = Anthropic()  # needs ANTHROPIC_API_KEY

def evaluate(code):        # fitness: actually run the candidate, quantify quality
    ns = {}; exec(code, ns)
    return score_on_benchmark(ns["heuristic"])   # your scoring logic

best = ("def heuristic(x): return x", evaluate("def heuristic(x): return x"))
for _ in range(50):                                 # evolve 50 generations
    msg = client.messages.create(model="claude-opus-4-8", max_tokens=512,
        messages=[{"role": "user",
            "content": f"Improve this heuristic for a higher score, reply code only:\n{best[0]}"}])
    cand = extract_code(msg.content[0].text)
    try:
        s = evaluate(cand)
        if s > best[1]: best = (cand, s)   # keep only strict improvements
    except Exception: pass              # mutations may be syntactically broken; skip
Common pitfall + your use case
⚠️ Pitfall: assuming AI can "automatically prove" any conjecture. FunSearch requires that "the solution is hard to find, but its quality is automatically and cheaply verifiable." The moment an open conjecture can't be auto-verified (it needs a rigorous human proof), this evolutionary search doesn't apply. It scales "search," not "proof."
🎯 Your scenario (human-AI collaboration for cross-disciplinary connection): when you connect Buddhism × distributed systems × complexity science, apply Davies' pattern—have the LLM generate many candidate "possible isomorphisms between these fields" (intuition amplifier), and you play the evaluator, verifying which are real insights versus surface analogies. AI widens the hypothesis space; judgment stays with you.
Takeaway + question
💡 The breakthrough in math AI isn't "better at calculating," but a re-division of labor: AI generates candidates across a vast space, humans (or the evaluator) verify rigorously.
🤔 Think: why does "searching programs rather than answers" make search more efficient? (Hint: one good program covers infinitely many instances at once.)

Scientific Foundation ModelsScientific Foundation Models

GraphCastESM-2data-driven
One-line analogy

Porting the large-model paradigm—"pretrain once, fine-tune everywhere"—into the natural sciences. The core counterintuition: data-driven models beat first-principles physical solvers on many problems, both more accurately and orders of magnitude faster—because real data holds regularities the model never wrote into equations.

What problem it solves + how it works

Example 1 — GraphCast (Lam et al. 2023, Science): traditional weather forecasting numerically solves atmospheric PDEs on a supercomputer, like "recomputing every forecast from scratch." GraphCast uses a GNN trained on 40 years of reanalysis data to learn a function that maps the current state directly to a future state—like a precomputed materialized view, producing a 10-day forecast in one minute, beating top numerical systems on about 90% of verification targets.

Example 2 — ESM-2 / ESMFold (Lin et al. 2023, Science): treat a protein sequence as a "language" and pretrain with masked prediction in self-supervised fashion—exactly like training BERT. Scaled to 15 billion parameters, structural information "emerges": it folds proteins without any MSA, about an order of magnitude faster than AlphaFold (at a slight accuracy cost). This shows the "statistics of sequences" already encode structure.

Shared mechanism: large-scale self-supervised pretraining → learn a general domain "representation" → fine-tune on downstream tasks, wholly isomorphic to the LLM playbook.

Code example
# Extract representation vectors with a tiny ESM-2 (8M params, CPU-friendly)
import torch
from transformers import AutoTokenizer, AutoModel

name = "facebook/esm2_t6_8M_UR50D"          # smallest ESM-2
tok = AutoTokenizer.from_pretrained(name)
model = AutoModel.from_pretrained(name).eval()

seq = "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ"
inp = tok(seq, return_tensors="pt")
with torch.no_grad():
    out = model(**inp)
# one vector per residue; mean-pool for a whole-sequence "fingerprint"
emb = out.last_hidden_state.mean(dim=1)
print(emb.shape)   # torch.Size([1, 320]) -- attach your own task head and fine-tune
Common pitfall + your use case
⚠️ Pitfall: believing data-driven models "learned physics." They learn sophisticated interpolation—extremely strong inside the training distribution, but unreliable extrapolating out of it (unprecedented extreme weather, entirely new protein families). They carry no guarantee of physical law, only regularities that appeared in the data. Don't treat them as first-principles for extrapolation.
🎯 Your scenario (investment/business decisions): this "when does data-driven beat first-principles" line is a sharp tool for spotting opportunity—wherever there's abundant high-quality historical data and no need for extreme extrapolation, traditional "exact solving/expert judgment" can be cheaply eaten by a foundation model. Conversely, in domains demanding strong extrapolation with scarce data, AI is hard to move short-term.
Takeaway + question
💡 Scientific foundation models prove something profound: many "must-solve-the-equation" problems can actually be "learned directly from data"—provided the data is plentiful and good.
🤔 Think: can a model that never "understands" physics and only interpolates count as "making a scientific discovery"? Are discovery and understanding the same thing?

Further ReadingFurther Reading

Deep QuestionsDeep Questions

1. Is there a unifying "AI for Science" paradigm behind today's four cases (AlphaFold, GNoME, FunSearch, GraphCast)?
Yes—a shared skeleton: use cheap model predictions to replace or steer expensive real verification. AlphaFold predicts structure from co-evolution signals, replacing months of crystallography; GNoME predicts stability with a GNN, steering limited DFT compute to high-potential candidates; FunSearch generates candidate programs with an LLM, spending scarce "human/auto verification" on filtering; GraphCast replaces supercomputer PDE-solving with a learned mapping. Abstracted, it's one funnel: huge search space → cheap model coarse-filter/predict → expensive resource precisely verifies → results refill and improve the model. This is exactly the backend-familiar "cache + static analysis + CI feedback loop," made isomorphic for scientific discovery. The only difference is what "expensive verification" is—wet lab, DFT, human proof, or supercomputer. Grasp this skeleton and you can predict which sciences AI conquers first: anywhere "verification is expensive + data is plentiful + the search space is large."
2. AlphaFold relies on co-evolution; ESMFold folds from a single-sequence language model alone—why can the latter fold without evolutionary info? Do they contradict?
No contradiction—it's two readings of the same information. The co-evolution signal is essentially "which sites' variations constrain each other," and that constraint already lives across the vast set of known sequences. AlphaFold explicitly builds an MSA, aligns homologs, and reads co-variation; ESM-2 instead feeds hundreds of millions of sequences into a language model doing masked prediction—while learning to "predict masked amino acids," the model implicitly internalizes the statistics of the entire sequence universe, co-variation included. So when ESM-2 is big enough (15B params), structural information "emerges": it compresses the MSA's information into its weights. The cost is slightly lower accuracy than MSA-explicit AlphaFold, in exchange for an order-of-magnitude speedup (no need to search a homolog database per sequence). This maps to a general trade-off: explicit retrieval (RAG-flavored) is accurate but slow; implicit parameterization (baked into weights) is fast but may lose detail—wholly isomorphic to the "retrieval vs parametric memory" choice in LLMs.
3. GNoME "discovered 380,000 materials," AlphaFold "predicted 200 million structures"—how much is the word "discovery" diluted in these dazzling numbers?
Diluted heavily—worth being wary of. Traditionally, "discovering a new material/structure" means verified, reproducible, meaningful; these numbers are mostly computational predictions at the very top of the funnel. GNoME's 380,000 are "predicted thermodynamically stable," of which only a small portion have been independently synthesized and verified—and post-publication work has questioned some candidates' novelty and synthesizability. AlphaFold's 200 million are "predicted structures," a substantial fraction low-confidence or inherently flexible/disordered regions. This isn't to belittle the work—shrinking the candidate pool from "no idea where to start" to "380,000 worth trying" is enormous value. But "prediction scale" and "verified discovery" are different orders of magnitude, and headlines routinely conflate them. As a decision-maker, seeing such numbers, instinctively ask: is this "the model said so" or "the experiment proved so"? Which layer of the funnel? That discrimination applies to evaluating any "AI discovered X" news in the AI era.
4. If AI can predict results quickly and accurately without giving a "why," does that erode human scientific understanding long-term?
This is the deepest tension in AI for Science. On one hand, predictability itself advances science—AlphaFold lets structural biologists shift effort from "solving structures" to "using structures," a liberation. On the other hand, a black box that only interpolates without offering mechanism can leave a field in an "able to predict but unable to understand" state: the model is accurate, but no one knows what regularity it captured, so no new first principles can be distilled from it. Historically, science's power comes precisely from "the extrapolation that understanding grants"—Newton's laws didn't just fit the apple, they predicted never-seen celestial bodies. Pure data models offer no such extrapolation guarantee. But there's an optimistic route: Davies' work is the counterexample—AI doesn't replace understanding, it points human intuition where to look, leaving humans to complete the understanding. So the key isn't whether AI can understand, but whether we position it as an "answer machine" or an "intuition amplifier." For the "AI super-individual" you pursue, the same line holds: let AI extend your radius of exploration, but keep the un-outsourceable core of "understanding and judgment" for yourself.
5. Why is this wave of "AI doing science" almost entirely deep learning / GNNs, not symbolic AI or traditional numerical methods?
Because these problems share a structure: high-dimensional, nonlinear, with regularities implicit in data rather than written in equations. Protein folding, material stability, atmospheric evolution—first-principles equations exist (Schrödinger, fluid dynamics), but direct solving is computationally infeasible (the curse of dimensionality), and many effective regularities are "emergent," hard to derive analytically from the base equations. Deep learning's strength is precisely approximating arbitrary high-dimensional nonlinear mappings from data, and GNNs naturally match "atom-bond" and "grid-neighbor" graph/lattice structures. Symbolic AI excels at discrete, composable, logically clean problems (so it still has a place in math proof, e.g. theorem provers), but struggles with continuous high-dimensional physical systems. Traditional numerical methods are accurate but slow and must re-solve each problem, unlike a neural net's "train once, infer instantly." So the real frontier is actually hybrid: neural nets for fast prediction/candidate generation, numerical or symbolic verifiers for rigorous gatekeeping—FunSearch (LLM + auto evaluator) and GNoME (GNN + DFT) are both this pattern. Neither pure AI nor pure traditional methods is the endgame; the best-of-both loop is.