Friday 14 June 2024
  • La Cimbali

Artificial Intelligence optimizes coffee blending

Until now, coffee experts relied on a process of continuous trial and error to come up with blends – possibly an ideal job for some, but this is also a highly customized and laborious process that requires specific knowledge of the coffee market and consumers

Must read

  • TME - Cialdy Evo

STUTTGART, Germany – Artificial Intelligence (AI) can predict and improve the desired taste, quality, or price for food products such as coffee. This is the result of a Danish-German collaboration project, in which Fraunhofer IPA tested how AI can provide computational support. The experts audited an AI application for the food industry for the first time. Coffee is part of everyday life for many people.

Some like it stronger and more acidic, while others prefer a milder aroma – the range of preferences is huge. To create the different tastes, coffee manufacturers can choose from around 200 bean varieties worldwide and blend them to create a flavor profile with specific characteristics. As such, there are billions of possible combinations.

A question of taste

Until now, coffee experts relied on a process of continuous trial and error to come up with blends – possibly an ideal job for some, but this is also a highly customized and laborious process that requires specific knowledge of the coffee market and consumers. This is because the flavor profile comprises various components such as body, acidity, aftertaste, and aroma.

Each component can achieve intensity levels on a scale of one to ten. In addition, the coffee market is subject to frequent price fluctuations, which coffee manufacturers must also take into account.AI is ideally suited to support and facilitate this and similar processes in the food industry.

That was the conclusion reached by the AI experts at Fraunhofer IPA after reviewing algorithms developed by the research institution “Danish Technological Institute” (DTI) as part of an audit and offering some suggestions for revision. DTI had developed the algorithms for the Danish coffee manufacturer BKI foods a/s with the aim of optimizing coffee roasting with regard to the aforementioned criteria of taste, quality, and cost.

AI model solves optimization problem

Technically speaking, this is a classic optimization problem: What must a coffee manufacturer do to create a specific flavor profile at a specific price? DTI modeled this problem by way of a prototype and a neural network.


Different data such as bean types, blends, and tastes formed the basis here, although the difficulty was that neural networks normally learn from a huge amount of data and from many past examples. In this case, however, the database was very small. In their audit, the IPA experts therefore recommended dispensing with the neural network and instead using a model with a simpler structure and fewer parameters.

Ultimately, a new model featuring fewer than ten parameters was used.

In addition, the IPA experts divided the optimization problem into two smaller sub problems:

1) What is the optimal blend for a specific flavor profile, given a certain pre-selection of beans?

2) Which beans are best-suited for this, also in terms of price? DTI proposed using what is known as a genetic algorithm, which can solve combinatorial problems by “trial and error”, with other algorithms also used to supplement this.

The simplified model also has the advantage of acting more predictably than neural networks. The latter are commonly referred to as “black boxes” because even experts are often unaware as to how exactly a result was actually obtained.

This lack of ex-plainability can reduce trust in an AI application and is often a legal hurdle as well.

Advantages of the new AI-based solution

The benefits for BKI are that employees can spend time on other tasks. Additionally, the company achieves cost savings and far greater flexibility in the purchasing process as it is no longer dependent on importing special types of coffee beans from specific regions around the world. By leveraging the benefits of AI, the same taste can be achieved as before, but based on other and new blends of raw coffee than was previously the case.

This creates flexibility in the company’s purchasing process, which is crucial in a market where sudden events can make it difficult to import certain types of raw coffee from abroad.

International knowledge exchange

The collaboration between the partners took place within the framework of a special funding format. The basis for this was the AI-based application that DTI developed for the Danish coffee manufacturer BKI. The partners jointly won the Danish AI Award for this application. In turn, Denmark’s cluster for manufacturing, MADE, promotes research and development activities in the manufacturing sector.

International Demonstration Projects represent a special MADE project format that aims to provide Danish SMEs with expertise from abroad in order to address specific challenges or test new production technologies.

In this context, MADE commissioned Fraunhofer IPA to audit the AI application developed by DTI. Since the project, BKI has implemented a variation of the recommendations from Fraunhofer IPA.

For example, this means that BKI changes the way they train the model by using new data. In addition, several points from the researchers led to changes that significantly improved the performance of the model.

Finally, the International Demonstration Project has generated greater trust in the model, which has shifted the focus onto implementing the model in day-to-day work.


Latest article

  • Franke Mytico
  • Dalla Corte