Honey bees have long been in trouble, and one of the most stubborn reasons is that they keep flying into danger. When fields are sprayed with pesticides, foraging bees cannot know that the blossoms they are visiting have been treated, and the result is a steady drumbeat of exposure that contributes to colony decline and, in severe cases, colony collapse. A team at the University of California, Riverside, now reports a way to flip that dynamic: rather than trying to make pesticides less toxic, the researchers used machine learning to discover chemical compounds that can be paired with pesticides to actively push bees away before they come into contact with the chemicals. The study, published in the journal eLife, describes both the computational method and the laboratory and field experiments that validated it.
The central obstacle the team faced was the sheer complexity of the honey bee’s sense of smell. Bees rely on more than 200 odor receptors to navigate their world, detecting and responding to a vast array of volatile compounds in their environment. That sensitivity is what makes bees such effective foragers, but it also makes their olfactory behavior extraordinarily difficult to predict. Finding a scent that reliably repels a bee, rather than attracting it or doing nothing at all, has long been considered a major challenge. Anandasankar Ray, a professor of molecular, cell and systems biology at UC Riverside and an expert on insect olfactory behavior, led the interdisciplinary effort to overcome it.
“Bees rely heavily on their sense of smell to forage, but that sensitivity makes it tough to find odors that push them away instead of drawing them in,” Ray said. “Our goal was to flip that script and find a way to use scent as a deterrent — safely and effectively.” To pursue that goal, Ray’s team collaborated with honey bee researchers in the laboratory of Boris Baer, a professor of entomology at UC Riverside, combining expertise in computational modeling with hands-on knowledge of bee behavior.
The approach the researchers developed was a machine-learning model trained on two kinds of information: the chemical structures of odorant molecules and previously recorded behavioral responses of bees to those odorants. By learning the relationship between molecular features and behavioral outcomes, the model could begin to predict how a bee would respond to a compound it had never encountered. Crucially, the team did not stop with the initial training data. They refined the model with new behavioral data generated in their own laboratory, gathered from both honey bees and Drosophila, the fruit fly that serves as a workhorse of insect olfaction research. That iterative improvement step allowed the system to make increasingly accurate predictions of insect olfactory responses.
One of the most striking aspects of the work is that it succeeded without the enormous datasets usually assumed to be necessary for machine learning. “It is generally thought you need abundant data to do any kind of machine learning, but that’s not true for olfaction,” Ray said. “You simply need good-quality data and iterative improvement steps.” That insight has implications well beyond bee research, suggesting that carefully curated behavioral measurements can substitute for sheer data volume when the underlying structure of the problem is learnable. Once the model was optimized, the researchers put it to work on a truly industrial scale, screening a library of more than 50 million compounds. From that vast chemical space, the system identified roughly 130 candidates predicted to have strong potential as bee repellents.
Predictions, of course, mean little until they are tested against living insects. The team reports in eLife how they put the top-performing candidates through exactly that gauntlet. In laboratory assays, honey bees exposed to the candidate compounds exhibited clear avoidance behaviors, and those responses aligned closely with what the model had predicted. That agreement between computation and behavior is the heart of the study’s significance: it demonstrates that a model trained on limited but high-quality data can generalize to new molecules and correctly forecast how bees will react to them in the real world.
The validation did not stop in the laboratory. The researchers then moved to field experiments with freely foraging bees, a far more demanding test because wild conditions introduce wind, competing odors, and the full complexity of natural foraging behavior. All seven of the compounds tested in the field reliably repelled bees from honey combs, and importantly, they did so without harming the insects. A repellent that injured the very pollinators it was meant to protect would defeat its own purpose, so the demonstration that these odorants deter bees safely is a critical part of the result.
“This is a powerful demonstration of how machine learning can help solve real-world ecological problems,” Ray said. “By keeping bees away from harmful pesticides, we can potentially reduce their risk of exposure without compromising the protection of crops.” The logic of the approach is straightforward: instead of banning or restricting every pesticide that poses a risk to bees — a regulatory path that has already removed some of the most harmful products from use — farmers could blend repellent compounds into their pesticide applications. The crop would retain its protection against pests, while bees, sensing the deterrent odor, would simply choose to forage elsewhere. Unintended exposure to pesticides is widely considered a contributing factor to bee population decline and colony collapse, and minimizing bee contact with treated crops addresses that exposure directly.
The researchers also point to applications that extend well beyond agricultural spraying. “In certain public environments — hospitals, office buildings, and residential areas, for example — reducing the formation of beehives can help avoid human-bee conflicts,” Ray said. In those settings, a safe repellent could discourage bees from establishing colonies where they are unwelcome, without resorting to lethal control. There are agricultural uses as well: some farming practices, particularly with seedless fruit varieties, aim to avoid pollination altogether, and a reliable repellent could help keep bees away from crops where pollination is undesirable rather than essential. According to Ray, the research is a step toward developing bee-friendly pesticide formulations — products that safeguard pollinators while still meeting the needs of modern agriculture.
“Protecting pollinators doesn’t have to come at the expense of food security,” Ray said. “With the right tools, we can strike a balance — and this model helps us get there. We believe our work will help guide further exploration of machine learning-guided solutions in environmental protection and sustainable farming practices.” Ray and Baer were joined in the research by Joel Kowalewski, Barbara Baer-Imhoof, Tom Guda, Matthew Luy, and Payton DePalma. The work was funded by a grant from the California Research Alliance by BASF. The research paper, titled “Machine learning of honey bee olfactory behavior identifies repellent odorants in free flying bees in the field,” was published in eLife on 23 September 2026, with the DOI 10.7554/eLife.104831.3. The authors note that Ray is founder and president of Sensorygen and Remote Epigenetics and holds equity in both companies, Kowalewski holds equity in Sensorygen, and several of the authors are inventors in a patent application covering the compounds discussed in the article. If the approach scales from honey combs to whole orchards, the humble trick of making treated flowers smell unappealing could become one of the more elegant tools in the effort to keep the world’s most important pollinators alive.
Subject of Research: Machine learning-guided discovery of odorant compounds that repel honey bees from pesticide-treated crops
Article Title: Machine learning helps identify chemicals that repel honey bees from pesticides
Article References: Machine learning helps identify chemicals that repel honey bees from pesticides. (n.d.). Original publication
Image Credits: AI Generated
DOI: Not provided
Keywords: honey bees, machine learning, pollinator protection, pesticides, olfaction, repellents, eLife, UC Riverside, colony collapse, sustainable agriculture, chemical ecology, Drosophila
Cite Scienmag News
Teresa Odom. (September 24, 2026). Machine learning finds scent compounds that steer honey bees away from pesticides. Scienmag. https://scienmag.com/machine-learning-finds-scent-compounds-that-steer-honey-bees-away-from-pesticides/
Teresa Odom. "Machine learning finds scent compounds that steer honey bees away from pesticides." Scienmag, 24 September 2026, https://scienmag.com/machine-learning-finds-scent-compounds-that-steer-honey-bees-away-from-pesticides/. Accessed 24 September 2026.
Teresa Odom. "Machine learning finds scent compounds that steer honey bees away from pesticides." Scienmag. September 24, 2026. https://scienmag.com/machine-learning-finds-scent-compounds-that-steer-honey-bees-away-from-pesticides/

