A majority of African countries are losing billions of dollars of foreign exchange annually through food imports. In 2022, 38 countries had a negative trade balance in agricultural products, with Algeria, Egypt, Nigeria, Morocco and Angola leading the ranking with more than $3bn lost over the year.
Set this against two important facts: that agriculture remains a main source of revenue for many households, contributing close to 23% of sub-Saharan Africa’s GDP and employing more than 60% of its population; and that the continent has 65% of the world’s remaining uncultivated arable land.
The trade imbalance also weighs on countries’ fiscal health. When they cannot compensate through other exports – such as oil in the case of Nigeria, Angola, and Algeria – countries become extremely vulnerable to external shocks.
Recent disruptions in the cereal value chain due to Russia’s cancellation of the Black Sea grain deal and blockade of Ukrainian supplies have focused minds on the need for agricultural reform in Africa.
These disruptions coincided with a year marked by unprecedented development in the field of artificial intelligence (AI).
AI’s use in almost all sectors, including agriculture, is seen as a powerful productivity-enabler. But can AI really increase Africa’s production of local food and curb trade imbalances?
Read more about African agriculture
- ‘Africa must substitute food imports by producing locally’
- Agrifinance grows in importance as farmers seek scarce capital
- Africa’s lack of food processing capacity is a missed economic opportunity
AI in agriculture: hopes for Africa’s productivity
Though AI has recently been the subject of much hype, it was being considered as a tool to help farmers improve their income at least two years ago. In 2021 Daphney-Stavroula Zois, a professor of electrical and computer engineering at the State University of New York at Albany in the US, worked with the non-profit AGRI-WEB to help smallholder farmers in Ghana develop better prediction models for their crop yields using artificial intelligence. But “there are many other uses of AI,” she says.
“Examples include, but are not limited to, predicting crop amounts; providing guidance on irrigation; when, where and what to plant; what price they should sell their products at and to whom; as well as predicting droughts and other major events that can affect farming activities,” Zois says.
Her project was one of 30 funded by Google as part of its “AI for Social Good” programme – an initiative aimed at supporting scientific advances for communities who rarely benefit from AI.
Other Google-funded AI projects in agriculture in Africa have included the development of a smartphone app for disease diagnosis in Uganda and of a model to monitor grassland quality and estimate local market prices in Kenya.
Developers of technologies that have already proved helpful for farmers are also looking at AI to enhance their services. The US-based global development organisation Global Communities developed an app called “Afriscout,” which provides semi-nomadic pastoralists with custom digitised maps of traditional grazing areas overlaid with satellite-derived vegetation information to improve migration decision-making.
A study found that pastoralists who used Afriscout maps increased their wealth by more than $4,600, over a two-year period, relative to those who did not have access to the service. Afriscout wants to leverage AI “to optimise grazing plans for land and herd health”.
“Sound use of AI can definitely help farmers address both short- and long-term issues with farming activities,” believes Zois. “It can also guide them through market globalisation,” she says.
Obstacles to AI adoption: data and funding limitations
Recent developments in AI lead the more optimistic to think that a scalable solution in the African agriculture sector might appear in the coming years. But large-scale adoption by farmers is still a distant goal.
“The most challenging issue is access to infrastructure and quality of data,” says Zois. “Current state-of-the-art AI algorithms depend on high-quality data and access to infrastructure… but collecting such data and processing them with the available infrastructure is prohibitive due to cost,” she says.
Top-performing AI models are extremely data-hungry. First, a model is “trained” with labelled data. For example, given enough labelled photographs of diseased cassava crops, computer systems can be taught to distinguish between images of “infected” and “healthy” crops. Then, the model is evaluated on an unseen data set, called the “test set” or “validation set”.
All of that requires a great amount of resources – which are available only to companies that have significant venture capital (VC) funding or other investment, for example. OpenAI, the company behind ChatGPT, received $1bn initial funding in 2015 from investors such as Amazon and Elon Musk, enabling it to pay for top AI researchers.
According to the venture capital database Pitchbook, nearly half of the funding for AI and machine learning startups worldwide in the first three months of 2023 – approximately $11.1bn – went to Silicon Valley companies. By contrast, AI-focused African startups have raised a cumulative $255m since 2020, with Tunisia-based InstaDeep accounting for half of this.
The share for agriculture-focused startups is even more limited, despite the recent success story of Kenyan climate tech startup Amini raising $2m in a pre-seed funding round from an EU-based VC. Amini developed a data aggregation platform to help food and beverage companies in Africa make informed production decisions.
Other startups on the continent have leveraged existing algorithms to develop solutions for farmers.
Abuja-based Rural Farmers Hub, which received a $200,000 seed investment last year, is providing farmers with advisory services guided by satellite-based remote imagery.
“The current solution we leverage is trained on satellite imagery data (these data come in several bands and are referred to as multispectral data). Depending on what is being monitored, we can select specific bands or combine multiple bands (obtaining a band ratio): this is also called feature extraction,” says Isah Abdul-Azeez, a machine-learning engineer at Rural Farmers Hub.
“In-house, we have researched extensively on both satellite imagery (at different depths) and microwave links; these products are still a work in progress.” Isah says he mostly uses datasets that are available open-source.
Kenya-based Farmingtech is also using AI innovation with a limited budget. The startup, which won a $500,000 grant last February from the global non-profit Heifer International, has implemented an AI tool into its “DigiCow” app, aiming to increase the productivity of dairy farmers.
“AI enables us to understand herd structures in locations, understanding new additions and deaths; this supports future predictions on key things such as milk expected to be produced,” says Ronnie Kimani, regional sales manager at DigiCow.
But even if startups such as DigiCow and Rural Farmers Hub manage to raise enough money to build their own in-house algorithm, some think that AI could have negative implications.
“There are various players in the system that can maliciously take advantage of AI to guide market prices and beyond,” says Zois.
“If AI systems are prone to attacks – such as messing up the data used to train the model – it will be very easy to make AI systems prone to errors. These will, in turn, result in prediction errors that can give wrong guidance to farmers, messing up farming activities and beyond.”
Other structural issues, such as power relations between countries, cannot be resolved using only high-technological tools.
For instance, one problem that has long been decried by economic observers on the continent is the impossibility for African farmers of competing with European- and US-subsidised agriculture. The European Union spends a third of its budget on agricultural subsidies, enabling its farmers to export cheap products to African consumers.
AI can be freely developed by those who indirectly harm Africa’s agricultural sector; the factors that led to major trade imbalances for countries on the continent might be exacerbated in the future. “AI can very easily learn from human behaviour and copy all the bad traits,” says Zois.
Want to continue reading? Subscribe today.
You've read all your free articles for this month! Subscribe now to enjoy full access to our content.
£8.00 / month
Receive full unlimited access to our articles, opinions, podcasts and more.
£70.00 / year
Our best value offer - save £26 and gain access to all of our digital content for an entire year!