Next Article in Journal
Addressing Malnutrition Through Reducing the Cost of a Healthy Diet in Bangladesh
Previous Article in Journal
Which On-Pack Information Drives a Marketable Specialty Coffee Label? Unfolding Purchase Intention and Visual Attention with Eye Tracking
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Machine Learning Model to Reframe the Concept of Shelf-Life in Bakery Products: PDO Sourdough as a Technological Preservation Model

by
Andrea Marianelli
1,†,
Cecilia Akotowaa Offei
1,2,†,
Monica Macaluso
1,*,
Nicola Mercanti
1,
Bruno Casu
3,4 and
Angela Zinnai
1,5
1
Department of Agriculture, Food and Environment, University of Pisa, Via del Borghetto 80, 56124 Pisa, Italy
2
Department of Agricultural, Forest and Food Sciences, University of Turin, Via Verdi 8, 10124 Torino, Italy
3
INFN Pisa Section, Largo Bruno Pontecorvo 3, 56127 Pisa, Italy
4
European Laboratory for Nuclear Research (CERN), 1211 Geneva, Switzerland
5
Interdepartmental Research Center “Nutraceuticals and Food for Health”, University of Pisa, 10 Via del Borghetto 80, 56124 Pisa, Italy
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Foods 2025, 14(24), 4236; https://doi.org/10.3390/foods14244236 (registering DOI)
Submission received: 6 November 2025 / Revised: 27 November 2025 / Accepted: 2 December 2025 / Published: 10 December 2025

Abstract

Traditional shelf-life (SL) determination in bakery products relies primarily on subjective sensory evaluation, limiting both predictive capability and technological transfer. This study aimed to develop an objective, data-driven framework by integrating statistical and Machine Learning (ML) methods to identify and quantify the core determinants of bread SL. Samples were produced under a 2 × 2 × 2 factorial design (Fermentation, Temperature, Packaging), with continuous monitoring of physicochemical and atmospheric parameters. Three-way ANOVA confirmed that Storage x Temperature (η2 ÷ 0.41) and Modified Atmosphere Packaging (η2 ÷ 0.36) were the dominant factors. The optimal synergy (4 °C + ATM) achieved a 100% Success Rate, extending SL to 54 days vs. 16 days under ambient conditions. For prediction, a Generalized Linear Model (GLM) was developed for binary classification and rigorously validated via 10-fold cross-validation. The GLM achieved an Overall Accuracy of 89% (AUC 92%), uniquely identifying pH and Total Titratable Acidity (TTA) as the most influential predictors. In conclusion, GLM provides a robust tool for objective SL prediction. The integrated ANOVA–GLM framework achieved a 3.3-fold SL extension and 92% predictive accuracy. The findings confirm that preservative effectiveness is not solely due to the process itself, but is mediated by the resulting chemical acidity, offering a scalable framework for Real-Time Quality Control (QC) in the food industry.

1. Introduction

Sourdough is increasingly interpreted not merely as a traditional leavening system, but as a biologically active preservation mechanism that can conditionally modulate the deterioration trajectory of bakery products. While conventional yeast fermentation primarily contributes to gas retention and flavor development, PDO sourdough generates a broader metabolite profile capable of restructuring moisture migration, acidification dynamics, and microbial ecology at the matrix level [1,2,3]. This shift in perspective reframes sourdough from a formulation choice to a context-dependent technological system, whose stabilizing effect is activated only under specific environmental constraints, rather than exerted universally.
Classical food preservation theory provides the conceptual foundation for this conditionality. According to hurdle technology, stability does not emerge from any single barrier in isolation but from the synergistic activation of multiple interdependent constraints [4]. Within this framework, PDO systems behave as metabolic hurdles, whose bio-preservative function is expressed only when the surrounding regime enables their biochemical advantage over spoilage dynamics [5,6]. This implies that sourdough cannot be evaluated as a static “ingredient effect”, but as a threshold-governed process whose efficacy depends on whether storage conditions allow its metabolic dominance to manifest.
Recent literature reinforces this view by demonstrating that shelf-life extension in sourdough-based matrices derives not from microbial suppression alone, but from a shift in the dominant failure mode from fungal spoilage to structural degradation [7,8,9]. In other words, PDO does not merely delay mold onset: it reorganizes the deterioration trajectory so that the limiting factor of product acceptability transitions from microbiological to textural collapse. This trajectory-based interpretation has rarely been captured quantitatively, because most previous studies have compared endpoints descriptively rather than inferring the mechanism that governs the SL outcome.
A mechanistic evaluation, rather than a descriptive one, requires identifying whether PDO has a direct effect on SL, or its effect is entirely mediated by physicochemical shifts on acidification (pH, TTA) and organic acid ratios. Classical statistical approaches only partly address this question: ANOVA can detect significant differences between conditions but does not determine whether a factor is causal or mediated. ML approaches, when used interpretively rather than as black-box prediction tools, provide a methodological bridge for linking environmental conditions, metabolic activation, and shelf-life outcome [10,11,12]. GLMs provide a formal statistical bridge between categorical factorial design and probabilistic inference. Their logit formulation allows identification of latent mediators (e.g., pH, TTA), aligning with frameworks proposed by [13].
In this context, GLM-based inferential models are particularly suited to small experimental systems where preservation is governed by threshold effects and conditional stability [13,14,15]. Unlike tree-based classifiers, GLMs allow mediation to be explicitly tested, enabling acidification to be evaluated not as a correlated descriptor, but as the latent mechanism through which PDO achieves SL extension [16,17,18]. When combined with PCA to assess variance structure, this framework allows preservation to be interpreted as a system-level transition rather than a univariate improvement. Accordingly, this study investigates whether PDO sourdough functions as a threshold-dependent bio-preservation system, identifies the storage regime under which this activation emerges, and quantifies the mediating physicochemical pathway that governs the shift in deterioration trajectory.

2. Materials and Methods

2.1. Experimental Design

A full-factorial design (2 fermentative systems × 2 storage temperatures × 2 packaging conditions, n = 4 replicates per condition; total n = 32) was adopted to identify the environmental threshold at which PDO activates a technological bio-preservation function. The two spoilage-governing fermentative systems were: baker’s yeast fermentation (Control), and sourdough fermentation (PDO). Storage conditions were imposed at 4 °C or 20 °C, under air or atmospheric packaging (ATM; 100% CO2). The PDO sourdough used in this study was prepared according to the official Tuscan Bread PDO protocol, following the multi-stage refreshment and fermentation protocol detailed in the following section.

2.2. Breadmaking Process and Sampling Schedule with Analytical Frequency

The samples (n = 4 for each condition) were prepared following a standardized dough formulation expressed on a flour basis (baker’s percentage): Bologna Type 0 flour 100% (milled by Molino Angeli Srl, Pietrasanta, Italy), distilled water 75%, sourdough 14% (Tuscan Bread PDO Consortium, Arezzo, Italy). Control doughs were leavened with baker’s yeast, whereas PDO samples were produced using the traditional Tuscan Bread PDO sourdough, both sharing an identical base formulation.
The sourdough starter was refreshed according to the protocol established by the Tuscan Bread PDO Consortium [19] and in particular, the starter preparation (biga) provides the mixture of its central portion with an equal amount of strong wheat flour (W > 260) and 6 g of fructose, and the consequent addition of demineralized water to achieve 42–48% hydration relative to the flour weight. All the ingredients were mixed for 15 min until the consistency of the dough was obtained. Then, the dough was stretched and folded 5–6 times, shaped into a sphere, cross-cut on the surface, and placed in a sealed container. Finally, the dough was left to ferment in a thermostatic chamber set at 28 °C for 4 h. This process was repeated twice. After the second refreshment phase, the biga dough was prepared. An aliquot of 100 g of twice refreshed sourdough starter was mixed with strong wheat flour (W > 260). Then, water was added in an amount equal to 60% of the flour weight. Afterwards, the mixture was mixed for 15 min until the dough was consistent, and finally, the dough was placed in a glass bowl covered with food-grade plastic wrap in a thermostatic chamber set at 17 °C for 16 h.
Before mixing the dough, a short autolysis was performed to activate endogenous wheat enzymes and facilitate starch hydrolysis into fermentable sugars. Two-thirds of the total water was combined with the flour and mixed for 15 min with a kneading machine (Model Grilletta IM 5S/230 10 V HH, Famag Srl, Molise, Italy), followed by 30 min of resting at room temperature. The remaining water and 225 g of pre-fermented dough were then incorporated, and all ingredients were mixed until a smooth and homogeneous structure was obtained.
The final doughs were fermented in a thermostatic chamber at 38 °C for 90 min (model FOALSTR23M, Fimar S.p.A., Villa Verrucchio, Italy), subsequently divided into 460 g loaves, and proofed for 120 min at 38 °C and 86 RH% on wooden boards covered with linen cloths. Baking was performed at 180 °C for 50 min in a ventilated oven (model FOSTR1040T, Fimar S.p.A., Villa Verrucchio, Italy). The internal temperature of the bread loaves was monitored until 96 ± 2 °C was reached using a digital penetration thermometer (Model Checktemp HI98501, Hanna Instruments Inc., Woonsocket, RI, USA) immediately after baking and during the cooling phase to ensure consistent thermal profiles across replicates. Baked samples were cooled for 2 h under a laminar flow hood (model Olympia 1.2, Bioair instruments S.r.l., Siziano, Italy) until 22 ± 2 °C internal temperature was reached (Figure 1). All kneading operations were carried out using a kneading machine (Model Grilletta IM 5S/230 10 V HH, Famag Srl, Molise, Italy). Mixing lasted approximately 10 min until the dough reached a smooth and elastic consistency.
After the breadmaking process, the samples were packed into PET (polyethylene) bags filled with either technical air or a modified atmosphere (MAP) composed of 100% v/v CO2. The samples were stored. Moreover, to avoid artifacts associated with repeated opening of the same unit, all samples were packaged individually, stored at room temperature (20–24 °C) and 40 RH%, and analyzed as destructive replicates. Each measurement, therefore, represents an independent unit withdrawn at a specific time point, ensuring that packaging integrity, headspace conditions, and moisture dynamics were not perturbed by sampling.
The analytical frequency was adapted to the physiological trajectory of deterioration. During the early phase (0–16 days), spoilage risk was low, so sampling was performed every 4 days. Between 16 and 30 days, the divergence between treatments emerged; thus, analyses were conducted every 6–8 days. Beyond day 30, monitoring continued every 10–12 days until the end of SL (54 days).
However, their terminal failure mode remained fungal-driven, unlike PDO samples that transitioned to a texture-limited endpoint (Table 1).
This adaptive schedule ensured high temporal resolution around the mechanistic threshold while preserving packaging integrity and avoiding pseudo-replication. Indeed, to maximize the temporal resolution of GLM mediation analysis, sampling intervals were selected to increase data density in proximity to the expected deterioration threshold, while minimizing redundant early-stage measurements. A destructive sampling strategy was adopted because repeated non-destructive evaluations on the same loaf introduced variability due to mechanical perturbation, moisture redistribution, cut-surface exposure, and structural fatigue. Independent destructive units, therefore, ensure higher measurement precision and eliminate within-unit correlation effects that would otherwise bias GLM inference. It also reflects a biologically realistic sampling strategy, aligned with the intrinsic time of spoilage acceleration once metabolic or environmental constraints are exceeded.

2.3. Physicochemical Monitoring

For each fermentation × temperature × atmosphere combination, four independent loaves (n = 4) were produced and treated as separate experimental units. During baking, the position of loaves within the oven was rotated across batches to minimize positional effects. After cooling, the loaves were randomly assigned to storage containers and sampling time points. The order of physicochemical measurements (pH, Aw, TTA, organic acids, texture) was also randomized across samples to avoid systematic analytical bias. Variability between units is reported as standard deviations (±SD) and was incorporated directly at the replicate level in ANOVA and GLM analyses. The loaves were analysed at each scheduled time point (as described in Table 1 in the previous section). All instruments were calibrated prior to each analytical session: pH electrodes using standard buffers at pH 4.00 and 7.00, the Aw-meter using manufacturer-supplied reference salts with automatic temperature compensation, and TTA titration following AOAC-standardized NaOH calibration. Duplicate measurements were performed when relevant to ensure consistency and reduce analytical error.

2.3.1. pH Physicochemical Determination

The pH value was measured on 10 g of crumb dispersed in 90 mL of distilled water, using a calibrated glass electrode, according to AACC Method 02–52.

2.3.2. Aw Physicochemical Determination

Aw was determined using a HygroPalm HP23-AW-A instrument (Rotronic AG, Bassersdorf, Switzerland) at 25 ± 0.2 °C, after equilibrium stabilization of the crumb surface, ensuring that measurements reflected the internal moisture gradient.

2.3.3. TTA Physicochemical Determination

TTA was determined as described by [20]. Ten grams of the sample were homogenized in 90 mL of distilled water and titrated with 0.1 N NaOH to pH 6.5. Results were expressed as mL NaOH 0.1 N per 10 g of sample.

2.3.4. Fermentative Metabolites Determination

Lactic and acetic acids were quantified enzymatically using Megazyme kits (Megazyme Ltd., Wicklow, Ireland) following the manufacturer’s instructions. Results were expressed as g/100 g dry matter.

2.3.5. Texture Analysis

The compressibility of bread slices was evaluated using a PNR-12 penetrometer (Anton Paar, Rivoli, Italy). Each loaf was analysed destructively: two central slices per sample were tested, and three penetration points were measured per slice using a 40 g load applied for 5 s. The instrument records the penetration force as Newtons (N), which directly represents the resistance of the crumb to compression. The average of six readings per sample (2 slices × 3 points) was used for statistical analysis. The textural-collapse threshold was not chosen arbitrarily. The end of the shelf life and textural collapse was defined by the end of bread shelf life by a textural analyzer, such as increasing hardness, decreasing springiness, and cohesiveness, indicating staling or textural collapse. These objective measurements were based on preliminary internal tests and literature on bread texture limits for shelf-life assessment and aligned with consumer rejection and loss of bread quality [21,22,23,24].
All physicochemical parameters were measured in quadruplicate (n = 4) per condition and expressed as mean ± standard deviation. These values served as continuous predictors in the GLM model framework (Section 2.4 below).
These measurements served as mechanistic intermediates linking PDO metabolism to spoilage trajectory.

2.4. ML Model (GLM Approach)

A GLM, binomial family with logit link, Equation (1) [15], was implemented to test whether PDO acts as a direct categorical factor or through physicochemical mediation. The model was coded and built in R (R Core Team, Version 4.3.0, Vienna, Austria) using the stats and caret packages. To evaluate whether shelf-life acceptability was directly determined by the fermentation type or indirectly mediated through physicochemical shifts, a GLM was implemented.
The model expressed the probability (p) that a sample remained acceptable (no visible fungal growth and texture > 3.3 N) as a function of key physicochemical predictors:
The dataset consisted of 32 observations (8 storage × 4 fermentation conditions, with 4 replicates each), with shelf life encoded as a binary outcome (acceptable/non-acceptable) (Figure 2). Therefore, samples were classified as texturally acceptable when crumb firmness remained below 3.3 N and no visible spoilage was detected. This threshold reflects the limit at which structural collapse becomes perceptible both instrumentally and sensorially, marking the transition from an elastic crumb to a compact, starch-retrograded matrix. Maintaining firmness below this value is consistent with previously reported consumer rejection limits for bread and ensures that textural degradation is detected before microbiological spoilage becomes dominant. The combined use of mechanical and visual criteria provides a robust, conservative definition of acceptability that supports the subsequent GLM-based classification framework. The choice of four replicates per condition was based on ensuring sufficient sensitivity to detect interaction effects and threshold-dependent activation, while maintaining full independence of observations under destructive sampling. Power considerations focused on medium to large interaction magnitudes typical of fermentation to environment systems, making n = 4 the optimal balance between inferential resolution and feasibility. The destructive sampling approach minimized intra-sample variability by avoiding repeated mechanical or physicochemical perturbations of the same loaf, which are known to introduce noise in texture, Aw, and pH measurements. Each value, therefore, reflects an unaltered physical state, improving the accuracy of GLM coefficient estimation.
logit ( p ) = l n ( p 1 p ) = β 0 + β 1 ( p H ) + β 2 ( T T A ) + β 3 ( L a c t i c ) + β 4 ( A c e t i c )
where:
  • β0 is the intercept;
  • β1–β4 are the estimated regression coefficients describing the contribution of each variable to the log-odds of shelf-life acceptability.
Figure 2. Workflow of the GLM-based modeling pipeline used to mechanistically validate PDO SL behavior.
Figure 2. Workflow of the GLM-based modeling pipeline used to mechanistically validate PDO SL behavior.
Foods 14 04236 g002
To stabilize inference and evaluate mediation, the GLM was reformulated using physicochemical parameters (pH, TTA, lactic acid, acetic acid) as predictors. Variable selection was performed via stepwise AIC [25], and model robustness was assessed using 10-fold cross-validation [26]. This procedure allowed the GLM to act as an inferential bridge from factor dominance (ANOVA) to latent mediation (PCA), confirming that PDO becomes predictive only once its acidification profile is expressed. The model performance was reported in terms of overall accuracy, recall, and AUC (see Table 2 in Section 3.5).

2.5. Statistical Analysis

Data was analyzed using a two-stage inferential pipeline combining traditional and data-driven modeling. A full-factorial three-way ANOVA (F × T × A) was shown in Equation (2) and applied to identify dominant preservation factors and their interactions. Parameters like pH, TTA, lactic and acetic acids, lactic/acetic ratio, water activity, and texture were tested for normality (Shapiro–Wilk) and homoscedasticity (Levene–Brown–Forsythe).
three - way   ANOVA   model :   Y i j k = μ + F i + T j + A k + ( F × T ) i j + ( F × A ) i k + ( T × A ) j k + ε i j k
where:
  • Y i j k represents the observed value of the dependent variable under the i-th fermentation type, j-th temperature, and k-th atmosphere condition;
  • μ is the overall mean;
  • F i , T j , and A k are the main effects of Fermentation, Temperature, and Atmosphere;
  • ( F × T ) i j , ( F × A ) i k , and ( T × A ) j k are the two-way interactions among these factors;
  • ε i j k is the random error term, assumed to be normally distributed with zero mean and homogeneous variance ( ε i j k N ( 0 , σ 2 ) ).
Tukey’s HSD post hoc test (α = 0.05) was used for pairwise contrasts, and effect sizes were expressed as partial η2 (Equation (3)).
Equation (3): Effect sizes were computed as partial eta squared ( η 2 ) according to [27]
η 2 = S S factor S S total
providing a measure of the relative contribution of each factor to total variance.
This factorial structure allows the identification not only of single-factor influences (main effects) but also of synergistic or antagonistic interactions among environmental (T × A) and biological (F × T) parameters that condition the activation of PDO’s preservative effect.
To visualize multivariate covariance and relationships between chemical variables and SL regimes, a PCA was performed for structure exploration (JMP® 19, Cary, NC, USA: SAS Institute Inc.). Each replicate (n = 4 per condition) was included as an independent observation in the PCA rather than averaging across loaves, to retain within-condition variability and avoid artificially inflating between-group separation. This approach preserves the natural dispersion structure of physicochemical data. Subsequently, a GLM was implemented to mechanistically validate whether PDO acts as a direct categorical factor or through physicochemical mediation. The model was coded in R (R Core Team, Version 4.3.0, Vienna, Austria) using the stats, caret, and pROC packages. The dataset comprised 32 observations (8 combinations × 4 replicates), with SL encoded as a binary outcome (1 = acceptable, 0 = non-acceptable). An initial model using only categorical predictors (F × T×A) produced complete separation; the PDO + 4 °C/Air condition yielded perfect success [15,28], confirming a threshold-dependent activation mechanism. A survival analysis approach (e.g., Kaplan–Meier or Cox modelling) was not applicable in this study because shelf-life assessment was destructive. Each loaf was measured only once and discarded, preventing the reconstruction of individual deterioration trajectories across time. Therefore, time-to-failure curves and hazard functions could not be estimated. For this reason, shelf-life was represented as a binary state (acceptable vs. collapsed) at each sampling point, which is the appropriate approach for destructive experimental designs. To overcome this, the GLM was refitted using physicochemical mediators (pH, TTA, lactic, and acetic acid) as predictors. Variable selection employed stepwise AIC optimization and 10-fold stratified cross-validation [26].

3. Results and Discussion

3.1. Redefinition of the Spoilage Trajectory

SL results showed a clear divergence between the PDO and the yeast-fermented samples, demonstrating that preservation emerged not as a general improvement but as a change in the limiting mechanism of deterioration. The control samples (yeast fermentation) reached the end of SL at day 16 under both refrigeration and ambient storage, whereas PDO samples remained acceptable up to day 54 in the refrigerated air conditioning. The endpoint was defined by a dual criterion: firstly, visible fungal growth and, secondly, irreversible textural collapse measured via the PNR12 penetrometer, which aligns with the failure-mode definition of acceptability in bakery matrices.
Importantly, PDO did not merely delay fungal colonization, but replaced fungal spoilage as the limiting failure mode with structural degradation as the downstream constraint. This observation is consistent with recent evidence indicating that sourdough-based systems alter the deterioration trajectory, shifting the product from a microbially terminated SL toward a structure-governed one [29]. Under this interpretation, the extension is not the effect itself, but the consequence of a transition in the dominant deterioration pathway.
The magnitude of the difference (16 to 54 days) cannot be explained by microbial growth delay alone. Instead, it suggests the presence of a threshold-based activation mechanism in which PDO becomes metabolically dominant over spoilage flora only when the storage regime supports its biochemical advantage [30,31]. This finding anticipates the mechanistic analysis developed in the subsequent sections, where physicochemical data and multivariate modeling confirm that the extended shelf-life is mediated by acid-driven restructuring of the matrix rather than by antifungal inhibition alone.

3.2. Physicochemical Mediation Emerges Before SL Outcome

PDO fermentation produced a markedly different biochemical environment compared to yeast fermentation, preceding and mechanistically underpinning the observed divergence in SL. PDO samples showed significantly lower pH values and markedly higher TTA, together with an increased accumulation of lactic and acetic acids, confirming that acidification is not a coincidental correlation but the metabolic driver enabling the shift in deterioration trajectory. These changes appeared before visible spoilage divergence, indicating that PDO modifies the stability regime at a biochemical rather than microbiological endpoint.
The modulation of the Lactic acid/Acetic acid ratio further supports this interpretation: PDO profiles were dominated by a more efficient conversion towards organic acids, restructuring the matrix into a metabolically more stable state. This aligns with recent evidence that sourdough preservation effectiveness is governed by metabolic activation thresholds and not by the mere presence of LAB cells [32,33,34]. In this framework, PDO does not act as an antimicrobial barrier, but as a biochemical condition-setter, shifting the equilibrium of the system toward a lower pH/high acid environment that constrains the ecological feasibility of fungal proliferation.
These physicochemical trends anticipate the outcome-level differences reported in Section 3.1 by demonstrating that metabolic mediation precedes visible divergence in deterioration. By presenting a stable and highly acidified profile, PDO establishes the precondition for SL extension, which is later expressed as a transformation in the dominant failure mode [35,36,37]. Table 2 summarizes these physicochemical parameters, while Figure 3 graphically highlights the differences and their accumulation relative to controls.

3.3. Environmental Dominance in ANOVA Supports a Threshold-Mediated Mechanism

The three-way ANOVA confirmed that environmental factors such as Temperature (T) and Atmosphere (A) significantly affect SL than the fermentative system (F) itself (Table 3).
T and A displayed the highest effect sizes (η2), while the main effect of fermentation on SL was not statistically significant. This pattern indicates that PDO does not act as a direct preservation factor, but exerts its stability advantage only when the environmental regime activates its biochemical dominance. In other words, PDO is conditionally effective, not universally active.
The significant F × T interaction further reinforces the interpretation that PDO requires a specific thermal regime to express its preservation capacity. This observation is consistent with SL theory, where the limiting mechanism of stability is governed by the dominant external constraint until a transition threshold is crossed [38,39]. Recent work has demonstrated that, in matrix-governed deterioration systems, formulation alone rarely determines stability unless it interacts with temperature-driven barriers [40,41]. Within this logic, environmental parameters set the feasibility domain of PDO activity, while fermentation defines the metabolic trajectory inside that domain.
Accordingly, the ANOVA results anticipate mediation: if temperature and atmosphere are the dominant explanatory factors, but the final SL behavior is only observed in PDO systems. Table 3 shows that the preservation advantage of PDO is not simply due to being a sourdough-based fermentative system, but emerges when the storage regime supports its metabolic activity. This set the mechanistic premise for the PCA presented in Section 3.4, which quantified whether physicochemical variables represented the latent structure through which PDO expressed its preservation effect.

3.4. PCA Reveals Acidification as the Latent Structure Governing SL

Prior to PCA, all variables were mean-centered and scaled to unit variance (autoscaling) to prevent variables with larger magnitudes from dominating the solution. Each replicate (n = 4 per condition) was included as an individual observation in the analysis. The PCA confirmed that physicochemical variation in the dataset is not distributed randomly but is organized along a single dominant latent axis corresponding to acidification and organic acid accumulation (Figure 4). Furthermore, potential batch effects were evaluated by color-coding PCA score plots according to analytical session, measurement day, and instrument batch. No clustering attributable to session-related artefacts was observed, indicating that the multivariate structure reflects true biological and process-driven variability rather than experimental drift.
PC1 alone accounted for 97.8% of the total variance, with positive loadings for TTA, lactic, and acetic acids, and a strong negative loading for pH. This structure indicates that the differentiating mechanism between PDO and yeast systems is not categorical, but metabolic; the intensity of acidification defines the stability domain.
The clear separation between PDO and yeast samples along PC1 supports the hypothesis introduced in Section 3.3: PDO does not act as a universal or formulation-driven effect, but as an activation-dependent metabolic state. In other words, fermentation type is not the explanatory variable, but the biochemical shift generated by PDO is. This latent clustering is consistent with the mechanistic interpretation of sourdough preservation emerging in literature, where stability results from a metabolic restructuring of the matrix rather than additive antifungal inhibition [1,7,42,43]. Importantly, PCA provides the missing causal bridge between ANOVA and GLM.
ANOVA showed that environment dominates (threshold-setting), PCA shows that acidification is the latent mediator, hence GLM must evaluate preservation through physicochemical variables, not categorical fermentation.
This is also why complete separation later emerges in the binary classification model (Section 3.5). Once samples cross the metabolic activation threshold defined by PC1, they fall into a different deterioration domain altogether. PCA, therefore, does not merely visualize clustering but confirms that PDO’s preservation capacity is mediated and is structurally encoded in the acidification axis that governs variance in the system. To evaluate potential batch effects, score plots were inspected according to analytical session, and no systematic clustering by batch was observed. Therefore, no additional batch correction was applied.

3.5. GLM Modeling Confirms Mediation and Explains Complete Separation

The GLM model was developed to test whether the SL outcome was explained by fermentation type directly or by the physicochemical state generated by PDO metabolism to lay the know-how basis for an ML-nondestructive system. Although cross-validation supports internal consistency, external validation on larger datasets is necessary to assess the generalizability of the GLM decision boundaries. Such validation would allow testing the stability of the estimated coefficients against broader sources of biological and technological variability, including batch-to-batch differences in sourdough performance. When the model was initially fitted using only categorical experimental factors (F × T × A), it failed due to complete separation because PDO samples stored at 4 °C in ATM formed a perfect success class. This phenomenon is not indicative of overfitting, but a known property of logistic models in which the predictor structure deterministically separates the outcome domain [15,28]. In this case, separation emerged because the effect of PDO is not probabilistic but latent and mediated: once acidification crosses the activation threshold, samples transition into a different deterioration regime altogether. Although the GLM showed strong internal coherence, the limited dataset (n = 32) increases the uncertainty surrounding the stability of the estimated decision boundaries. The emergence of complete separation reflects the deterministic structure of the physicochemical variables rather than overfitting, but validation on larger, independent datasets is required to quantify predictive variability.
To stabilize the model and move from categorical to mechanistic inference, the GLM was reformulated using physicochemical variables (pH, TTA, lactic, and acetic acid) as predictors [44,45,46]. After AIC-based selection [25], the final model was validated via 10-fold cross-validation [26], achieving an overall accuracy of 0.89, a recall of 0.915, and an AUC of 0.92 (Table 4). These results suggest that preservation was not an intrinsic property of PDO as a factor, but a consequence of the biochemical state it induces. This supports the mediation pathway established by the PCA, where PDO drives the latent shift in acidification, and it is this metabolic that predicts stability.
Accordingly, the GLM confirms the mechanistic role of PDO as a threshold-dependent activator of preservation [47]. Fermentation type becomes predictive only once its metabolic state is expressed, meaning that SL extension is statistically downstream of physicochemical mediation [36]. This result closes the inferential loop initiated in Section 3.3, where ANOVA identifies environmental dominance, PCA reveals the latent axis, and GLM validates that the PDO effect is dynamically activated, not statically present [48].

3.6. From Chemical Factors to the Mediation and Activation

Taken together, the results may indicate that sourdough (PDO) does not extend SL as a direct categorical factor, but as a threshold-activated metabolic system. The ANOVA established that environmental constraints (T × A) are the dominant determinants of stability, while fermentation alone is insufficient to explain the preservation outcome. The PCA then confirmed that PDO operates through a latent axis of acidification once physicochemical restructuring is established; samples cluster into a metabolically stable domain. Finally, the GLM validated that SL is predicted not by fermentation type per se, but by the metabolic state it induces, as evidenced by the emergence of complete separation when categorical variables were used.
Thus, PDO functions as a conditional preservation mechanism whose efficacy is activated only under a supportive storage regime, meaning that stability is mediated rather than inherent. Preservation arises when the environmental barrier enables PDO to express its metabolic dominance, linking the statistical evidence to a mechanistic interpretation: environment sets the feasibility domain, PDO defines the trajectory within it. Lastly, to synthesize the inferential findings into a practical and industrially interpretable framework, a decision tree was developed to summarize the outcome of the ANOVA–GLM sequence. Following is shown in Figure 5 the model built in R (R Core Team, Version 4.3.0, Vienna, Austria) using the rpart and rpart.plot packages on the full dataset (n = 32). The hierarchical structure visualizes threshold-dependent rules: lactic acid, TTA, and pH are the key variables governing the classification, while texture contributes as a secondary discriminant. Terminal nodes report group identity (PDO or Control), number of samples (n), and classification accuracy (%). This decision tree shows the outcome of the GLM, translating the statistical mediation model into interpretable decision rules. Based on the model, PDO activation follows a conditional metabolic rule rather than a categorical effect. The preservation advantage emerges only when the biochemical state of the dough crosses specific physicochemical thresholds of acidification and buffering capacity.
The following quantitative rule summarizes this activation mechanism (Equation (4)):
Lactic 0.18   g / 100   g   TTA 0.03   meq / g     pH < 4.2 = PDO - active   stability   domain
These rules indicate that PDO fermentation becomes functionally active as a bio-preservation system only when lactic acid accumulation and total titratable acidity exceed critical thresholds while pH drops below the inhibitory limit for fungal proliferation. The numerical thresholds reported in Equation (4) were directly generated by the decision tree during model training. These split values represent the points where the model best separated breads that maintained acceptable texture from those that deteriorated. We verified the robustness of these thresholds by repeating the tree fitting procedure under different random seeds, observing only minor numerical fluctuations and no changes in the overall decision structure. This confirms that the thresholds reflect stable patterns in the data rather than random variability.
Practically, this provides operational decision criteria for QC. Once these biochemical parameters are reached, the product transitions from a microbially limited to a structure-limited deterioration regime.
This threshold-based framework supports the design of real-time monitoring protocols and can be implemented in machine-learning-based SL prediction systems.
Indeed, confirming the threshold-dependent activation of PDO metabolism inferred from the GLM. PDO fermentation dominates the preservation regime, extending SL through matrix restructuring rather than direct anti-fungal inhibition.

4. Conclusions

Previous work has frequently reported SL improvements in sourdough systems, but nearly all studies have treated sourdough as a static formulation variable rather than as a conditionally activated mechanism. Because these studies did not distinguish presence from function, nor compare preservation across different ecological regimes, the threshold behavior governing PDO activation remained concealed. As a result, sourdough was interpreted as universally preservative when it is, in fact, mechanistically contingent.
This study suggests that PDO fermentation operates as a conditionally activated preservation system, whose activity depends on environmental feasibility. Through ANOVA, we showed that storage conditions (T × A) dominate the stability outcome, confirming that PDO is not directly effective as a categorical factor. The PCA established that preservation emerges through a latent physicochemical axis defined by acidification (pH/TTA), and the GLM validated that SL is predicted only after mediation is accounted for, explaining the emergence of complete separation as a structural rather than probabilistic effect. Functionally, this metabolic activation translated into a 3.4-fold extension (16 to 54 days), not as a slower version of the same deterioration process, but as a change in the dominant failure mode.
Technologically, these findings reposition PDO as a process variable to be managed as a controllable metabolic state, rather than as a formulation ingredient. PDO appears to become operational only when refrigeration constrains the ecological feasibility of fungal growth, suggesting that SL control may need to be expressed through acidification targets rather than recipe inclusion alone. The small-N design is not a limitation but the appropriate epistemic framework for mediation testing.
This design is optimal for causal mediation testing but limits the generalization of the GLM model across different product types or industrial batches. The limited dataset also increases uncertainty in model-based estimates, and independent validation across different production cycles is required to confirm the stability of the predictive patterns observed herein.
Therefore, the present findings should be considered promising but preliminary. Future work should validate these patterns across larger industrial batches, allowing the extension of this inferential framework to large-N datasets and enabling the use of ensemble learning models (e.g., Random Forest, Support Vector Machines) combined with nested cross-validation to verify the stability and generalizability of the predictive structure.
Additionally, while the present work indicated PDO activation as a threshold-dependent metabolic mechanism, further investigations integrating metabolomic and microbial genomic profiling could elucidate the biochemical pathways underlying the acidification-mediated stabilization process. These observations align with recent evidence showing structural stabilization driven by biochemical modulation in food matrices, including polysaccharide-mediated barrier enhancement [49] and protein structural adaptations under processing stress [50], reinforcing the mechanistic interpretation proposed herein.
This would strengthen the transition from empirical bio-preservation toward predictive, data-driven quality control systems suitable for industrial-scale deployment.

Author Contributions

Conceptualization, A.Z. and M.M.; methodology, A.M., C.A.O. and M.M.; software, N.M., B.C., C.A.O., A.M. and M.M.; validation, A.Z., C.A.O., A.M. and M.M.; formal analysis, C.A.O. and A.M.; investigation, M.M., C.A.O., A.M. and A.Z.; resources, A.Z., M.M. and A.M.; data curation, C.A.O., A.M. and M.M.; writing—original draft preparation, A.M. and C.A.O.; writing—review and editing, A.Z., N.M. and M.M.; visualization, N.M. and M.M.; supervision, A.Z. and M.M.; funding acquisition, A.Z. and M.M. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by PDO ORGANIC bread, 16.2 PSR 2014–2022 of Tuscany Region year 2022 CUP ARTEA 1073589.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

This work was carried out within the framework of the Ph.D. program in Food, Agricultural and Environmental Sciences at the University of Pisa and supported by the PNRR doctoral scholarship program. Special appreciation is extended to Angela Zinnai and Monica Macaluso for their scientific mentorship and guidance, and to the technical staff of the Department of Agriculture, Food and Environment and INFN (University of Pisa) for their assistance with sampling and analytical measurements. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PDOBread prepared with the Tuscan Bread PDO sourdough
ControlBread prepared with baker’s yeast
SLShelf-Life
MAPModified Atmosphere Packaging
PETPolyethylene 
FFermentation
TTemperature (4 °C; 20 °C)
AAtmosphere (AIR; 100% CO2)
MLMachine Learning Model
GLMGeneralized Linear Model
AUCArea Under the Curve
ROCReceiver Operating Characteristic
TTATitratable Acidity
PCAPrincipal Component Analysis
RFRandom Forest Model
SVMSupport Vector Machine Model
QCQuality Control

References

  1. Coda, R.; Cagno, R.D.; Gobbetti, M.; Rizzello, C.G. Sourdough Lactic Acid Bacteria: Exploration of Non-Wheat Cereal-Based Fermentation. Food Microbiol. 2014, 37, 51–58. [Google Scholar] [CrossRef]
  2. De Angelis, M.; Minervini, F.; Siragusa, S.; Rizzello, C.G.; Gobbetti, M. Wholemeal Wheat Flours Drive the Microbiome and Functional Features of Wheat Sourdoughs. Int. J. Food Microbiol. 2019, 302, 35–46. [Google Scholar] [CrossRef]
  3. Koistinen, V.M.; Mattila, O.; Katina, K.; Poutanen, K.; Aura, A.-M.; Hanhineva, K. Metabolic Profiling of Sourdough Fermented Wheat and Rye Bread. Sci. Rep. 2018, 8, 5684. [Google Scholar] [CrossRef]
  4. Rahman, M.S. Handbook of Food Preservation, 3rd ed.; Rahman, M.S., Ed.; CRC Press: Boca Raton, FL, USA, 2020; ISBN 978-0-429-09148-3. [Google Scholar]
  5. Fontana, F.; Longhi, G.; Alessandri, G.; Lugli, G.A.; Mancabelli, L.; Tarracchini, C.; Viappiani, A.; Anzalone, R.; Ventura, M.; Turroni, F.; et al. Multifactorial Microvariability of the Italian Raw Milk Cheese Microbiota and Implication for Current Regulatory Scheme. mSystems 2023, 8, e01068-22. [Google Scholar] [CrossRef]
  6. De Vero, L.; Iosca, G.; Gullo, M.; Pulvirenti, A. Functional and Healthy Features of Conventional and Non-Conventional Sourdoughs. Appl. Sci. 2021, 11, 3694. [Google Scholar] [CrossRef]
  7. Quattrini, M.; Liang, N.; Fortina, M.G.; Xiang, S.; Curtis, J.M.; Gänzle, M. Exploiting Synergies of Sourdough and Antifungal Organic Acids to Delay Fungal Spoilage of Bread. Int. J. Food Microbiol. 2019, 302, 8–14. [Google Scholar] [CrossRef]
  8. Axel, C.; Zannini, E.; Arendt, E.K. Mold Spoilage of Bread and Its Biopreservation: A Review of Current Strategies for Bread Shelf Life Extension. Crit. Rev. Food Sci. Nutr. 2017, 57, 3528–3542. [Google Scholar] [CrossRef]
  9. Chavan, R.S.; Chavan, S.R. Sourdough Technology—A Traditional Way for Wholesome Foods: A Review. Compr. Rev. Food Sci. Food Saf. 2011, 10, 169–182. [Google Scholar] [CrossRef]
  10. Wang, L.; Lu, W.; Song, Y.; Liu, S.; Fu, Y.V. Using Machine Learning to Identify Environmental Factors That Collectively Determine Microbial Community Structure of Activated Sludge. Environ. Res. 2024, 260, 119635. [Google Scholar] [CrossRef]
  11. Zampieri, G.; Vijayakumar, S.; Yaneske, E.; Angione, C. Machine and Deep Learning Meet Genome-Scale Metabolic Modeling. PLoS Comput. Biol. 2019, 15, e1007084. [Google Scholar] [CrossRef]
  12. Cuperlovic-Culf, M. Machine Learning Methods for Analysis of Metabolic Data and Metabolic Pathway Modeling. Metabolites 2018, 8, 4. [Google Scholar] [CrossRef]
  13. Taddeo, M.M.; Amorim, L.D. Causal Mediation for Survival Data: A Unifying Approach via GLM. Rev. Colomb. Estad. 2022, 45, 161–191. [Google Scholar] [CrossRef]
  14. Ter Braak, C.J.F.; Peres-Neto, P.; Dray, S. A Critical Issue in Model-Based Inference for Studying Trait-Based Community Assembly and a Solution. PeerJ 2017, 5, e2885. [Google Scholar] [CrossRef] [PubMed]
  15. Albert, J.M.; Nelson, S. Generalized Causal Mediation Analysis. Biometrics 2011, 67, 1028–1038. [Google Scholar] [CrossRef]
  16. Hiura, S.; Abe, H.; Koyama, K.; Koseki, S. Bayesian Generalized Linear Model for Simulating Bacterial Inactivation/Growth Considering Variability and Uncertainty. Front. Microbiol. 2021, 12, 674364. [Google Scholar] [CrossRef]
  17. Gänzle, M.G.; Zheng, J. Lifestyles of Sourdough Lactobacilli—Do They Matter for Microbial Ecology and Bread Quality? Int. J. Food Microbiol. 2019, 302, 15–23. [Google Scholar] [CrossRef] [PubMed]
  18. Warton, D.I.; Lyons, M.; Stoklosa, J.; Ives, A.R. Three Points to Consider When Choosing a LM or GLM Test for Count Data. Methods Ecol. Evol. 2016, 7, 882–890. [Google Scholar] [CrossRef]
  19. Marianelli, A.; Pieracci, Y.; Scappaticci, G.; Macaluso, M.; Guazzotti, M.; Gualco, S.; Zinnai, A. The Role of Flours and Leavening Systems on the Formation of Acrylamide in the Technological Process of Baked Products: Cases Studies of Bread and Biscuits. LWT 2025, 217, 117387. [Google Scholar] [CrossRef]
  20. Scappaticci, G.; Mercanti, N.; Pieracci, Y.; Ferrari, C.; Mangia, R.; Marianelli, A.; Macaluso, M.; Zinnai, A. Bread Improvement with Nutraceutical Ingredients Obtained from Food By-Products: Effect on Quality and Technological Aspects. Foods 2024, 13, 825. [Google Scholar] [CrossRef]
  21. Dong, Y.; Karboune, S. A Review of Bread Qualities and Current Strategies for Bread Bioprotection: Flavor, Sensory, Rheological, and Textural Attributes. Compr. Rev. Food Sci. Food Saf. 2021, 20, 1937–1981. [Google Scholar] [CrossRef] [PubMed]
  22. Sagar, N.A.; Pareek, S. Fortification of Multigrain Flour with Onion Skin Powder as a Natural Preservative: Effect on Quality and Shelf Life of the Bread. Food Biosci. 2021, 41, 100992. [Google Scholar] [CrossRef]
  23. Wiedemair, V.; Gruber, K.; Knöpfle, N.; Bach, K.E. Technological Changes in Wheat-Based Breads Enriched with Hemp Seed Press Cakes and Hemp Seed Grit. Molecules 2022, 27, 1840. [Google Scholar] [CrossRef]
  24. Bianchi, A.; Venturi, F.; Palermo, C.; Taglieri, I.; Angelini, L.G.; Tavarini, S.; Sanmartin, C. Primary and Secondary Shelf-Life of Bread as a Function of Formulation and MAP Conditions: Focus on Physical-Chemical and Sensory Markers. Food Packag. Shelf Life 2024, 41, 101241. [Google Scholar] [CrossRef]
  25. Akaike, H. A New Look at the Statistical Model Identification. IEEE Trans. Autom. Control 1974, 19, 716–723. [Google Scholar] [CrossRef]
  26. Kuhn, M.; Johnson, K. Applied Predictive Modeling; Springer: New York, NY, USA, 2013; ISBN 978-1-4614-6848-6. [Google Scholar]
  27. Cohen, J. A Power Primer. Psychol. Bull. 1992, 112, 155–159. [Google Scholar] [CrossRef]
  28. Albert, A.; Anderson, J.A. On the Existence of Maximum Likelihood Estimates in Logistic Regression Models. Biometrika 1984, 71, 1–10. [Google Scholar] [CrossRef]
  29. Debonne, E.; Vermeulen, A.; Bouboutiefski, N.; Ruyssen, T.; Van Bockstaele, F.; Eeckhout, M.; Devlieghere, F. Modelling and Validation of the Antifungal Activity of DL-3-Phenyllactic Acid and Acetic Acid on Bread Spoilage Moulds. Food Microbiol. 2020, 88, 103407. [Google Scholar] [CrossRef]
  30. Arena, M.P.; Russo, P.; Spano, G.; Capozzi, V. From Microbial Ecology to Innovative Applications in Food Quality Improvements: The Case of Sourdough as a Model Matrix. J 2020, 3, 9–19. [Google Scholar] [CrossRef]
  31. De Vuyst, L.; Comasio, A.; Kerrebroeck, S.V. Sourdough Production: Fermentation Strategies, Microbial Ecology, and Use of Non-Flour Ingredients. Crit. Rev. Food Sci. Nutr. 2023, 63, 2447–2479. [Google Scholar] [CrossRef]
  32. Gänzle, M.; Ripari, V. Composition and Function of Sourdough Microbiota: From Ecological Theory to Bread Quality. Int. J. Food Microbiol. 2016, 239, 19–25. [Google Scholar] [CrossRef]
  33. Teleky, B.-E.; Martău, A.G.; Ranga, F.; Chețan, F.; Vodnar, D.C. Exploitation of Lactic Acid Bacteria and Baker’s Yeast as Single or Multiple Starter Cultures of Wheat Flour Dough Enriched with Soy Flour. Biomolecules 2020, 10, 778. [Google Scholar] [CrossRef] [PubMed]
  34. Illueca, F.; Moreno, A.; Calpe, J.; Nazareth, T.D.M.; Dopazo, V.; Meca, G.; Quiles, J.M.; Luz, C. Bread Biopreservation through the Addition of Lactic Acid Bacteria in Sourdough. Foods 2023, 12, 864. [Google Scholar] [CrossRef]
  35. Hernández-Figueroa, R.H.; Mani-López, E.; Palou, E.; López-Malo, A. Sourdoughs as Natural Enhancers of Bread Quality and Shelf Life: A Review. Fermentation 2023, 10, 7. [Google Scholar] [CrossRef]
  36. Calasso, M.; Marzano, M.; Caponio, G.R.; Celano, G.; Fosso, B.; Calabrese, F.M.; De Palma, D.; Vacca, M.; Notario, E.; Pesole, G.; et al. Shelf-Life Extension of Leavened Bakery Products by Using Bio-Protective Cultures and Type-III Sourdough. LWT 2023, 177, 114587. [Google Scholar] [CrossRef]
  37. Axel, C.; Brosnan, B.; Zannini, E.; Peyer, L.C.; Furey, A.; Coffey, A.; Arendt, E.K. Antifungal Activities of Three Different Lactobacillus Species and Their Production of Antifungal Carboxylic Acids in Wheat Sourdough. Appl. Microbiol. Biotechnol. 2016, 100, 1701–1711. [Google Scholar] [CrossRef]
  38. Peleg, M.; Normand, M.D. Simulating Shelf Life Determination by Two Simultaneous Criteria. Food Res. Int. 2015, 78, 388–395. [Google Scholar] [CrossRef]
  39. Liu, W.; Hsu, J.C.; Bretz, F.; Hayter, A.J.; Han, Y. Shelf-Life and Its Estimation in Drug Stability Studies. J. Appl. Stat. 2014, 41, 1989–2000. [Google Scholar] [CrossRef]
  40. Klinshov, V.V.; Nekorkin, V.I.; Kurths, J. Stability Threshold Approach for Complex Dynamical Systems. New J. Phys. 2015, 18, 013004. [Google Scholar] [CrossRef]
  41. Kovaleva, A.; Manevitch, L.I. Limiting Phase Trajectories and Emergence of Autoresonance in Nonlinear Oscillators. Phys. Rev. E 2013, 88, 024901. [Google Scholar] [CrossRef] [PubMed]
  42. Rizzello, C.G.; Cassone, A.; Coda, R.; Gobbetti, M. Antifungal Activity of Sourdough Fermented Wheat Germ Used as an Ingredient for Bread Making. Food Chem. 2011, 127, 952–959. [Google Scholar] [CrossRef]
  43. Oleinikova, Y.; Amangeldi, A.; Zhaksylyk, A.; Saubenova, M.; Sadanov, A. Sourdough Microbiota for Improving Bread Preservation and Safety: Main Directions and New Strategies. Foods 2025, 14, 2443. [Google Scholar] [CrossRef] [PubMed]
  44. Khan, M.I.H.; Sablani, S.S.; Nayak, R.; Gu, Y. Machine Learning-based Modeling in Food Processing Applications: State of the Art. Compr. Rev. Food Sci. Food Saf. 2022, 21, 1409–1438. [Google Scholar] [CrossRef] [PubMed]
  45. Sharma, A.; Mittal, K.; Kumar, S.; Sharma, U.; Upadhyay, P. Impact of Artificial Intelligence and Machine Learning in the Food Industry: A Survey. In Advances in Computational Intelligence and Robotics; Khan, M.A., Khan, R., Praveen, P., Eds.; IGI Global: Hershey, PA, USA, 2022; pp. 190–215. ISBN 978-1-6684-5141-0. [Google Scholar]
  46. El-Mesery, H.S.; ElMesiry, A.H.; Husein, M.; Hu, Z.; Salem, A. Artificial Intelligence and Machine Learning Models for Predicting and Evaluating the Influence of Shelf-Life Environments and Packaging Materials on Garlic (Allium sativum L) Physicochemical and Phytochemical Compositions. Food Chem. X 2025, 29, 102731. [Google Scholar] [CrossRef]
  47. Ablegue, A.G.M.-D.; Zhang, M.; Guo, Q.; Rui, L. Monitoring and Shelf Life Extension of Food Products Based on Machine Learning and Deep Learning: Progress and Potential Applications. Food Rev. Int. 2025, 1–26. [Google Scholar] [CrossRef]
  48. Ribet, L.; Dessalles, R.; Lesens, C.; Brusselaers, N.; Durand-Dubief, M. Nutritional Benefits of Sourdoughs: A Systematic Review. Adv. Nutr. 2023, 14, 22–29. [Google Scholar] [CrossRef]
  49. Sun, W.; Jia, J.; Liu, G.; Liang, S.; Huang, Y.; Xin, M.; Chang, Z.; Liu, X.; Ma, C.; Song, X.; et al. Polysaccharides Extracted from Old Stalks of Asparagus officinalis L. Improve Nonalcoholic Fatty Liver by Increasing the Gut Butyric Acid Content and Improving Gut Barrier Function. J. Agric. Food Chem. 2025, 73, 6632–6645. [Google Scholar] [CrossRef]
  50. Li, Z.; Huang, X.; Guo, J.; Hu, Y.; Gafurov, K.; Zhang, J.; Wang, Q.; Guo, Q. Synergistic Modification of Sunflower Seed Protein by pH-Cycling and Ultrasound to Improve Its Structural and Functional Properties. Food Hydrocoll. 2026, 172, 112017. [Google Scholar] [CrossRef]
Figure 1. Breadmaking process flow chart: from refreshment to the cooled samples.
Figure 1. Breadmaking process flow chart: from refreshment to the cooled samples.
Foods 14 04236 g001
Figure 3. Bars represent standard deviation (n = 4) for physicochemical and textural properties of Control (Yeast) and PDO (Sourdough) bread samples. Different superscript letters (a,b) in each row indicate significant differences between treatments according to Tukey’s HSD post hoc test (p < 0.05).
Figure 3. Bars represent standard deviation (n = 4) for physicochemical and textural properties of Control (Yeast) and PDO (Sourdough) bread samples. Different superscript letters (a,b) in each row indicate significant differences between treatments according to Tukey’s HSD post hoc test (p < 0.05).
Foods 14 04236 g003
Figure 4. Principal Component Analysis (PCA) of physicochemical parameters in Control (Baker’s yeast) and PDO (Sourdough) bread samples ((Left): PCA score plot showing sample distribution; (Right): loading plot illustrating variable contributions).
Figure 4. Principal Component Analysis (PCA) of physicochemical parameters in Control (Baker’s yeast) and PDO (Sourdough) bread samples ((Left): PCA score plot showing sample distribution; (Right): loading plot illustrating variable contributions).
Foods 14 04236 g004
Figure 5. Decision tree summarizing physicochemical predictors of SL classification between PDO (sourdough) and Control (yeast) bread samples. Root node: starting variable defining global separation (lactic acid). Internal nodes: secondary discriminants based on pH, TTA, or texture thresholds. Terminal nodes: predicted class (PDO or Control) with sample count (n) and classification accuracy (%). Yes/No branches: logical decisions defining the threshold direction for each split. ?: decisional root tree from Random Forest Decisional Tree.
Figure 5. Decision tree summarizing physicochemical predictors of SL classification between PDO (sourdough) and Control (yeast) bread samples. Root node: starting variable defining global separation (lactic acid). Internal nodes: secondary discriminants based on pH, TTA, or texture thresholds. Terminal nodes: predicted class (PDO or Control) with sample count (n) and classification accuracy (%). Yes/No branches: logical decisions defining the threshold direction for each split. ?: decisional root tree from Random Forest Decisional Tree.
Foods 14 04236 g005
Table 1. Sampling schedule and analytical frequency for control and PDO samples across the full storage period (0–54 days). Each data point corresponds to an independent destructive unit.
Table 1. Sampling schedule and analytical frequency for control and PDO samples across the full storage period (0–54 days). Each data point corresponds to an independent destructive unit.
Storage Phase (Days)Frequency (Days)Units AnalysedQuality Status at Sampling
Early storage phase (0–16)Every 4Control + PDOStable
Mid-storage phase (16–30)Every 6–8Control + PDOInitial Fungal Growth
Late storage phase (30–54)Every 10–12PDO + Control ATMHardening texture-limited, Fungal Growth
Table 2. Physicochemical and textural characteristics of Control (Baker’s yeast) and PDO (Sourdough) bread samples (mean ± SD, n = 4).
Table 2. Physicochemical and textural characteristics of Control (Baker’s yeast) and PDO (Sourdough) bread samples (mean ± SD, n = 4).
ParameterControl (Mean ± SD)PDO (Mean ± SD)
Texture_Initial (N)6.494 ± 0.030 a8.910 ± 0.010 b
Texture_Final (N)4.568 ± 0.050 a3.328 ± 0.015 b
pH4.503 ± 0.014 a4.034 ± 0.001 b
Aw0.950 ± 0.000 a0.991 ± 0.001 b
TTA (meq/g)0.015 ± 0.000 a0.045 ± 0.001 b
Lactic acid content (g/100 g)0.030 ± 0.001 a0.334 ± 0.029 b
Acetic acid content (g/100 g)0.078 ± 0.005 a0.108 ± 0.005 b
Lactic acid/Acetic acid ratio0.387 ± 0.018 a3.056 ± 0.024 b
Different superscript letters (a,b) in each row indicate significant differences between treatments according to Tukey’s HSD post hoc test (p < 0.05). Parameters include Initial and Texture_Final (N), Aw, TTA (meq/g), pH, Lactic acid content (g/100 g), Acetic Acid content (g/100 g), and the Lactic acid/Acetic acid.
Table 3. Three-way ANOVA (F × T × A) summary of main and interaction effects on the physico-chemical and textural parameters of bread samples.
Table 3. Three-way ANOVA (F × T × A) summary of main and interaction effects on the physico-chemical and textural parameters of bread samples.
ParametersFTAF × TF × AT × AF × T × A
Texture_Initial (N)***************nsns
Texture_Final (N)***************nsns
pH***************ns***
Aw***nsns******nsns
TTA (meq/g)***************ns**
Lactic acid content (g/100 g)***nsns******ns***
Acetic acid content (g/100/g)******ns******ns***
Lactic acid/Acetic acid ratio******ns******ns***
Notes: F (Fermentation type), T (Temperature), A (Atmosphere). Statistical significance: *** p < 0.001, ** p < 0.01, ns = not significant.
Table 4. Performance Metrics of the GLM for Binary Shelf-Life Classification.
Table 4. Performance Metrics of the GLM for Binary Shelf-Life Classification.
ParametersValue (%)Note
Overall Accuracy 189.0 ± 1.5Cross-validation result
Sensitivity (Recall) 291.5 ± 2.2True positive rate
Specificity 386.5 ± 2.0True negative rate
Precision 488.0 ± 1.2Positive predictive value
F1-Score 589.7 ± 1.6Harmonic mean of precision and recall
AUC-ROC 692.0 ± 1.2Area under ROC curve
Notes: 1 proportion of correctly classified samples; 2 ability to identify acceptable samples; 3 ability to identify unacceptable samples; 4 probability that a sample predicted as acceptable is truly acceptable; 5 harmonic mean of precision and sensitivity; 6 overall discriminative ability of the model.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Marianelli, A.; Offei, C.A.; Macaluso, M.; Mercanti, N.; Casu, B.; Zinnai, A. A Machine Learning Model to Reframe the Concept of Shelf-Life in Bakery Products: PDO Sourdough as a Technological Preservation Model. Foods 2025, 14, 4236. https://doi.org/10.3390/foods14244236

AMA Style

Marianelli A, Offei CA, Macaluso M, Mercanti N, Casu B, Zinnai A. A Machine Learning Model to Reframe the Concept of Shelf-Life in Bakery Products: PDO Sourdough as a Technological Preservation Model. Foods. 2025; 14(24):4236. https://doi.org/10.3390/foods14244236

Chicago/Turabian Style

Marianelli, Andrea, Cecilia Akotowaa Offei, Monica Macaluso, Nicola Mercanti, Bruno Casu, and Angela Zinnai. 2025. "A Machine Learning Model to Reframe the Concept of Shelf-Life in Bakery Products: PDO Sourdough as a Technological Preservation Model" Foods 14, no. 24: 4236. https://doi.org/10.3390/foods14244236

APA Style

Marianelli, A., Offei, C. A., Macaluso, M., Mercanti, N., Casu, B., & Zinnai, A. (2025). A Machine Learning Model to Reframe the Concept of Shelf-Life in Bakery Products: PDO Sourdough as a Technological Preservation Model. Foods, 14(24), 4236. https://doi.org/10.3390/foods14244236

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop