Technology, including AI, increasingly plays a key role in our food chain

December 9, 2021

Dec 9, 2021
By Ian Gormely

Hannah Szentimrey grew up on a farm, but she didn’t want to be a farmer. Yet even after achieving a graduate degree in computer engineering, she felt pulled back to the agriculture sector. Today, the 26-year old works as a machine learning software developer at a food technology company. 

Szentimrey’s journey is increasingly indicative of the food chain in Ontario where the story of how our food travels from farm to table is increasingly one about technology.

Raised just south of Cambridge, ON, Szentimrey’s family grew the soybeans, oats, and barley that they processed and stored in a grain elevator. They also raised chickens. “There are about 15 or 16,000 chickens,” she says. “We get a flock every nine weeks.”

By the end of high school, she had decided that “this farming thing is not for me,” and started studying computer engineering at the University of Guelph (U of G). Near the end of her undergrad, she took a course on modeling complex systems. “It took the approach of looking at social economics,  problems like the economy or housing, trying to look at them from a different point of view. Near the end of the course that extended in machine learning, which I found really interesting.”

While completing her Masters during which she focused on field programmable gate arrays (FPGAs), using ML to speed up the configuration of computer hardware, she became one of the first Vector Scholarship in AI recipients. But in looking for a job after finishing grad school, she realized she wasn’t as finished with the farm as she’d once believed. “I still wanted to work in agriculture and apply my machine learning skills to the field.” 

After participating in Vector career fairs and attending the Vector and Phase AI-led Acing Data & AI Interviews session, she landed an ML software developer position at Waterloo, ON-based P&P Optica, which uses a proprietary ML model to identify and weed out foreign objects from food products during food processing. 

From GPS-guided tractors to precision agriculture, technology, including AI models, plays a far greater role in the growth, production, and distribution of our food than many people know.  “It’s something that affects people every day,” says Vector interim research director Graham Taylor. “But I think people tend to ignore what’s going on in the background.”

“The adoption of new technologies in agriculture like AI promises to improve productivity while finding efficiencies within existing systems,” says Lisa Thompson, Minister of Agriculture, Food and Rural Affairs of Ontario. Our government’s Agri-tech Innovation Program continues to be a driving force for Ontario’s competitiveness in the agriculture sector, and the new Innovator Stream will be key to protecting our workforce while ensuring long-term success.

Taylor, who leads the Machine Learning Research Group at U of G, taught the modeling complex systems course that piqued Szentimery’s interest in ML. He’s also brought his own considerable ML skills to bear in agriculture over the last several years, helping with the modeling for the annual Canadian Food Price Report. 

Since 2009 the report, produced by Dalhousie and U of G, University of British Columbia, and University of Saskatchewan forecasts food prices over the upcoming 12 months. But in recent years, the traditional methods of econometrics that were used to make those predictions have been complimented by predictive machine learning models. “Representation learning and deep learning are very good at taking many variables, learning some useful representation from them, and making a prediction, which in this case is the future consumer price index (CPI).” 

This year’s report suggests that food prices will increase by 5 to 7 percent in 2022, a roughly $950 increase for a family of four from last year. The effects of COVID-19 will continue to be felt, driving food insecurity issues around. Meanwhile, the growing challenges of climate change will impact transportation and labor market challenges. 

In calculating these predictions, Vector’s Applied Machine Learning  Scientist Ethan Jackson and Applied Machine Learning Intern Sara El-Shawa took a different tack than in past years. “The machine learning dream is to put everything in a black box,” says Taylor, in this case over 300 different economic variables downloaded from Statistics Canada and the Federal Reserve Economic Data database. “You hope that machine learning sorts it out and, with the additional inputs, your predictions get more accurate.” However, that’s proven to not be the case. 

Instead, Jackson and El-Shawa employed three models, including a multi-task learning model called N-BEATS that was developed by Vector’s sister institute, Mila and Element AI in Montreal. Instead of basing the prediction on all those economic variables, N-BEATS is univariate, meaning it only uses the historical CPI to predict future CPI. However, in learning to forecast, it trains not only on CPI but on each of the individual economic time series. “N-BEATS learns a general representation for time series forecasting by considering all these individual forecasting tasks at the same time.”

On the surface, AI and agriculture appear to be worlds apart. But the two industries have quickly become entwined. As a world leader in both, Ontario stands to benefit greatly from this mingling of skillsets.

Read the full Canadian Food Price Report here.

Related:

Vector logo blog image

Vector Institute partners with World Economic Forum on responsible artificial intelligence and research insights

Vector logo blog image

Vector Institute 2022-23 annual report: accelerating AI in Ontario

How SMBs can manage the opportunities and risks of deploying AI