Artificial intelligence is turning out to be a major help in tackling the tough global issue of keeping our food safe.

Food safety is all about making sure people everywhere can get their hands on enough good, affordable food that meets their health and cultural needs, keeping them fit and active. Right now, this challenge is getting even tougher due to a mix of big problems like conflicts, money woes, wild weather, and growing gaps between the rich and poor, making everything feel more uncertain.

These big issues, highlighted by the UN’s food group, get worse because of personal and community stuff like not having much education, weak community ties, little to no community support, not much money in the family, or jobs being hard to find. It’s a mix of problems that really shows how shaky our global food system is.

And it’s not a new problem either. Back in 1973, Horst Rittel and Melvin Webber from the University of Berkeley already tagged food safety as a “wicked problem” – these are the really tricky issues that are complex, full of contradictions, and always changing, making them super hard to solve for good. Every “wicked” problem is linked to other issues and can be tackled in many ways.

That’s why sorting out food safety needs solutions that can flex and change with the real world. With global food safety concerns on the rise, AI steps in with its knack for sifting through huge piles of complex data, spotting patterns and trends that humans might miss, and playing out the what-ifs of complicated, connected scenarios on a big scale.

AI, especially with its smart predictive learning and big language models, is already being put to work predicting crop yields, figuring out where supply chains might break, seeing how climate change could mess with farming, and making farming yields better.

Loads of researchers think AI has huge potential to help make our food system more robust, economically and environmentally, in the years ahead: AI-driven digital twins, backed by better and more complete weather data, could pave the way for new decision-making tools, adaptive systems to keep an eye on and manage supply chains, forecast the weather in the medium to long term, and automatic heads-up systems for extreme weather.


Food insecurity is known as a “wicked problem” because it’s complex, full of contradictions, and always changing. It’s affected by a mix of big-picture issues like wars, economic downturns, wild weather, and social gaps, plus personal and local stuff like not having enough education or money. This really shows how shaky our global food system is and highlights the need for solutions that can flex and adapt to meet these challenges head-on.
Thanks to its knack for digging through heaps of data and spotting the complicated patterns, AI steps up as a key player in making our food supply safer. It’s being used in all sorts of ways, from making crops grow better to keeping supply chains running smoothly, from figuring out how climate change could hit us to spotting contamination risks early on. So, AI is playing a big part in making our food system more bulletproof.
Keeping an eye on diseases that come from food is super important to stop outbreaks and boost food safety. Tools powered by AI, like the YOLO app that can quickly find bacteria in food, are proving to be really sharp ways to catch contamination risks before they become bigger problems.

Food safety, the impact on public health

To get the big picture, just look at some numbers from the World Health Organization (WHO)Every year, foodborne illnesses cause 600 million cases and lead to 420,000 deaths, plus a whopping 33 million years of life are lost when you adjust for disability. Despite a lot of effort, we’re not really making a dent in reducing these diseases, with infection rates holding steady in loads of countries, including the US, which hasn’t hit its reduction goals. Fighting foodborne diseases is tricky because of issues like not having good enough watch systems in place in many places, the huge variety in our food supply system, and all sorts of pathogens that have different ways of spreading and contaminating.

Food safety: artificial intelligence to the rescue

Even the WHO says keeping an eye on diseases from food is key and we need to get better at understanding what the data tells us. Here’s where artificial intelligence (AI) can really make a difference in food safety, with its super skills in making sense of data and spotting trends, offering fresh ways to keep foodborne bugs in check.

A study called “How can AI improve Food Safety,” published by folks from Cornell University in New York, points out that AI tools are pretty slick at flagging early when and where there’s a big risk of food getting contaminated or when nasty bugs might be around. This is backed up by studies that used smart predictions to figure out when water used in farming might get contaminated and when pathogens might pop up in growing areas.

In managing how food gets from farm to fork, using AI can help make smarter choices about how we treat and collect water, which is also good news for public health.

For example, AI can help us decide when and where we might need to check more often or take action, based on risks of contamination going up. Plus, AI has the potential to get even better at predicting the risks of bugs that can make our food unsafe.

Take how AI helped with COVID-19 testing through something called qPCR (quantitative polymerase chain reaction). It showed that AI could take PCR results and add in totally different kinds of data (like CT scans) to spot the virus more accurately. If we use this approach with food, we could mix qPCR data, which helps identify pathogens, with other info about the same sample (like how murky the water is, or its pH) to better spot pathogens in raw materials.

A specific application: YOLO

One of the coolest studies out there that shows how AI can be a game-changer in food safety comes from UC Davis. They’ve shown that AI, teamed up with optical imaging, can quickly and accurately spot harmful bacteria in food. 

They used an algorithm called You Only Look Once (YOLO, version 4), and it’s been a game changer because it’s simpler, cheaper, and quicker than the old-school ways of finding pathogens.

With just digital photos of romaine lettuce, this AI software could spot tiny colonies of bacteria, proving to be super accurate (we’re talking 94% precision) at finding E. coli contamination fast, way faster than other methods.

This means food companies now have a nifty new tool to quickly find and deal with contamination, slashing the long waiting times usually needed with traditional methods that grow cultures from microbes.

What’s YOLO all about

YOLO stands for “You Only Look Once” and it’s a smart way to detect objects in photos or videos. Unlike the older methods that take two steps – first finding areas that might have something interesting and then figuring out what those areas contain – YOLO does it all in one go. It looks at the whole image at once and predicts where objects are and what they are.

This makes the whole process not just simpler but super fast, allowing it to work in real time, which is perfect for things like self-driving cars, keeping an eye on places, or even robotics.

YOLO has been getting better over time, with versions like YOLOv3, YOLOv4, and YOLOv5 bringing in big improvements in detecting objects more accurately, pulling out features from images better, and being more efficient.

The big pluses of YOLO include being able to detect objects on the fly, its straightforward end-to-end approach, being really efficient with computing power so it balances being accurate with not needing a supercomputer, and being versatile across different kinds of objects and scenarios, making it super useful for loads of practical stuff.

How YOLO experimentation rolls out

So, the study set out to whip up a quick and easy bacteria detection method using the standard gear for growing bacteria and taking a close look under the microscope stuff you’d usually find in the food industry. The trick was to use AI to spot the tiny differences between clusters of bacteria. There were two main parts to the experiment.

Growing bacteria and taking pics with white light

Here, they kept an eye on how E. coli bacteria grew by using a special microscope to see the best time to spot these tiny bacterial communities. They found out that just one bacterium hanging out on a surface can turn into a massive group of thousands in about 5 hours.

As they grow, these clusters stretch and expand in different ways because of the push and pull between the new cells. After a bit, they start to grow outwards, making the clusters rounder and more even. Around 3 hours after they start growing, they begin to stack up into layers, and their growth rate shoots up.

Spotting them in real-time with the YOLOv4 algorithm

Based on how these bacteria were growing, they decided that checking in on them after about 3 hours was best, since there’s more bacteria to see and their setup is more complex, which is great for figuring out what kind of bacteria they are. They also did some number crunching to figure out how many bacteria were in these clusters.

What’s really cool is that they found YOLO could tell the difference between various types of bacteria, even different kinds of E. coli, showing that AI isn’t just good at finding bacteria but can also tell them apart. This is super important for stopping diseases from spreading before they start.

Glimpses of Futures

As the food industry delves into integrating AI into its safety systems, adopting technologies like YOLO holds the promise of raising food safety standards. These tools can not only automate safety inspections but also give consumers more confidence in the safety of their food. However, the journey towards widespread implementation will need collaboration among researchers, the industry, and regulators, along with ongoing commitment to research and development to overcome existing challenges and fully leverage AI’s potential in preventing foodborne illnesses.

With the aim of anticipating future and alternative scenarios, let’s now try to evaluate – through STEPS matrix – the impacts that the evolution of AI techniques applied to food safety could have from a social, technological, economic, political and sustainability.

S – SOCIAL: globally, food safety is ensured through the collective efforts of everyone involved in the food supply chain: national authorities setting guidelines and standards, food producers adopting best practices, traders abiding by regulations, and consumers being aware of safe food handling practices. It’s a shared responsibility. As agri-food systems evolve and face increasing challenges, food safety must keep up with ongoing changes. Policies, guidelines, standards, and regulations related to food safety need to be updated or further developed to reflect the changing needs within the current system. Addressing critical gaps in food safety will enhance the efficiency and resilience of agri-food systems and, ultimately, help achieve food security while ensuring global public health.

T – TECHNOLOGICAL: the implementation of AI systems like YOLO in the food industry has the potential to revolutionize the distribution chain, enabling swift identification and intervention that can prevent the spread of contaminated foods. This means products can be tested and confirmed safe for consumption much more quickly, reducing the risk of outbreaks and improving operational efficiency for food companies. An interdisciplinary approach that combines expertise in microbiology, engineering, computer science, and food science is required.

E – ECONOMIC: the relatively low penetration of AI in food safety seems to be due to the limited availability of data needed to develop and implement AI tools for food safety applications, with the main limitations being (a) the slow speed and high cost of collecting microbial data and (b) the limited sharing of microbial data, due to industry concerns over data privacy and the commercial and reputational risk that could be associated with data sharing. In some cases, stakeholders in the food industry may be hesitant to develop and adopt AI technologies for food safety, fearing that these tools might negatively impact their commercial interests. This concern is not limited to data sharing that might be required but can also extend to fears that AI tools, if available to others, could be used to predict whether a specific company (for example, the company that provided data for the tool’s development) has a higher food safety risk. The lack of a clear legal and regulatory framework regarding AI applications and the protection of sensitive data needed to power such applications can exacerbate these concerns.

P – POLITICAL: with over 800 million people worldwide regularly suffering from a lack of adequate and healthy food for their lives, food safety is a global issue, destined to intensify due to strong political instability and the weakness of many institutions. According to the study “The Impact of Political Risk and Institutions on Food Security”, internal and external conflicts, socioeconomic conditions, corruption, military presence in politics, religious tensions, ethnic tensions, and poor bureaucracy quality worsen food security in developed and developing countries. While government stability, the role of law and order, democratic accountability, and the investment profile significantly and positively influence food supply.

S – SUSTAINABILITYFood safety and sustainability go hand in hand. The numerous examples of large-scale outbreaks and recalls involving products ranging from leafy greens to meat to berries result in the removal from the market of millions of pounds of product, which are then destroyed, usually in landfills. According to information available from the U.S. Environmental Protection Agency (EPA), 75 percent of all food waste ends up in landfills, 18 percent is incinerated with energy recovery, and only 6 percent is composted. Sustainability, like food safety, embraces the entire supply chain, and everyone involved in food production can implement sustainable practices. This ranges from production agriculture and the use of natural and synthetic resources, along the supply chain during production and processing, to retail and consumption levels, with composting, packaging, recycling, and many other practices used to meet future production needs.

Written by:

Maria Teresa Della Mura

Giornalista Read articles Look at the Linkedin profile