A Digital Approach to Model Quality and Sensory Traits of Beers Fermented under Sonication Based on Chemical Fingerprinting

: The development of digital tools based on artiﬁcial intelligence can produce a ﬀ ordable and accurate methodologies to assess quality traits and sensory analysis of beers. These new and emerging technologies can also assess new products in a near real-time fashion through virtual simulations before the brewing process. This research was based on the development of speciﬁc digital tools (four models) to assess quality traits and sensory proﬁles of beers produced using sonication and traditional brewing techniques. Results showed that models developed using supervised machine learning (ML) regression algorithms based on near-infrared spectroscopy (NIR) were highly accurate in the estimation of physicochemical parameters (Model 1; R = 0.94; b = 0.91). Outputs from Model 1 were then used as inputs to obtain estimations of the intensity of sensory descriptors (Model 2; R = 0.99; b = 0.98), liking of sensory attributes (Model 3; R = 0.97; b = 0.99), and the classiﬁcation of fermentation treatments using supervised classiﬁcation ML algorithms (Model 4; 96% accuracy). These new digital tools can aid craft brewing companies for product development at lower costs and maintain speciﬁc quality traits and sensory proﬁles, creating original styles of beers to get positioned in the market.


Introduction
The craft beer industry is growing around the world, which has been driven by the increased requirements of higher quality of beers by consumers [1][2][3]. However, there is minimal reliance on scientific tests, such as physicochemical or sensory analysis of beers produces, making the process dependent on the brewer's experience and trial and error, especially in craft breweries. Some of the larger brewing companies rely more on the familiarity of products and styles, which are maintained with sensory and physicochemical analyses commonly made in-house and using traditional methods, which are time-consuming and expensive [4][5][6][7].
Some important quality traits of beers related to the visual attributes, such as foamability and bubble size, have been shown in previous research to be one of the first unconscious assessments from consumers [3,[8][9][10][11][12], which are also important parameters to aid in the release of flavor, aromas, and the avoidance of oxidation of beer that can produce off-flavors [3,[13][14][15]. These specific traits can be achieved through the selection of materials for the brewing process and the fermentation type chosen to achieve a specific style [14,16]. However, it has been recently demonstrated that foamability, foam stability, bubble size, and beer organoleptic perception by consumers can be modified in beers through a sonication process (audible frequencies) applied either in the fermentation or carbonation part of the brewing process [17]. Similar effects have been observed in the application of sonication of carbonated water [18].

Sample Preparation
Triplicates of two bottles obtained from three batches of three different treatments (N = 54) of English-style India Pale Ale beers (IPA, Berlin IPA, BrewBaker, Berlin, Germany) were used for the study. All samples were prepared using the PicoBrew S machine (PicoBrew, Seattle, WA, USA). The treatments applied were the (i) control, (ii) sonication applied during the fermentation, and (iii) sonication applied during the natural in-bottle carbonation ( Table 1). The sonication treatments consisted of the application of audible sounds at five different frequencies (20, 30, 45, 55, and 75 Hz at −4 dB) for 5 min (1 min for each frequency) using two sub-woofers Response CW2199 (Jaycar Electronics, Sydney, NSW, USA), a DigiTech AA0479 amplifier (DigiTech, Sandy, UT, USA), and an Audio Function Generator application (Thomas Gruber) for iPhone (Apple Inc., Cupertino, CA, USA; Figure 1), as described by Gonzalez Viejo et al. [17,18]. dB uses a logarithmic scale in the master volume; therefore, a negative value as the one used for this study (−4 dB) means that there are some soundwaves physically present, but they may not be audible.

Physical Measurements-RoboBEER
Each bottle/replicate from each batch and treatment was analyzed for physical parameters related to foam and bubbles, as well as alcohol gas release and carbon dioxide (CO2) release using the RoboBEER robotic pourer (The University of Melbourne, Parkville, Vic, Australia) [16]. A 5-min video of the beer pouring was recorded and analyzed using computer vision algorithms developed in Matlab ® R2020a (Mathworks, Inc., Natick, MA, USA), as described by Gonzalez Viejo et al. [16]. The parameters and abbreviations obtained from this analysis are shown in Table 2. Near-infrared (NIR) absorbance values within the 1596 -2396 nm range were measured using a microPHAZIR™ RX Analyzer (Thermo Fisher Scientific, Waltham, MA, USA). As described by Gonzalez Viejo et al. [22], Whatman ® filter paper (quality grade 3; diameter: 7 cm; Whatman plc. Maidstone, UK) was soaked in the beer samples (N = 54) at room temperature (20-23 °C) and measured with the device with the white background on top to avoid the interference of any signal noise from the environment. Additionally, the means of triplicate readings of the dry filter paper

Physical Measurements-RoboBEER
Each bottle/replicate from each batch and treatment was analyzed for physical parameters related to foam and bubbles, as well as alcohol gas release and carbon dioxide (CO 2 ) release using the RoboBEER robotic pourer (The University of Melbourne, Parkville, VIC, Australia) [16]. A 5-min video of the beer pouring was recorded and analyzed using computer vision algorithms developed in Matlab ® R2020a (Mathworks, Inc., Natick, MA, USA), as described by Gonzalez Viejo et al. [16]. The parameters and abbreviations obtained from this analysis are shown in Table 2. Near-infrared (NIR) absorbance values within the 1596-2396 nm range were measured using a microPHAZIR™ RX Analyzer (Thermo Fisher Scientific, Waltham, MA, USA). As described by Gonzalez Viejo et al. [22], Whatman ® filter paper (quality grade 3; diameter: 7 cm; Whatman plc. Maidstone, UK) was soaked in the beer samples (N = 54) at room temperature (20-23 • C) and measured with the device with the white background on top to avoid the interference of any signal noise from the environment. Additionally, the means of triplicate readings of the dry filter paper were subtracted from the soaked filters to remove the cellulose overtones and to obtain only the beer-related reflectance results. To enhance peaks and for plotting purposes, the Savitzky-Golay first derivative was obtained as a signal transformation method using The Unscrambler X ver. 10.3 (CAMO Software, Oslo, Norway).

Chemical Measurements
A pH meter (QM-1670, DigiTech, Sandy, UT, USA) was used to measure 50 mL of each replicate of each treatment at ambient temperature (~23 • C). The pH meter was previously calibrated with a buffer solution at pH 7.0. Furthermore, 60-mL samples were used to measure alcohol in the liquid using an alcohol meter Alcolyzer Wine M (accuracy: <0.1% vv −1 ; Anton Paar GmbH, Graz, Austria) in the wine extension mode. On the other hand, 150-mL samples were used to measure viscosity with a Brookfield viscometer DV-II+ (AMETEK Brookfield, Middleborough, MA, USA) and an RV02 spindle (50 rpm for 20 s; [17]).

Descriptive Sensory Session
A sensory session with 10 trained participants from The University of Melbourne (UoM; Ethics ID: 1545786.2) was conducted. All participants were regular beer consumers and trained according to the quantitative descriptive analysis (QDA ® ) method. The session was conducted in the sensory laboratory in a focus group-type room located in the Faculty of Veterinary and Agricultural Sciences of the UoM. Participants evaluated the triplicates (three batches) of each treatment, and these were served in 1-oz clear plastic cups at 4 • C. Samples were labeled with 3-digit random codes, and panelists were provided with water and water crackers to cleanse the palate. The assessment of visual attributes consisted of watching 20-s videos of the pouring of the samples using the RoboBEER to ensure all participants evaluated the samples under the same conditions. The BioSensory Application (App; The University of Melbourne, Parkville, VIC, Australia; [24]) was used to display the videos and questionnaire, which consisted of evaluating the intensity of sensory attributes in a 15-cm non-structured scale (Table 3; [17]).

Consumer sensory session
A sensory session was conducted with 30 regular beer consumers recruited via email from the staff and students from the UoM (ethics ID: 1545786.2). This session was carried out in individual booths with uniform white light-emitting diode (LED) lights at room temperature (~23 • C). Like the descriptive sensory test, the BioSensory app was used to display the questionnaire ( Table 4) and videos of the beer pouring for the visual assessment. Samples were labeled with three-digit random codes and served in 1-oz clear plastic cups at 4 • C; participants were provided with water crackers and water to cleanse their palate between samples.

Statistical Analysis and Machine Learning Modeling
Two correlation matrices were developed using Matlab ® R2020a to show significant (p < 0.05) correlations between (i) the physicochemical parameters and the intensity of sensory attributes from the descriptive test, and (ii) the physicochemical parameters and the liking of sensory attributes from the consumer test.
Three ML regression models were developed using ANNs with a customized code written in Matlab ® R2020a. This code was able to test 17 different supervised training algorithms to find the best model based on performance and the highest accuracy based on the correlation coefficient (R). Model 1 was developed using the NIR absorbance values (1596-2396 nm) as inputs to predict 12 physicochemical parameters (Table 2, plus pH, alcohol content, and viscosity). Model 2 and Model 3 were constructed using the outputs from Model 1 (physicochemical parameters) as inputs to predict the intensity of 21 sensory descriptors (Model 2; Table 3) and the liking of 11 sensory attributes (Model 3; Table 4). The three models ( Figure 2) were developed using the Levenberg Marquardt training algorithm with random data division (training: 70% samples; validation: 15% samples; testing: 15% samples). Performance was assessed using the means squared error (MSE) algorithm. Outliers from the overall models were evaluated based on the 95% confidence bounds.
Model 4 was based on pattern recognition and developed using a code written in Matlab ® R2020a, which was able to test 17 different supervised training algorithms to find the best model performance (data not shown). The Levenberg Marquardt training algorithm resulted the highest performance and accuracy. This model was constructed using the outputs from Model 1 (physicochemical parameters) as inputs to classify the samples into the treatments (control, SF, and SC; Figure 2). A random data division was used with 70% of the samples for training, 15% for validation, and 15% for testing. Performance was assessed using the means squared error (MSE) algorithm.  Figure 3a shows the NIR curves with the raw absorbance values; it can be observed that the major peak was 1927 nm, but there are other overtones present at 2270 nm and > 2300 nm. Figure 3b shows the curves using the first derivative of the NIR absorbance values, and enhanced peaks at 1759 nm, 1886 nm, 2074 nm, and > 2250 nm can be observed.  Figure 3a shows the NIR curves with the raw absorbance values; it can be observed that the major peak was 1927 nm, but there are other overtones present at 2270 nm and > 2300 nm. Figure 3b shows the curves using the first derivative of the NIR absorbance values, and enhanced peaks at 1759 nm, 1886 nm, 2074 nm, and >2250 nm can be observed. Figure 4a shows the significant correlations between the physicochemical parameters and the intensity of sensory descriptors assessed with the trained panel. It was found that MaxVol was positively correlated with FHeight (r = 0.80), TLTF, and LTF had a positive correlation with FStability (r = 0.74 and r = 0.77, respectively) and FHeight (r = 0.91 and r = 0.94, respectively). Furthermore, FDrain was positively correlated with AGrain (r = 0.75), while LgBubb had a negative correlation with alcohol gas release (r = −0.82). On the other hand, CO 2 had a positive correlation with FTexture (r = 0.77) and MAstringency (r = 0.73). There was a positive correlation between alcohol content and MCarbonation (r = 0.72), MAstringency (r = 0.77), MViscosity (r = 0.87), ASpices (r = 0.75), and AHops (r = 0.86). Figure 4b shows the significant correlations between the physicochemical parameters and the liking of sensory attributes from the consumer test. It can be observed that MaxVol, TLTF, and LTF had a positive correlation with flavor (r = 0.72, r = 0.71, and r = 0.79, respectively); additionally, TLTF and LTF had a positive correlation with LTBitter (r = 0.80, and r = 0.84, respectively). Likewise, LTF was positively correlated with LTSweet (r = 0.80) and overall liking (r = 0.74). Alcohol content had a positive correlation with LFTexture (r = 0.77), while viscosity was negatively correlated with overall liking (r = −0.76) and quality (r = −0.77).    Figure 4b shows the significant correlations between the physicochemical parameters and the liking of sensory attributes from the consumer test. It can be observed that MaxVol, TLTF, and LTF had a positive correlation with flavor (r = 0.72, r = 0.71, and r = 0.79, respectively); additionally, TLTF and LTF had a positive correlation with LTBitter (r = 0.80, and r = 0.84, respectively). Likewise, LTF was positively correlated with LTSweet (r = 0.80) and overall liking (r = 0.74). Alcohol content had a positive correlation with LFTexture (r = 0.77), while viscosity was negatively correlated with overall liking (r = -0.76) and quality (r = -0.77).   Table 5 shows the statistical data from the four ANN models constructed. It can be observed that Model 1 had a high overall accuracy (R = 0.94) to predict the 12 physicochemical parameters ( Figure  5a). Furthermore, this model had 4.9% (32 out of 648) of outliers based on the 95% confidence bounds. On the other hand, Model 2 had a very high overall correlation coefficient (R = 0.99) to predict the intensity of 21 sensory descriptors (Figure 5b), with 5.0% (57 out of 1134) of outliers calculated from the 95% confidence bounds. Similarly, Model 3 was highly accurate (R = 0.97) at predicting the liking of 11 sensory attributes (Figure 5c) and had 5.1% (30 out of 594) of outliers based on the 95% confidence bounds. The three models had a slope (b) close to the unity (b ~ 1). They did not present signs of under-or overfitting as the training performance was lower than the other stages, and the validation and testing performance were the same. All models presented similar results after several  Table 5 shows the statistical data from the four ANN models constructed. It can be observed that Model 1 had a high overall accuracy (R = 0.94) to predict the 12 physicochemical parameters (Figure 5a). Furthermore, this model had 4.9% (32 out of 648) of outliers based on the 95% confidence bounds. On the other hand, Model 2 had a very high overall correlation coefficient (R = 0.99) to predict the intensity of 21 sensory descriptors (Figure 5b), with 5.0% (57 out of 1134) of outliers calculated Fermentation 2020, 6, 73 9 of 12 from the 95% confidence bounds. Similarly, Model 3 was highly accurate (R = 0.97) at predicting the liking of 11 sensory attributes (Figure 5c) and had 5.1% (30 out of 594) of outliers based on the 95% confidence bounds. The three models had a slope (b) close to the unity (b~1). They did not present signs of under-or overfitting as the training performance was lower than the other stages, and the validation and testing performance were the same. All models presented similar results after several retraining attempts.

(a)
Model 4 presented a high overall accuracy (96%) to classify samples into the treatments (control, SF, and SC). Figure 5d shows the overall receiver operating characteristics (ROC) curve, which depicts the true positive (sensitivity) and false-positive (specificity) rates for each treatment. This model did not present signs of overfitting as the training performance was lower than the validation and testing, and the latter were close to each other. These models also presented similar results after several retraining attempts.

Discussion
The NIR curve developed with raw absorbance values (Figure 3a) is consistent with that reported by McClure and Stanfield for beers [25]. According to Wilson et al. [26], the peak at 1927 nm corresponds to an overtone of protein-bound water, while other authors have identified water at 1932 [25] and 1940 nm [27], which are also within the range of the major peak observed in the curve for the three beer treatments. Ethanol, which is one of the main components in beer, has been identified at 2270 nm [22,25], which was observed in both the raw and first derivative curves. Overtones found at 1740 -1760 nm correspond to thiol (S-H; [28]); this is an aromatic compound present in small

Discussion
The NIR curve developed with raw absorbance values (Figure 3a) is consistent with that reported by McClure and Stanfield for beers [25]. According to Wilson et al. [26], the peak at 1927 nm corresponds to an overtone of protein-bound water, while other authors have identified water at 1932 [25] and 1940 nm [27], which are also within the range of the major peak observed in the curve for the three beer treatments. Ethanol, which is one of the main components in beer, has been identified at 2270 nm [22,25], which was observed in both the raw and first derivative curves. Overtones found at 1740-1760 nm correspond to thiol (S-H; [28]); this is an aromatic compound present in small concentrations in hops and, therefore, in beer [29]. Starch has been identified at 1886 nm; this may be present in beer due to possible residues from the malt that may not have been fully converted into sugars [14]. Overtones at 2074 nm correspond to amines [30], which are present in beer, especially as biogenic amines [14]. On the other hand, peaks > 2250 nm correspond to overtones of proteins and carbohydrates [27], which are of high importance for beer quality, as these are responsible for foam formation and stability [4,14,16,17,22].
The correlations found between MaxVol and FHeight and between TLTF, LFT, and FStability indicate that the panelists were well-trained and are in accordance with the relationships found by Gonzalez Viejo et al. [16] using commercial beer samples and a QDA ® trained panel. The negative correlation between LgBubb and alcohol gas release may be due to the breakage of large bubbles, which aids in the release of the gas that conforms them. On the other hand, CO 2 is the main factor responsible for bubble formation due to its high solubility in H 2 O [3,13]; this effect agrees with the positive correlation found between CO 2 and FTexture, which refers to the bubble size within the foam. The positive correlation between the foaming parameters and Flavor liking, LTBitter, LTSweet, and overall liking is in accordance with the findings from Gonzalez Viejo et al. [9] in which it was found that the visual parameters have a great influence on consumers' acceptability when tasting beers.
The sonication treatments applied in both the fermentation and the carbonation stages were shown to improve the beers' foam and bubble-related parameters without affecting the flavor and aromas, as mentioned by Gonzalez Viejo et al. [17]. The regression ML models presented in this paper may be used in the brewing industry for the rapid assessment of beer in either craft or large companies. This is due to the use of the physicochemical parameters as inputs to predict the sensory attributes from the descriptive and acceptability tests. These physicochemical parameters may be obtained either from Model 1 when the company has an NIR spectrometer or by evaluating each parameter using the techniques mentioned in the materials and methods. Model 4 may be used by breweries that would implement sonication as part of the production process to improve the foam and bubble quality of the beer samples and to identify which samples/batches had been treated and at which stage of the process (carbonation or fermentation).

Conclusions
The NIR readings are a chemical fingerprint of beer samples, which gives specific signal data related to several compounds that are present on beers in the form of overtones. These data were used as inputs to model specific and important physicochemical characteristics of beers (Model 1). The advantages of using the predicted physicochemical outputs from Model 1 to construct the subsequent models presented in this work are (i) it helps to better understand the effects of specific physicochemical parameters involved and respective levels, avoiding the "black box" effect that NIR readings will present if they are used as inputs for subsequent models; (ii) physicochemical parameters can be measured using laboratory techniques and low-cost RoboBEER without requiring NIR instruments that can be cost-prohibitive for the particular NIR range used in this research; (iii) specific physicochemical parameters can be changed in a "simulation mode" to obtain real-time results from subsequent models related to changes in the sensory liking and type of fermentation treatment used; and (iv) Model 4 serves as a control process to recognize specific fermentations and sonication treatments of beer as a validation process in breweries.