Kurtanjek Želimir
University of Zagreb Faculty of Food Technology and Biotechnology, Pierotijeva 6, 10000 Zagreb, Croatia.
Food Technol Biotechnol. 2024 Mar;62(1):102-109. doi: 10.17113/ftb.62.01.24.8301.
The aim of this study is to emphasize the importance of artificial intelligence (AI) and causality modelling of food quality and analysis with 'big data'. AI with structural causal modelling (SCM), based on Bayesian networks and deep learning, enables the integration of theoretical field knowledge in food technology with process production, physicochemical analytics and consumer organoleptic assessments. Food products have complex nature and data are highly dimensional, with intricate interrelations (correlations) that are difficult to relate to consumer sensory perception of food quality. Standard regression modelling techniques such as multiple ordinary least squares (OLS) and partial least squares (PLS) are effectively applied for the prediction by linear interpolations of observed data under cross-sectional stationary conditions. Upgrading linear regression models by machine learning (ML) accounts for nonlinear relations and reveals functional patterns, but is prone to confounding and failed predictions under unobserved nonstationary conditions. Confounding of data variables is the main obstacle to applications of the regression models in food innovations under previously untrained conditions. Hence, this manuscript focuses on applying causal graphical models with Bayesian networks to infer causal relationships and intervention effects between process variables and consumer sensory assessment of food quality.
This study is based on the data available in the literature on the process of wheat bread baking quality, consumer sensory quality assessments of fermented milk products, and professional wine tasting data. The data for wheat baking quality were regularized by the least absolute shrinkage and selection operator (LASSO elastic net). Bayesian statistics was applied for the evaluation of the model joint probability function for inferring the network structure and parameters. The obtained SCMs are presented as directed acyclic graphs (DAG). D-separation criteria were applied to block confounding effects in estimating direct and total causal effects of process variables and consumer perception on food quality. Probability distributions of causal effects of the intervention of individual process variables on quality are presented as partial dependency plots determined by Bayesian neural networks. In the case of wine quality causality, the total causal effects determined by SCMs are positively validated by the double machine learning (DML) algorithm.
The data set of 45 continuous variables corresponding to different chemical, physical and biochemical variables of wheat properties from seven Croatian cultivars during two years of controlled cultivation were analysed. LASSO regularization of the data set yielded the ten key predictors, accounting for 98 % variance of the baking quality data. Based on the key variables, the quality predictive random forest model with 75 % cross-validation accuracy was derived. Causal analysis between the quality and key predictors was based on the Bayesian model shown as a DAG graph. Protein content shows the most important direct causal effect with the corresponding path coefficient of 0.71, and THMM (total high-molecular-mass glutenin subunits) content was an indirect cause with a path coefficient of 0.42, and protein total average causal effect (ACE) was 0.65. The large data set of the quality of fermented milk products included binary consumer sensory data (taste, odour, turbidity), continuous physical variables (temperature, fat, pH, colour) and three grade classes of products by consumer quality assessment. A random forest model was derived for the prediction of the quality classification with an out-of-bag (OOB) error of 0.28 %. The Bayesian network model predicts that the direct causes of the taste classification are temperature, colour and fat content, while the direct causes of the quality classification are temperature, turbidity, odour and fat content. The key quality grade ACE of temperature -0.04 grade/°C and 0.3 quality grade/fat content were estimated. The temperature ACE dependency shows a nonlinear type as negative saturation with the 'breaking' point at 60 °C, while for fat ACE had a positive linear trend. Causal quality analysis of red and white wine was based on the large data set of eleven continuous variables of physical and chemical properties and quality assessments classified in ten classes, from 1 to 10. Each classification was obtained in triplicate by a panel of professional wine tasters. A non-structural double machine learning (DML) algorithm was applied for total ACE quality assessment. The alcohol content of red and white wine had the key positive ACE relative factor of 0.35 quality/alcohol, while volatile acidity had the key negative ACE of -0.2 quality/acidity. The obtained ACE predictions by the unstructured DML algorithm are in close agreement with the ACE obtained by the structural SCM.
Novel methodologies and results for the application of causal artificial intelligence models in the analysis of consumer assessment of the quality of food products are presented. The application of Bayesian network structural causal models (SCM) enables the d-separation of pronounced effects of confounding between parameters in noncausal regression models. Based on the SCM, inference of ACE provides substantiated and validated research hypotheses for new products and support for decisions of potential interventions for improvement in product design, new process introduction, process control, management and marketing.
本研究旨在强调人工智能(AI)以及利用“大数据”进行食品质量因果建模与分析的重要性。基于贝叶斯网络和深度学习的带有结构因果模型(SCM)的人工智能,能够将食品技术领域的理论知识与过程生产、物理化学分析及消费者感官评估相结合。食品具有复杂的特性,数据维度高,存在复杂的相互关系(相关性),难以与消费者对食品质量的感官认知相关联。标准回归建模技术,如多元普通最小二乘法(OLS)和偏最小二乘法(PLS),在横截面平稳条件下通过对观测数据进行线性插值有效地用于预测。通过机器学习(ML)升级线性回归模型可处理非线性关系并揭示功能模式,但在未观测到的非平稳条件下容易出现混淆和预测失败的情况。数据变量的混淆是回归模型在先前未训练条件下应用于食品创新的主要障碍。因此,本手稿着重于应用带有贝叶斯网络的因果图形模型来推断过程变量与消费者对食品质量感官评估之间的因果关系和干预效果。
本研究基于文献中关于小麦面包烘焙质量过程、发酵乳制品消费者感官质量评估以及专业葡萄酒品尝数据的可用数据。小麦烘焙质量数据通过最小绝对收缩和选择算子(LASSO弹性网)进行正则化处理。应用贝叶斯统计来评估模型联合概率函数,以推断网络结构和参数。所获得的结构因果模型以有向无环图(DAG)表示。在估计过程变量和消费者认知对食品质量的直接和总因果效应时,应用D - 分离准则来阻断混淆效应。单个过程变量干预对质量的因果效应的概率分布以由贝叶斯神经网络确定的偏依赖图表示。在葡萄酒质量因果关系的案例中,结构因果模型确定的总因果效应通过双重机器学习(DML)算法得到了正向验证。
分析了来自克罗地亚七个品种小麦在两年受控种植期间对应不同化学、物理和生化特性的45个连续变量的数据集。该数据集的LASSO正则化产生了十个关键预测变量,解释了烘焙质量数据98%的方差。基于关键变量,得出了具有75%交叉验证准确率的质量预测随机森林模型。质量与关键预测变量之间的因果分析基于以DAG图表示的贝叶斯模型。蛋白质含量显示出最重要的直接因果效应,相应路径系数为0.71,而高分子量麦谷蛋白亚基总量(THMM)含量是间接原因,路径系数为0.42,蛋白质的总平均因果效应(ACE)为0.65。发酵乳制品质量的大数据集包括二元消费者感官数据(味道、气味、浊度)、连续物理变量(温度、脂肪、pH值、颜色)以及消费者质量评估的三个等级类别。得出了用于质量分类预测的随机森林模型,袋外(OOB)误差为0.28%。贝叶斯网络模型预测,味道分类的直接原因是温度、颜色和脂肪含量,而质量分类的直接原因是温度、浊度、气味和脂肪含量。估计出温度的关键质量等级ACE为 - 0.04等级/°C,脂肪含量的关键质量等级ACE为0.3质量等级/脂肪含量。温度ACE依赖性显示为非线性类型,呈负饱和,在60°C时有“断点”,而脂肪ACE呈正线性趋势。红葡萄酒和白葡萄酒的因果质量分析基于包含物理和化学性质的11个连续变量以及分为十个等级(从1到10)的质量评估的大数据集。每个分类由一组专业葡萄酒品尝者进行三次重复评估。应用非结构化双重机器学习(DML)算法进行总ACE质量评估。红葡萄酒和白葡萄酒的酒精含量具有关键的正ACE相对因子0.35质量/酒精,而挥发酸具有关键的负ACE为 - 0.2质量/酸度。通过非结构化DML算法获得的ACE预测与通过结构化SCM获得的ACE非常一致。
展示了因果人工智能模型在食品产品质量消费者评估分析中的新颖方法和结果。贝叶斯网络结构因果模型(SCM)的应用能够在非因果回归模型中对参数之间明显的混淆效应进行D - 分离。基于SCM,ACE的推断为新产品提供了有根据且经过验证的研究假设,并为产品设计改进、新工艺引入、过程控制、管理和营销等潜在干预决策提供支持。