Make-Sense-of-your-Data
Search
Close this search box.

Beer Flavour Optimisation

Background

Beer-Flavour-FeaturesMany of us work in an industry where the consumer is king. We are constantly trying to evolve our products to satisfy the consumer’s changing requirements whilst at the same time always looking for the opportunity to develop niche products for new markets. However, the relationship between beer flavour and its chemical analysis is poorly understood.

Should it prove possible to predict final beer flavours according to their chemical composition, then it would open up the possibility of ‘tuning’ such products to meet the expectations of the consumer. The challenge is “Can Beer Flavour Be Predicted From Analytical Results?

Substantial empirical data exists, in disparate data sources, concerning product chemical and sensory analysis. Currently, there is no mechanism for linking them to each other. Any such relationships are undoubtedly complex and highly non-linear.

The Solution

Beer-Flavour-ModelIn order to identify such relationships, a neural network was used. Neural networks can be visualised as a mechanism for learning complex non-linear patterns in data. A key differentiator from other computer algorithms is that to a very limited extent, they model the human brain. This allows them to learn from experience. A key requirement during training is that overtraining should be avoided thus ensuring that only generalised models are developed which perform equally well on both in-sample and out of sample data. This was achieved using a technique called ‘Cross Validation’. The robustness of such models can be tested using out of sample data where the actual value of a particular flavour can be compared with the predicted value determined from the model. The Flavour Prediction graph shows that the flavour value predicted by the model (blue line), is generally in good agreement with the measured value (red line) as determined by the sensory panel. This indicates that the model is robust.

Flavour-Sensitivity-AnalysisOnce a robust model has been created, it is possible to disturb the values of the input parameters (features), one at a time and measure the impact they have on the output (Flavour). In this way, it is possible to create a sensitivity analysis for each flavour. Based on the adjacent graph, it can be seen that the dominant features for this particular flavour are: OPG, followed by PG, FR, pH and DMS. Thus, if we wanted to impact flavour ‘X’, then all other things being equal, it would need to change OPG.

In reality, flavours are all interrelated. It is a gross simplification to suggest that modifying a single feature would only impact a single flavour. 

Beer-Flavour-OptimiserThe limitation of these models is that they only predict in one direction. That is, they will only predict sensory flavours from the analytical inputs (features). It would perhaps be more useful if they could be reversed so that given a target sensory characteristic, perhaps for a new product, they would calculate the values for the various analytical inputs. Hence, this problem becomes an optimisation, one in which we are trying to determine the values for the various analytical input to give the required flavour profile. The problem is made more complex as there are various process constraints around these analytical values. As an example, the alcohol must be in the range X.

Needless to say, this problem cannot be solved by conventional algebra but can be solved using genetic algorithms. The basis of this technique is very simple, Darwin’s theory of evolution, and specifically survival of the fittest. Much of the terminology is borrowed from biology. A  population is made up of a series of chromosomes with each chromosome representing a possible solution. A chromosome consists of a collection of genes which are simply the variables to be optimized. A genetic algorithm creates an initial population (a collection of chromosomes), evaluates this population, and then evolves the population through multiple generations. At the end of each generation, the fittest chromosomes i.e. those that represent the best solution, from the population are retained and are allowed to crossover with other fit members. The idea behind crossover is that the newly created chromosomes may be fitter than both of the parents if it takes the best characteristics from each of the parents. Thus over a number of generations, the fitness of the chromosome population will increase, with the genes within the fittest chromosome representing the optimal solution. The whole process is similar to the way in which a living species will evolve to match its changing environment.