Skip to content
Back to Blog

Reading Toxicity of Molecules with Neutral-Atom Quantum Processors

A solid step toward neutral-atom quantum feature extraction with accuracy quantum advantage for molecular toxicity classification

By Antonio Ferrer Sánchez, Carlos Flores & Alejandro Gómez Cadavid

Deciding whether a molecule is toxic is one of the most important questions in drug discovery and chemical safety. Testing every candidate in a laboratory is slow and costly, so researchers lean on machine learning models that learn to predict toxicity from the structure of a molecule. These models are only as good as the numbers we feed them, the so-called features, and a large part of the work in this field is finding better ways to turn a molecule into a short list of informative numbers. This blog describes an early experiment in doing exactly that by using the Molecular toxicity dataset [1].

The idea behind quantum feature extraction

The experiment builds on our recent works on quantum feature extraction, where we showed that a quantum computer can act as a kind of transformation engine, using massive multiqubit entanglement, that takes classical data and re-expresses it in a richer form [2], [3], [4]. In this case, each data point, for example, the description of a molecule, is written into the settings of a multipartite quantum system. The system is then allowed to evolve according to the laws of quantum physics, and during that evolution the exponentially many parts of the system influence one another in ways that are hard to reproduce with classical formulas. When the system is finally measured, the outcomes carry a fingerprint of all those interactions. Those measurement outcomes become new features, and they are handed to a standard machine learning classifier that makes the final toxic or non-toxic decision. The appealing finding from these works is that the quantum features often add information the classical ones miss, and in several cases, they improved the accuracy of the classifier.

Neutral atoms

Our earlier works ran on superconducting quantum chips, the kind of digital quantum computer that executes sequences of discrete gates. The experiment described here asks a natural question, whether the same idea can be carried out on neutral-atom quantum hardware. Neutral-atom machines hold single atoms in place with tightly focused laser beams, arrange them into patterns in space, and then shine them with light into a highly excited state known as a Rydberg state. When two atoms sit close together and one of them is excited, it changes the behavior of its neighborhood, and this natural interaction is what does heavy lifting. Instead of programming a long list of gates, these devices require a sequence of smooth control signals, and the collective dynamics of the atoms evolves continuously. Currently, these devices offer a larger qubit count with respect to digital quantum computers, and it is there where their true advantage is. As long as a smart quantum-classical workflow is developed for feature extraction, more qubits imply more features involved in the problem.

We assign a set of driving schedules to each molecule in the dataset. We also specify how far apart the atoms should sit, which sets how strongly neighbors interact. Those numbers are considered to build a physical program for the hardware. The two hundred atoms are laid out on a grid of fourteen by fifteen positions, spaced a few micrometers apart. The whole sequence lasts a little under four microseconds, after which the state of every atom is read out. See Figure 1 for a detailed diagram of the graph.

What we ran

These programs ran on QuEra's Aquila, a neutral-atom processor with up to 256 atoms, which we reached through Kipu Quantum's Hub platform [5]. We submitted the training set of the toxicity dataset one molecule at a time and with 500 independent measurements. In total, 122 samples were processed this way, with roughly two thirds carrying the non-toxic label and one third on the toxic label.

The atomic layout for one molecule from the toxicity dataset, showing a 14 by 15 grid of neutral atoms positioned a few micrometers apart.
Figure 1. The atomic layout for one molecule from the toxicity dataset.

The output

Reading the states of the atoms gives strings of excited and unexcited sites per measurement and gathering many of those strings for a molecule produces a statistical portrait of how the atoms responded to it. From these, we built a set of about a thousand quantum features per molecule. To judge the competitiveness of this method, we compared it against a classical baseline of few hundreds of features derived from the molecule in the usual way, and we also tried the two feature sets joined together.

Test scores for each classifier using classical features, quantum features, and the two combined, shown across raw accuracy, balanced accuracy, F1-score and AUC.
Figure 2. Test scores for each classifier using classical features, quantum features and the two combined, shown across the four metrics.

We then handed each feature set to a family of standard machine-learning classifiers, including gradient-boosted decision-tree ensembles such as XGBoost and CatBoost, a random forest, a support vector machine, and Google Research's TabFM [6], a zero-shot tabular foundation model for classification and regression based on in-context learning. These results are depicted in Figure 2. All the considered classifiers were trained and scored on molecules it had never seen, and to avoid lucky cases, we repeated the whole procedure over one hundred random splits and averaged the results. In addition, we also considered an extra source of error coming from random subsampling of the test samples; to probe the robustness of the model and to make sure we are not falling into lucky scenarios. We looked at four performance metrics, from plain accuracy through to balanced accuracy, F1 score and the area under the ROC curve (AUC), since the toxicity data is imbalanced and plain accuracy on its own can flatter a model that simply leans toward the majority class. Aiming to be as fairest as possible, several feature selection algorithms were performed on the classical features and on the quantum ones, leading to a “best-to-best” comparison in which the best-performing model on classical baseline is compared to the corresponding best-performing one on the quantum mapping.

Across every classifier, the quantum features matched or beat the tested classical baselines. On plain accuracy, the classical features already do a reasonable job, and the quantum features add a modest increase, pushing the strongest models close to the 0.78 mark. On balanced accuracy and F1 score, the difference is much larger. The classical baseline sits around 0.55 for balanced accuracy and near 0.3 for F1, which is the tell-tale sign of a model that mostly predicts the common class, while the quantum features raise balanced accuracy to about 0.7 and roughly double the F1 score to around 0.6. The support vector machine driven by quantum features was the strongest combination overall, reaching about 0.78 accuracy and the best area under the curve in the study.

Looking ahead

As a conclusion, the neutral-atom-based feature mapping used here has achieved meaningful results, demonstrating a case where only the quantum features can improve quantitatively the performance not only on raw accuracy and AUC, but also in terms of the balanced accuracy which is known to constitute a more robust metric.

These results constitute a first solid step towards more general models, where each type of quantum device provides significant features, which alone or combined with classical features, give the most accurate classification of the data.

We have showed experimental evidence that an industrial use of analog quantum processors, involving neutral atoms, superconducting qubits, or trapped ions, is possible for the wide class of tabular-data and time-series machine-learning problems, as feature extraction or image classification. We believe that hardware providers as QuEra, D-Wave, Pasqal, Atom Computing, Oratomic, and Planqc will have to consider today's industrial applications with immediate added value for customers. We will soon report on further findings, services, products, and production-level possibilities with surrogate quantum machine-learning techniques.

References

  1. Molecular toxicity dataset. archive.ics.uci.edu/dataset/728/toxicity-2.
  2. Kipu Quantum. Digitized Counterdiabatic Quantum Feature Extraction. Read the blog post.
  3. Kipu Quantum. Analog Quantum Feature Selection with Neutral Atoms. Read the blog post.
  4. Kipu Quantum. Classical Surrogates for Quantum-Advantage Feature Extraction. Read the blog post.
  5. Kipu Quantum Hub platform. hub.kipu-quantum.com.
  6. Google Research. TabFM: a zero-shot tabular foundation model for classification and regression based on in-context learning.

Written by