Nextflow Frontier
All posts

#1 BenchmarkDrug discovery · 11 min read

Simple models rival a billion-parameter neural network in an EGFR binding assay

Nextflow Frontier combined two small chemistry models to rank 144 molecules for binding to EGFR, a protein that some cancer drugs target. The selected ranking scored 0.887 on Polaris's 0-to-1 PR-AUC scale, against 0.866 for the best entry by another group, a billion-parameter neural network. Both small models train and run in seconds on a laptop. The result gives chemistry teams a compact approach to try on their own molecules, with a fresh comparison needed to test how well it carries over.

By Edmund Miller and Harshil Patel

Figure: ranking molecules against EGFR, a protein involved in cancer growth.

We used Nextflow Frontier to rank molecules by how likely they are to bind EGFR, a protein behind some lung cancers (Yun et al. 2007). Nextflow Frontier proposes models, runs them and uses their scores to decide what to try next. It produced two logistic regressions, among the simplest prediction models in chemistry. Each scores a molecule by adding up weights for the chemical fragments it contains. Those weights give chemists a way to inspect which fragment features contribute to a molecule’s score. Both models train and run in seconds without special hardware. The reference network has a billion parameters, the adjustable numbers a model learns, and was trained on specialist graphics chips.

Why rank molecules for EGFR

A drug discovery team can make or buy far more molecules than it can afford to test, and most of them do nothing to any given protein. The order of testing therefore decides how quickly the team finds the few that work and how much of its budget goes on failures.

EGFR sits in the membrane that encloses the cell. When a growth factor binds to its outer part, it relays a signal into the cell telling it to grow and divide (Yun et al. 2007). The part inside the cell is an enzyme that uses the cell’s energy-carrying molecule, ATP, to attach phosphate groups to other proteins and pass the signal onward. Enzymes that do this are called kinases. Mutations that leave EGFR switched on drive some lung cancers, and several approved drugs work by filling the pocket where ATP would bind (Yun et al. 2007). Lapatinib, a breast cancer drug that blocks both EGFR and its close relative HER2, is one of them (Ryan et al. 2008; Wood et al. 2004; Figure 1).

Left, the EGFR kinase with lapatinib bound in its pocket; right, lapatinib’s chemical structure with its quinazoline rings highlighted, above a zoomed PR-AUC scale marking 0.866 for the best entry by another group and 0.887 for Nextflow Frontier

Figure 1Drugs such as lapatinib work by sitting in a pocket of EGFR, and the test asks which molecules will bind there. Left: the EGFR kinase with lapatinib bound, from the public Protein Data Bank structure 1XKK (RCSB Protein Data Bank 2026, entry 1XKK; Wood et al. 2004). Right: lapatinib's chemical structure, with its two joined rings (a quinazoline) highlighted in salmon. The two dots are the scores compared in this article, the best entry by another group (gray) and Nextflow Frontier's (teal), on the benchmark's 0-to-1 ranking score (PR-AUC, explained below), with the scale zoomed to 0.86 to 0.89.

The test

Polaris built this test from a set of 645 molecules made to block kinases, released by GSK, Takeda and Pfizer for open research as PKIS2 (Drewry et al. 2017), and uses 640 of them. Each molecule was tested once, at 1 µM (one micromole per liter), in a competition binding assay against the unmutated (wild-type) form of EGFR, not the mutated form found in those lung cancers. In this assay, a molecule that occupies EGFR’s pocket stops EGFR gripping a bait fixed to a bead. Polaris calls a molecule active when it pushed more than 80% of the EGFR off the bait, compared with no molecule (Polaris 2026; Figure 2).

Figure 2The laboratory test calls a molecule active when it stops EGFR gripping a bait. (1) With no test molecule, EGFR binds the bait fixed to a bead and stays on it. (2) A molecule that fills EGFR's pocket blocks the bait, and EGFR is washed away. (3) The readout is the EGFR left on the bead compared with no molecule; below 20%, Polaris labels the molecule active. The drawing is a schematic and the bar heights are illustrative.

The benchmark gives every entrant 496 molecules with a yes-or-no label. Only 50 are active. It asks for a ranking of 144 other molecules whose labels stay hidden. Polaris divided the molecules by scaffold, the core framework of rings and linkers that defines a chemical family. None of the 74 test scaffolds appears in the training set. Molecules on the two sides can still share a smaller core, including lapatinib’s two-ring quinazoline shown in Figure 1. The test asks how well a model ranks molecules with scaffolds it has never seen.

Polaris scores each ranking with PR-AUC, short for the area under the precision-recall curve, a measure of how cleanly the active molecules come first. It runs from 0 to 1, where 1 means every active molecule comes before every inactive one. Imagine testing the molecules in the ranked order and, each time an active one turns up, noting what share of the molecules tested so far were active. PR-AUC is the average of those shares, so a score near 0.89 means that, on average, about nine in ten of the molecules tested up to each active one were active too. It scores the order of the list, not the share of predictions that were right. A ranking in random order would score about the share of the molecules that are active: the weakest entries on the leaderboard, which order the molecules no better than chance, score 0.11.

The best entry by another group is built on MolGPS, a graph neural network, which reads a molecule as atoms joined by bonds and, layer by layer, lets each atom gather information from its neighbors. Its developers first trained it on the largest public collection of molecular graphs, about five million molecules, to learn general chemistry, and the entry uses a version with about a billion parameters (Sypetkowski et al. 2024).

How Nextflow Frontier built its models

Over 80 hours Nextflow Frontier made 820 scored attempts across 84 approaches, each run with particular settings. It read the scores and its own written notes to decide what to try next. That search led it to change how it described molecules and how it combined the models (Figure 3).

Early on, Nextflow Frontier’s strongest models were logistic regressions reading tallies of the small fragments in a molecule, called chemical fingerprints, where each fragment is an atom together with its neighbors up to two bonds away.

Nextflow Frontier’s notes then turned to how EGFR drugs bind. These drugs form hydrogen bonds, weak attractions involving a hydrogen atom, with the hinge between the kinase’s two lobes. The hinge lines the ATP pocket (Yun et al. 2007). The notes proposed describing atoms by their binding roles rather than their elements. Nextflow Frontier described each atom by roles such as giving or accepting a hydrogen bond or carrying a charge. The recorded PR-AUC on the 144 test molecules rose from 0.848 for the element-based version to 0.863. Letting each fragment reach three bonds out instead of two gave 0.864. These search observations do not isolate which change caused an improvement.

Further tweaks to that model gave only small gains, so Nextflow Frontier changed direction and started a fresh line of work with a different fingerprint, one that lists the chains of atoms and the ring systems in a molecule. On its own that model scored 0.876. (Chemists call the atom-roles description an FCFP fingerprint and the chains-and-rings one an Avalon fingerprint.)

Figure 3Nextflow Frontier's best score rose in three moves: describing atoms by their roles, adding a chains-and-rings model, and combining the two. The labels mark one attempt for each of the first two moves and two for the third: the two models averaged at 0.881, then averaged on a shared scale at 0.887. Each light gray dot is one attempt and the teal line is the best score so far; its small unlabeled steps are other attempts, with new settings or new approaches, that edged the best score up. The gray line is the MolGPS entry, at 0.866. The vertical axis is zoomed to 0.70 to 0.90, so 51 weaker attempts fall below it. The figure shows the path the search took: on 144 test molecules none of these steps, nor the climb as a whole, can be told apart from chance.
Scored attempts and milestone descriptions
hoursscore
0.000.7394
0.030.7838
0.270.7295
0.360.8294
0.600.7475
0.650.7352
0.840.7547
0.840.7653
0.980.7300
0.980.7768
0.980.8340
1.080.7174
1.120.7699
1.120.8089
1.120.8190
1.170.7435
1.220.7504
1.220.7613
1.270.7871
1.270.8258
1.270.8392
1.360.7131
1.460.7911
1.460.8124
1.550.7346
1.650.7223
1.740.7257
1.740.7366
1.840.7418
1.890.8273
1.980.7587
2.120.7969
2.120.8049
2.170.7696
2.170.8141
2.170.8322
2.220.7223
2.320.7326
2.320.7616
2.320.8098
2.550.7022
2.550.7788
2.550.8299
2.650.8063
2.940.7042
3.130.7223
3.170.7071
3.270.7114
3.320.8478
3.460.8201
3.650.7137
3.650.7636
3.750.7596
3.750.8322
3.980.8106
4.220.8118
4.270.7171
4.270.8347
4.410.8253
4.510.8029
4.560.7843
4.600.7917
4.600.8063
4.600.8373
4.700.7843
4.790.7880
4.790.7963
4.790.8121
4.980.7997
4.980.8167
5.460.8061
5.560.8032
5.650.8330
5.800.8164
5.940.7713
6.030.8210
6.220.7553
6.270.8032
6.370.8359
6.460.8293
6.460.8436
6.510.8509
6.560.7963
6.800.8181
7.030.8388
7.080.8072
7.320.7553
7.370.7713
7.460.7779
7.560.8624
7.940.8201
7.990.7854
7.990.8396
8.130.8511
8.180.8431
8.700.8508
8.750.7779
8.800.7917
8.940.8474
9.130.7980
9.130.8431
9.280.8388
9.320.8230
9.750.7980
9.900.8505
10.040.8448
10.090.8238
10.180.8032
10.180.8276
10.280.7980
10.280.8388
10.470.8192
10.470.8238
10.610.8313
10.800.8098
10.800.8129
10.850.8540
10.990.7966
11.180.8448
11.230.8388
11.420.8542
11.990.8494
12.040.8227
12.040.8362
12.180.8565
12.230.8606
12.420.8408
12.560.8172
12.610.8499
12.800.8273
12.850.8115
12.900.8574
13.140.8339
13.140.8540
13.330.8273
13.380.8606
13.470.8479
13.610.8178
13.950.8428
14.280.8571
14.380.8597
14.520.8264
14.760.8488
14.810.8388
15.040.8600
15.090.8545
15.190.8471
15.330.8253
15.430.8129
15.620.7908
15.710.8350
15.950.8442
16.040.8571
16.570.7759
16.660.8350
16.760.8095
19.050.8611
19.240.8250
19.380.8491
19.380.8551
19.520.8095
19.570.8324
19.570.8448
19.720.8611
19.810.8224
19.910.8667
20.000.8571
20.100.7997
20.100.8293
20.240.7917
20.290.8379
20.290.8494
20.430.8410
20.480.7748
20.480.8253
20.530.8015
20.570.7587
20.860.8442
20.860.8637
20.910.8213
21.000.7748
21.100.8388
21.150.8571
21.240.7992
21.240.8534
21.430.7854
21.430.8299
21.480.8190
21.620.7736
21.620.8713
21.910.8095
21.910.8431
22.050.8531
22.100.8649
22.150.8339
22.240.8611
22.390.7874
22.480.7969
22.480.8310
22.670.7926
22.770.7774
22.860.8540
22.960.8442
23.000.8026
23.240.7969
23.240.8643
23.340.7541
23.390.8502
23.430.8422
23.720.8588
24.100.8611
24.240.8738
24.440.8482
24.720.8672
24.720.8793
24.770.8588
25.010.8313
25.050.8810
25.250.7401
25.250.8353
25.390.8413
25.480.7541
25.480.8775
25.580.7358
25.630.8700
25.720.7295
25.720.7708
25.720.8132
25.720.8488
25.910.8310
26.010.7404
26.010.8703
26.060.7820
26.100.7355
26.250.8224
26.440.8149
26.680.8061
26.770.8276
26.870.8023
27.060.8095
27.060.8195
27.250.7822
27.250.8236
27.440.8256
27.580.8170
27.720.7897
27.870.7917
28.960.8775
29.200.8735
29.770.8775
31.250.8836
31.730.8786
32.300.8812
32.680.8712
33.970.8758
34.450.8783
34.680.8801
35.300.8786
36.730.8637
37.070.8792
37.350.8758
37.970.8821
39.830.8812
40.120.8795
40.500.8545
40.880.8821
44.310.8631
44.930.8789
45.460.8798
47.220.8594
47.460.8732
47.650.8683
47.790.8339
47.990.8712
48.130.8637
48.270.8763
48.460.8597
48.600.8818
50.130.8267
50.510.8247
50.750.7794
51.040.8238
51.370.7794
52.900.8826
53.520.8634
53.660.8732
53.850.8766
53.990.8792
55.180.8591
55.420.8634
55.710.8844
55.950.8717
56.520.8795
56.660.8826
58.140.8723
58.620.8818
59.380.8841
61.090.8746
61.430.8680
61.760.8674
62.140.8832
62.480.8786
63.810.8301
64.000.8560
64.190.8244
64.340.8299
64.530.8000
64.720.8528
64.960.8494
65.240.8571
65.390.8629
66.910.8792
67.290.8838
67.480.8803
67.860.8801
70.300.7157
70.440.7567
70.820.7980
70.960.7297
71.110.7579
71.250.8017
71.440.7705
72.630.8712
72.820.8433
72.970.8677
73.160.8786
73.490.8760
73.820.8806
79.070.8247
79.400.7931
79.590.8069
79.780.7762
79.930.7587
80.120.8052
80.310.8284
80.450.8393
Milestone descriptions
ScoreDescription
0.864atoms described by their roles
0.876chains-and-rings model
0.881the two models averaged
0.887averaged on a shared scale
0.866MolGPS entry

Nextflow Frontier then combined the two models. A weighted average of their predicted chances of activity scored 0.881. Its notes identified a possible weakness. The atom-roles model’s predictions occupied a narrow band, while the other model’s spread widely and could dominate the average near the top of the list. Citing Genest and Zidek’s 1986 review of methods for combining forecasts, Nextflow Frontier proposed averaging the predictions on the log-odds scale. This is the logarithm of the odds that a molecule is active. The best recorded score rose to 0.887, with a fifth of the weight on the chains-and-rings model. The increase of 0.006 on 144 molecules cannot be distinguished from chance.

How the two scores compare

On the same 144 test molecules, Nextflow Frontier’s selected attempt scored 0.887 on PR-AUC against 0.866 for the MolGPS reference entry. To picture a gap of 0.021, take a made-up list of 144 molecules, 14 of them active (about one in ten, as in the training molecules), ranked well enough to score about 0.9. Moving a single inactive molecule up into tenth place in that list lowers the score by 0.022, about the size of the gap. This example shows how one change in the order can move the score by about the size of the observed gap. It does not translate that gap into a fixed number of laboratory tests. Polaris also publishes a second ranking measure, ROC-AUC, the chance that an active molecule is ranked above an inactive one picked at random. On that measure Nextflow Frontier’s ranking scores 0.934 and that entry 0.961, a difference of about the same size in the other direction, and just as unresolved. PR-AUC emphasizes concentrating active molecules near the top of the list, while ROC-AUC measures how often an active molecule ranks above an inactive one across the list.

The two small models scored in the same range as a billion-parameter network on chemical families held back from training. This does not settle which ranking is better. Polaris publishes neither uncertainty estimates for its entries nor the reference entry’s predictions for individual molecules. We therefore cannot compare the rankings molecule by molecule. Resampling the 144 test molecules gives Nextflow Frontier’s score a range of roughly 0.73 to 0.99. That range includes the reference score of 0.866.

The search selected 0.887 as the best of 820 scores on these same molecules. Choosing the best of many scores on one test tends to overstate performance on new molecules. To estimate that effect, we selected the best attempt again on resampled sets and scored it on the molecules left out. This analysis estimates the recipe’s score on new molecules at about 0.80 to 0.86, against the reference entry’s 0.866 on the original test.

Nextflow Frontier’s 0.887 has since been posted to the Polaris leaderboard, where it ranks first. The entry discloses that scores on these same molecules guided selection.

What this does not show

The result covers one protein in its unmutated form, one laboratory measurement made once at one concentration, and 144 molecules with yes-or-no labels. A high rank means the models expect a molecule to push EGFR off the bait in a test tube. It does not show that the molecule stops cancer cells growing, works in a patient or spares related proteins such as HER2. Sparing related proteins is called selectivity. Whether the same recipe works for another protein is untested.

The fragment weights show how the models calculate a score. They do not by themselves explain why a molecule binds EGFR. A fingerprint position can also represent more than one fragment, so interpreting a weight requires checking which fragments it represents.

Audit records covering 22,443 tool calls and 115,837 files show no access to the hidden labels, which reached Nextflow Frontier only through each attempt’s score. The run’s permissions would have allowed access, so these records show that access did not happen, not that it was prevented. That limit and the use of repeated test scores are reasons to compare the fixed recipe on newly measured molecules.

What would change if it holds

To settle the comparison, fix Nextflow Frontier’s recipe and run it alongside the MolGPS reference method on newly measured molecules from chemical families neither method has seen. Compare their rankings molecule by molecule and estimate the uncertainty in the difference. If the simple models keep pace, a chemistry team could use them in-house to rank its EGFR candidates and send the top of the list to the laboratory first. The team could also investigate how the models’ fragment weights affect that order. This could reduce the cost of building shortlists and help explain why a molecule was chosen.

Summary

Nextflow Frontier built a compact EGFR ranking recipe from two familiar chemistry models. Its selected ranking scored 0.887 on PR-AUC, against 0.866 for the billion-parameter MolGPS reference entry. On ROC-AUC, the order reversed, with Nextflow Frontier at 0.934 and the reference at 0.961. The search explored atom roles, chains and rings, and ways to combine their predictions. The resulting models run on a laptop and expose the fragment weights behind each score. A comparison on newly measured molecules would test whether this recipe can help chemists choose which EGFR candidates to send to the laboratory first.

Bring Nextflow Frontier a defined computational task and a way to evaluate its answers. It searches for candidate workflows and reports their measured results.

References

  • Drewry DH, Wells CI, Andrews DM, et al. (2017). Progress towards a public chemogenomic set for protein kinases and a call for contributions. PLOS ONE 12(8): e0181585. doi:10.1371/journal.pone.0181585
  • Genest C, Zidek JV (1986). Combining probability distributions: a critique and an annotated bibliography. Statistical Science 1(1): 114–135. doi:10.1214/ss/1177013825
  • Polaris (2026). Benchmark pkis2-egfr-wt-c-1: task, scaffold split, PR-AUC and leaderboard. polarishub.io/benchmarks/polaris/pkis2-egfr-wt-c-1 (accessed 8 October 2026; Nextflow Frontier’s own 0.887 entry was added on 9 October 2026).
  • RCSB Protein Data Bank (2026). Entry 1XKK: EGFR kinase domain complexed with a quinazoline inhibitor - GW572016 (lapatinib). rcsb.org/structure/1XKK (accessed 9 October 2026).
  • Ryan Q, Ibrahim A, Cohen MH, et al. (2008). FDA drug approval summary: lapatinib in combination with capecitabine for previously treated metastatic breast cancer that overexpresses HER-2. The Oncologist 13(10): 1114–1119. doi:10.1634/theoncologist.2008-0816
  • Sypetkowski M, Wenkel F, Poursafaei F, et al. (2024). On the scalability of GNNs for molecular graphs. arXiv:2404.11568. arxiv.org/abs/2404.11568
  • Wood ER, Truesdale AT, McDonald OB, et al. (2004). A unique structure for epidermal growth factor receptor bound to GW572016 (lapatinib): relationships among protein conformation, inhibitor off-rate, and receptor activity in tumor cells. Cancer Research 64(18): 6652–6659. doi:10.1158/0008-5472.CAN-04-1168
  • Yun CH, Boggon TJ, Li Y, et al. (2007). Structures of lung cancer-derived EGFR mutants and inhibitor complexes: mechanism of activation and insights into differential inhibitor sensitivity. Cancer Cell 11(3): 217–227. doi:10.1016/j.ccr.2006.12.017

Interested in Nextflow Frontier?

Nextflow Frontier is a closed-loop discovery system built on Nextflow. It designs computational experiments, runs each one as a reproducible pipeline and learns from every result’s score what to try next, under the supervision of scientists.

Learn more

Filed under Drug discovery

All posts
All posts
  1. Benchmarks

    Nextflow Frontier, Rosalind and Claude Science on BioML-bench

  2. Introducing Nextflow Frontier

  3. Biomedical imaging

    Forecasting lung decline from a single CT scan