Skip to content
Libellus
LibellusThe latest scientific discoveries, explained for everyoneFree · Independent · Not for profit · Translated in 5 languages
Two hands and lower forearms use brass tweezers to lift one small amber glass bead from a shallow tray of many unmarked beads on a deep teal mat in warm low afternoon light.

How a Machine Learns to Pick the Next Batch of Genes in a CRISPR Screen

8 min read

Biologists testing thousands of genes often face an expensive question: which untested genes should go into the next batch? A new machine-learning approach combines a general-purpose language model with a specialized policy that learns from past gene hits, screen descriptions, and round-by-round lab feedback. The goal is to turn noisy experimental results into better guesses about what to test next, while keeping choices grounded in known biology.

A map built from old hits, not textbook pathways

The starting map is not drawn from textbooks. It is learned from old screening results. In those records, some genes were hits in one assay and misses in another. The system treats each gene as a point in a small 10-dimensional space. Two genes sit close together when they tend to come up as hits in the same kinds of screens. That is the whole idea: co-hit geometry, not pathway membership.

The raw material was large but incomplete. It covered 1,349 training screens and 23,724 genes. Only about 64% of possible screen-gene pairs had a recorded result. The overall hit rate was just 7.3%. Missing entries were not treated as failures. They were left unknown. That matters because an untested gene is not the same as a negative one.

A matrix-completion method filled in the missing structure. It estimated hidden factors for screens and genes, then used those factors to place each gene. Genes with no history got a neutral position plus a small bias based on their overall hit frequency. The result was a map of shared screening behavior.

When that map is examined, it does not look like a pathway diagram. Members of the same protein complex or Reactome pathway are spread out. Instead, genes cluster by screen phenotype. One group contains common essential genes. Others correspond to context-essential and selectively essential genes, immune or viral response, apoptosis, and several DNA-damage-response patterns. The map captures what tends to be hit together in real assays.

Training barely moves the map. Pairwise similarities before and after training correlate at 0.999. More than 95% of each gene’s nearest neighbors stay unchanged through reinforcement-learning fine-tuning. Random starting embeddings are almost completely reorganized. Some biology-based embeddings remain stable but still perform poorly. The useful property is not stability alone. It is that the co-hit map is already aligned with adaptive hit discovery.

Turning round-by-round lab results into better gene picks

Each round of a gene screen returns a small list of winners and losers. The model treats those labels as new evidence, not as noise to ignore. It stores each tested gene with two learned pieces: one says what the gene is, another says whether it hit in that assay. Those pieces are joined together before entering the transformer.

The experiment description is also encoded. A frozen text encoder turns words into numbers, and a linear map puts them in the same space as the gene history. After the transformer processes all of this, one pooled vector summarizes what has been learned so far. That context vector then scores every untested gene. Scoring compares the context with each gene’s own embedding through a bilinear term, plus a small per-gene bias. The next batch is simply the top 100 genes that have not yet been tested.

This loop matters because one round rarely tells the whole story. A gene may look promising only after another hit reveals a pathway. Training therefore uses simulated partial histories of different lengths. For each screen, up to 1,024 genes are revealed as observed context. Sometimes the subset is redrawn so it includes at least one hit while leaving another true hit hidden. That forces the model to learn from informative feedback, not just easy cases.

Supervised training first teaches a simple rule: given what has been seen, predict which unseen genes will hit. The loss balances hits and non-hits. Reinforcement learning then goes further. It simulates full multi-round campaigns rather than single-step guesses. For each screen, eight rollouts are generated so the model can compare different paths through the same assay. Fresh sampling noise is added at every step, so trajectories diverge as more evidence accumulates.

The reward compares the current policy with a frozen baseline that ignores observed feedback. This context-delta signal isolates what improvement comes from using lab results. It beats an objective that only rewards final hit enrichment: the delta version reaches an enrichment factor of 4.83, while terminal-enrichment training drops to 4.29. The reason is simple. A final score cannot tell which choices were helped by earlier labels.

Removing the screen description lowers enrichment modestly, from 4.83 to 4.52. That suggests learned cross-screen patterns carry much of the early guidance. Still, feedback matters most when a new assay begins and the model must update its guesses round by round.

Measuring whether the choices are useful, focused, or just lucky

Useful choices are measured against a strict budget. The enrichment factor counts only three kinds of picks. They are genes from the historical screen library, invented gene names, and empty batch slots. Valid real genes outside that old library do not help normalize the score. This stops a system from looking good by naming many plausible but unmeasured genes.

The nAUC curve tracks cumulative hits as more of the library is effectively queried. An unfilled slot does not move the curve forward. A policy that leaves batches empty stops early instead of being padded to full budget. The curve is normalized by an oracle that finds all hits first over the same effective budget. Random selection gives roughly the screen’s hit rate when fewer than all hits are acquired.

Fraction-of-hits recall uses only in-library acquisitions as possible hits. Out-of-library genes and invented names cannot contribute. Shortfall counts both real genes outside the historical library and made-up gene names. A high shortfall means many suggestions cannot be checked against past assay evidence.

A separate diagnostic asks whether success comes from generic cell-death biology. It uses 1,827 DepMap common essential genes. If most recovered hits are these widely lethal genes, enrichment may reflect a broad vulnerability rather than screen-specific signal. The best AssayLoop configurations sit around 29 to 35 percent on this measure. A prior-hit baseline reaches 99.1 percent. Random selection is 18.6 percent.

Hidden directional clues in the model’s gene preferences

The model does not treat genes as isolated labels. It learns preferences that bend when other genes are known to be hits. To expose this, the system was probed in a controlled way. One gene was marked as a hit. A random set of 50 already tested genes formed the background. The score for another target gene was then measured. This was repeated over ten different backgrounds. A generic essential-screen description was used each time.

The result is not a simple friendship map. If gene A makes gene B more attractive, that does not mean B does the same to A. The influence matrix correlates only 0.16 with its mirror image. That is close to no symmetry. In 44% of reciprocal pairs, the two directions point opposite ways. One direction pushes a target up. The other pulls it down.

A concrete example shows the asymmetry. When MDM2 was treated as a hit, PFDN4’s score rose by 0.33. That is a modest lift. But when PFDN4 was treated as a hit, MDM2’s score fell by 0.46. The same pair, reversed, gives opposite signs and different sizes. This means the model stores directional clues about which result should change which later choice.

These clues are not just copies of textbook biology. Pairs already found in major interaction and pathway databases were set aside. Strong patterns still remained. Some looked like co-essentiality or synthetic lethality. For example, after MYC hits, the model leaned more toward spliceosome genes. After MDM2 hits, it leaned more toward nucleolar-stress genes. Other patterns looked like masking or exclusion. After PIK3CA hits, dependence on mitotic-machinery genes dropped. After SMAD4 hits, dependence on OXPHOS genes dropped. These are not proven biological interactions. They are decision patterns the model inferred from past screens.

In plain terms, a hit can open one door and close another. The direction matters because later choices depend on what has already been learned. A gene that looks unimportant alone may become valuable after a specific hit appears. It may also lose value when another result changes the cell’s apparent needs.

A practical path from noisy screens to better decisions

Gene choice improves when a model learns from what has already been tested. Historical hit patterns matter more than neat pathway maps. Genes that co-occur as hits across many screens carry useful structure. That structure can guide the next batch of tests even before a new experiment begins.

This creates an opportunity for faster screening. A lab does not need to wait until every gene has been measured. It can use early feedback to narrow the search. The hybrid approach is especially promising because it combines two strengths. A language model supplies biologically plausible first picks from the screen description. A trained policy then updates those choices as hit and non-hit results arrive. That division of labor makes the process more focused, more stable, and less dependent on any single source of knowledge.

But the obstacles are real. The approach still leans heavily on past screens. If a gene was rarely measured before, its score rests on weaker evidence. Some selected genes fall outside the historical library, which makes evaluation harder and invites guessing. Essential-gene bias is another trap. Many hits can reflect generic cell-death biology rather than the specific pathway under test. The model also discovers directional dependencies that look biologically plausible, but they are inferred decision patterns, not proven interactions.

The bigger picture is a shift from static annotation to adaptive evidence. Biological knowledge remains useful, yet it should be treated as one signal among many. Future systems may combine open models, richer assay metadata, and tighter lab feedback loops. They will also need better ways to separate screen-specific biology from broad essentiality and to test inferred gene relationships in wet-lab experiments.

The question is not whether machines can help choose genes. The harder question is whether they can keep choosing the right ones when every new result changes what matters next.

Keep reading

Continue to the next article

Continue to the next article

Continue to the next article