Source-linked AI summary
Beyond Thresholds: A Quality-Aware Decision Intelligence Framework for Cold Chain IoT Systems
Aashna Sofat, Balwinder Sodhi
TL;DR
Cold-chain systems often monitor thresholds or predict shelf life without translating cumulative degradation into operational decisions. QADI combines a structured quality state, hybrid quality modeling, and grounded LLM reasoning, achieving near-perfect decision optimality across evaluated scenarios.
Problem
Existing cold-chain systems estimate quality or trigger threshold alerts but lack a unified architecture for translating uncertain quality states into real-time, explainable operational decisions.
Method
QADI bridges microbial kinetics and LLM-based reasoning through a computable quality state representing shelf life, degradation rate, uncertainty, and operational risk.
Results
Across eight scenarios, QADI showed lower shelf-life error, comparable-to-lower spoilage, and near-perfect decision optimality, reaching 99.5% aggregate optimality.
Takeaways & Limitations
The findings indicate that effective cold-chain decision intelligence requires reasoning about cumulative degradation dynamics rather than relying on improved threshold calibration alone.
Takeaways & Limitations
Fixed-threshold monitoring cannot detect cumulative spoilage when temperature remains below the alert threshold, and shelf-life prediction systems do not prescribe operational actions.
Abstract
from arXiv · showhide
Cold chain logistics has advanced technologically, yet most deployed systems remain reactive monitors, not decision-making agents: thresholds trigger alerts, but nothing relates violations to cumulative product degradation or converts degradation signals into logistics decisions. We address this gap with a Quality-Aware Decision Intelligence (QADI) framework combining three capabilities: a structured quality state representation, $S_q = [L, Q, U, R]$ -- remaining shelf life, degradation rate, estimation uncertainty, and operational risk, all derived and computable from the framework equations; a hybrid quality modeling layer combining physics-based microbial kinetics with a data-driven correction term; and a reasoning layer built on Microsoft Phi-4~\cite{Phi4} with retrieval-augmented generation over a structured domain knowledge base. We benchmark against five baselines -- threshold monitoring, physics-only, physics-plus-noise, optimisation-based decisions, and a rule-based expert system -- across eight cold chain scenarios, using pasteurised milk as the primary case, with ground truth shelf-life drawn from published dairy studies~\cite{Singh1994, Smigic2015} independent of our model. Comparisons use Wilcoxon signed-rank tests with Holm correction. Across milk and broccoli scenarios, the framework attains mean absolute shelf-life error of 7.2 hours (versus 30.9 hours, physics-only; $p<0.001$), spoilage rate of 14.5% (versus 16.6%, physics-only and rule-based; p=0.08), and oracle-optimal decisions in 99.5% of scenarios. Removing the LLM reasoning component drops optimality to 45.5% ($p<0.001$). Expert-rated explanation quality reaches 83% ($κ= 0.71$). Ablations show hybrid modeling and LLM reasoning contribute distinct gains, while RAG retrieval mainly drives explanation quality. Code: https://bit.ly/4d6t44C.
1 Introduction
Cold-chain IoT systems collect fine-grained telemetry but predominantly issue threshold alerts rather than translating cumulative quality degradation and operational context into explainable decisions. The paper addresses this reasoning gap with a computable quality-state abstraction, hybrid quality modeling, grounded LLM reasoning, and rigorous evaluation.
- Motivation: IoT platforms collect temperature, humidity, and GPS telemetry at sub-minute resolution, yet cold-chain operations still predominantly act on scalar threshold violations.The introduction identifies a mismatch between monitoring capability and decision capability.
- Limitations: 40%: continuous storage at 6.5 °C can reduce shelf life relative to ideal cold storage without triggering an 8 °C threshold alert.This illustrates how instantaneous threshold monitoring can miss cumulative product degradation.
- Limitations: Physics-based and machine-learning shelf-life models estimate quality but do not prescribe actions for the current quality trajectory and logistical state.The unresolved operational question is what should be done immediately given evolving quality and logistics.
- Contributions: The framework defines Sq = [L, ˙Q, U, R] as a computable abstraction bridging physics-based quality modeling and LLM-based reasoning.The four components are formally derived in Eqs. 4–7.
- Contributions: The proposed system combines microbial kinetics, held-out data-driven correction, Phi-4 reasoning, and RAG over a 143-document structured knowledge base.The hybrid model is evaluated against published empirical shelf-life references rather than model-derived ground truth, while a RAG ablation isolates retrieval’s contribution.
- Contributions: 150 runs per scenario: evaluation covers eight primary scenarios, five baselines, Wilcoxon tests with Holm correction, explanation reliability, and architectural ablations.The evaluation is designed to separate prediction and decision contributions and reports inter-rater reliability for explanation quality.
2 Related Work
Related work spans anomaly detection, quality degradation modeling, optimisation, and LLM-IoT integration, but existing systems remain fragmented. The central gap is moving from reactive monitoring toward grounded, uncertainty-aware, context-sensitive decisions across all five framework dimensions.
- Monitoring and anomaly detection: Reactive threshold-driven systems dominate refrigerated transport, although sensor fusion can detect excursion events earlier than single-sensor approaches.The literature identifies prescriptive capability as the central open challenge.
- Quality degradation modeling: Physics-based quality models use modified Gompertz or Baranyi–Roberts kinetics with Arrhenius temperature dependence, while empirical dairy shelf-life datasets provide measured references.These models establish the conventional basis for microbial spoilage and shelf-life estimation.
- Quality degradation modeling: Machine learning improves flexibility through CNN-based temperature time-series prediction, but neither physics-based nor data-driven models alone supports robust real-world deployment.This motivates combining physical structure with data-driven correction.
- Decision and optimisation approaches: Optimisation research targets inventory routing and temperature control offline, using idealised quality models without uncertainty or context-dependent reasoning.Causal machine learning shows that causal reasoning can improve intervention effectiveness over associative prediction.
- LLM-IoT reasoning: LLM-IoT studies identify domain grounding as critical, while structured process-state representations enable actionable recommendations and viable industrial state-to-reasoning pipelines.Structured intermediate representations help avoid hallucinated or physically incoherent responses.
- Research gap: Table 1 reports that no existing system spans all five dimensions addressed by the proposed framework simultaneously.The coverage comparison frames the framework as an integration across previously separate capabilities.
3 Problem Formulation
The formulation represents cold-chain conditions as a partially observed stochastic dynamical system and models quality as path-dependent degradation driven by temperature history. It then extends scalar shelf life into uncertainty- and risk-aware action selection over logistics interventions.
- 3.1 The Cold Chain as a Dynamic System: Cold-chain conditions evolve continuously under irregular, partially observable logistics events such as door openings, delays, route deviations, and equipment failures.The environmental state E(t) includes temperature, humidity, and other ambient variables.
- 3.2 Quality Degradation Dynamics: Product quality Q(t) decreases monotonically over time at a rate determined by temperature history.The degradation rate follows an Arrhenius-type temperature relation.
- 3.2 Quality Degradation Dynamics: Quality loss is path-dependent, so shipments at the same current temperature can have different remaining shelf lives because their thermal histories differ.This makes current temperature alone insufficient to characterize product condition.
- 3.3 Limitations of Scalar Shelf-Life: Scalar shelf life L omits deterioration rate, uncertainty quantification, and operational risk.Inputs including initial microbial load, temperature traces, and sensor calibration are noisy, while products with identical L may follow different deterioration trajectories.
- 3.4 The Decision Problem: The policy exhaustively evaluates available actions, including maintaining or changing routes, reprioritising, adjusting setpoints, and initiating discount sales.The action space is denoted A, and the policy seeks a best action at the current time t.
- 3.4 The Decision Problem: The decision policy conditions its action on environmental history E0:t, logistics history L0:t, and product parameters θp.These variables encode the system’s knowledge of the current situation.
- 3.4 The Decision Problem: Each action is evaluated by projected future quality, its resulting product value, and intervention cost, with the system selecting the action that maximises net value.Rerouting can alter transit time and bacterial growth, while intervention costs differ across actions.
- 3.4 The Decision Problem: Decision-making is difficult because future quality is uncertain, logistics events are only partially observable, and the quality-to-value mapping depends on context.These challenges motivate the uncertainty U(t), risk R(t), and LLM reasoning components.
4 Proposed Framework
QADI is a five-stage cold-chain pipeline that estimates an interpretable quality state, combines physics with learned correction, and uses constrained LLM reasoning to produce ranked logistics actions and explanations. Its quality state extends shelf life with degradation dynamics, uncertainty, and operational risk so decisions can be proactive and context-sensitive.
- Pipeline architecture: The five-stage pipeline extracts IoT features, estimates Sq, reasons over logistics context and domain knowledge, then selects a constrained action.The LLM receives Sq and context but does not modify upstream quality estimates; its role is decision quality and explanation generation.
- Quality state representation: Sq = [L, Q, U, R] represents remaining shelf life, degradation rate, estimation uncertainty, and operational risk as a minimal interpretable state.The framework presents this four-component state as an extension of scalar shelf life that supports proactive, uncertainty-aware, context-sensitive decisions.
- Quality state representation: R > 0.6 when remaining transit exceeds approximately 14% of estimated shelf life, triggering reasoning across scenarios with meaningful intervention risk.The calibration uses α = 10 and β = 1, with corrected-physics shelf lives of 100–160 h and transit windows of 36–52 h.
- Hybrid quality modeling: The hybrid layer combines a physics-based microbial degradation model with a two-layer LSTM residual correction using temperature and logistics-history features.For pasteurised milk, the physics component models psychrotrophic microbial growth, while the LSTM predicts residuals against reference shelf-life midpoints.
- LLM reasoning and retrieval: Each Phi-4 call serialises Sq and logistics context, retrieves domain knowledge, and returns a causal explanation, ranked actions with expected impact on L and R, and confidence.The model runs locally without cold-chain-specific fine-tuning, while retrieval injects the top-3 documents from a 143-document structured knowledge base.
5 Implementation
The implementation is a reproducible modular monolith evaluated with deterministic, noisy scenarios and independent empirical shelf-life references. It also tests structural threshold-monitoring failure, out-of-distribution correction, and cross-product generalisability.
- Implementation: All code, scenario configurations, and experimental artifacts are provided as a modular monolith implementation.The implementation follows the design presented in §4.6 and is available at the supplied repository link.
- Scenario generation: Each scenario is generated deterministically from G(seed, ψ), with ψ specifying temperature profile, noise level, logistics events, and product type.Experiments use seeds 42, 123, and 999, with 150 runs per scenario and results reported as mean ± standard deviation.
- Evaluation references: Shelf-life ground truth comes from published pasteurised-milk studies reporting measured sensory or microbiological rejection times, independently of the logistic growth model.For multi-temperature profiles, the framework uses a weighted effective temperature and the same interpolated reference midpoint for every method.
- Threshold limitation: Approximately 40% shelf-life loss occurs under sustained 6.5 °C conditions while the 8 °C threshold baseline never alerts during the 48-hour journey.The passage identifies this as a structural limitation that cannot be fixed through threshold recalibration without causing false positives under normal refrigeration.
- Hybrid correction: The LSTM correction trains on 10,000 synthetic scenarios from P1–P4, while P5 is held out entirely for out-of-distribution testing.Training uses an 80/20 train/validation split, MSE loss, Adam, learning rate 10^-3, 100 epochs, and early stopping with patience 10.
- Generalisability: The same S_q representation and QADI pipeline operate across milk, broccoli, and vaccines, changing only degradation models and parameters.Broccoli uses re-parameterised microbial dynamics, whereas vaccines use a WHO-guideline-inspired linear degradation model with temperature-dependent kV and Qcrit = 0.80.
6 Evaluation · 6.1 Experimental Scenarios
The evaluation defines eight primary scenarios, expanded to eleven configurations, to test cold-chain capabilities and failure modes. Controlled comparisons use a single decision point at t = 24 h, while continuous deployment is described separately.
- 6.1 Experimental Scenarios: Eight primary scenarios expand to eleven configurations, including S5b and three S7 product sub-scenarios.Table 5 states that each scenario isolates a specific capability or failure mode.
- 6.1 Experimental Scenarios: S1–S6 and S8 use pasteurised milk with empirical ground truth from.These scenarios provide the primary controlled evaluation setting.
- 6.1 Experimental Scenarios: S7 uses per-product parameters from Section 5.5.The scenario extends evaluation beyond the pasteurised-milk configurations.
- 6.1 Experimental Scenarios: S8 adds economic value assignment to assess decision quality in business-value terms.This scenario evaluates decisions using economic consequences rather than quality outcomes alone.
- 6.1 Experimental Scenarios: Each run is evaluated at a single fixed decision point, t = 24 h, the midpoint of the 48 h temperature trace.All methods therefore share the same observation history at the decision point.
- 6.1 Experimental Scenarios: At t = 24 h, half the transit window remains, testing single-shot decision capability.The fixed timing supports controlled comparison across methods.
- 6.1 Experimental Scenarios: Continuous deployment instead invokes the reasoning service at R-threshold crossings or on scheduled intervals.This operational mode is described in the Section 4 architecture rather than evaluated at the fixed decision point.
6.2 Baselines and Ablations
The evaluation compares QADI with five baselines spanning threshold monitoring, physics-based prediction, noisy estimation, optimization, and rule-based expertise. Three ablations isolate the contributions of LLM reasoning, uncertainty estimation, and retrieval-augmented generation.
- Baselines: B1 alerts when temperature > 8 °C but provides neither quality modeling nor action recommendations, representing current industry practice.
- Baselines: B2 uses microbial growth physics without ML correction or reasoning, while B3 adds Gaussian estimation noise with σ = 8 h.B3 proxies an unconstrained ML-only predictor lacking physics regularization and uses the same decision heuristic as B2.
- Baselines: B4 exhaustively maximizes expected product survival fraction minus action cost using physics-based shelf-life projections, without LLM reasoning.
- Baselines: B5 applies hard-coded temperature and delay rules with a fixed quality-state proxy, lacking real-time quality estimation and directly competing with the reasoning layer.For example, delay >4 h combined with temperature >8 °C triggers rerouting; otherwise, the route is maintained.
- Ablations: V1 removes LLM reasoning and LSTM correction, V2 sets uncertainty estimation to U ≡0, and V3 removes RAG retrieval while retaining Phi-4.V3 uses a fixed system prompt without retrieved context.
6.3 Evaluation Metrics
The evaluation defines seven metrics spanning shelf-life accuracy, spoilage, decision quality, response time, robustness, explanation quality, and preserved economic value. Metrics use empirical references, simulated batches, oracle actions, noise conditions, expert review, and a no-intervention comparison.
- Evaluation Metrics: M1: Shelf-life MAE (h) is measured against empirical reference midpoints, excluding B1 and B5 because they produce no shelf-life estimates.The metric evaluates shelf-life estimation error against empirical reference midpoints.
- Evaluation Metrics: M2: Spoilage rate is the percentage of simulated batches reaching consumers with Q < Qcrit.This metric captures consumer-reaching batches whose quality falls below the critical threshold.
- Evaluation Metrics: M3: Decision optimality is the percentage of scenarios selecting the oracle-optimal action that maximises V − C at t = 24 h.The oracle is obtained by exhaustive enumeration over A using exact physics parameters and the shared batch state; all methods share the same simulated microbial count and temperature trace.
- Evaluation Metrics: M4: Time-to-action measures elapsed hours from event onset to the first corrective action, while M5 measures MAE degradation under elevated versus baseline noise.M5 compares σ = 1.5 °C in Scenario S5 with σ = 0.5 °C in Scenario S1.
- Evaluation Metrics: M6: Explanation quality is the percentage of LLM outputs rated causally correct by domain experts.The expert review procedure is described in Section 6.5.6.
- Evaluation Metrics: M7: Economic value preserved is the percentage of initial product value retained relative to no intervention in Scenario S8.The comparison uses the no-intervention condition as the reference.
6.4 Statistical Analysis
The study compares the proposed system with each baseline using distribution-free Wilcoxon signed-rank tests, applies Holm correction for multiple comparisons, and reports corrected p-values with rank-biserial effect sizes.
- Statistical Analysis: Pairwise comparisons use Wilcoxon signed-rank tests without distributional assumptions, with Holm step-down correction for multiple comparisons.Results report Holm-corrected p-values and rank-biserial correlation r as the effect size, using α = 0.05 as the significance threshold.
6.5 Results
QADI substantially improves shelf-life prediction and decision optimality over the evaluated baselines, while its LLM reasoning and retrieval support action selection and explanation quality. Performance gains vary by scenario, with occasional overshooting under complex temperature profiles and no significant spoilage-rate difference.
- Shelf-life prediction: 7.2 h mean MAE versus 30.9 h for physics-only B2 and 31.7 h for physics-plus-noise B3 (both p < 0.001).On disturbance scenarios, QADI achieves 13.1 h versus 27.1 h for B2, but B2 outperforms QADI on held-out S8, 3.9 h versus 6.2 h.
- Spoilage and value preservation: 14.5% spoilage is lower than the 16.6% reported for B2, B3, and B5, but no spoilage comparison is statistically significant (p ≥0.08).QADI preserves 84.9% of product value versus 79.7% for V1, while V1 records 14.9% spoilage versus QADI’s 14.5% (p = 0.73).
- Decision optimality: 99.5% oracle-optimal action selection significantly exceeds B1 at 34.2% and V1 without LLM at 45.5% (both p < 0.001).B2, B3, and B5 achieve 90.9% optimality, while QADI’s residual 0.5% suboptimality comes from rare spurious a4 recommendations when a1 is optimal.
- Ablation results: +23.7 h MAE after removing the LLM, alongside a −54.0 pp reduction in decision optimality and −83 pp explanation quality, identifies LLM reasoning as the largest single-component effect.V1 has 32.6 h versus 2.9 h MAE at low-noise S1, despite lower noise-induced degradation than QADI.
7 Discussion
The discussion identifies structural inadequacy in threshold monitoring and distinct contributions from LLM reasoning and retrieval to decisions and explanations, while finding no demonstrated direct spoilage benefit from uncertainty modeling. It also highlights temperature-assumption, grounding, product-generality, evaluation-scope, and operational-validity limitations.
- Contributions: 34.2% decision optimality for threshold monitoring reflects structural inadequacy: in S3, B1 issued no alert during 48 hours at 6.5 °C despite 40% shelf-life loss.The discussion states that recalibration would require unacceptable false positives during normal refrigerated transport.
- Contributions: 54.0 pp separates V1 without LLM reasoning at 45.5% decision optimality from the full system at 99.5%, attributing the gap to contextual reasoning.B4 reached 100% optimality but was not significantly above QADI (p = 0.66).
- Contributions: 21 pp separates V3 without RAG at 62% causal correctness from the full system at 83%, while V3 matches QADI on optimality.Retrieved kinetics summaries and decision precedents primarily ground explanations rather than select actions in the evaluated scenarios.
- Limitations: Identical spoilage rates, decision outcomes, and noise robustness were observed for V2 without uncertainty and the full system, including ΔMAE S1→S5 = +5.1 h.The uncertainty component remains architecturally valuable for confidence-aware prompting, but its direct spoilage-reduction role was not demonstrated.
- Limitations: Quantitative validity is limited by forward-temperature assumptions, deeper evaluation in pasteurised milk than broccoli or vaccines, canonical profiles, and reliance on a single primary dairy product class.Field validation with real logistics data and operators remains necessary, while non-microbial spoilage requires different degradation formulations.
- Limitations: 17% of LLM outputs were causally incorrect, and the residual 0.5% decision suboptimality came from occasional over-interventions rather than systematic action-type failure.The discussion identifies fine-tuning and additional precedent documents as available mitigations, especially for high-stakes pharmaceutical cold chains.
8 Conclusion
The conclusion presents QADI as a quality-aware decision framework that connects computable physical quality states to operational action through microbial modeling and LLM reasoning. Across evaluated scenarios, QADI improves shelf-life prediction while exposing structural limitations of threshold monitoring and outlining deployment and modeling extensions.
- Conclusion: QADI introduces Sq = [L, ˙Q, U, R], a fully computable quality state that bridges microbial kinetics modeling and LLM-based reasoning.The representation connects physical quality state to operational action.
- Evaluation findings: 7.2 h shelf-life prediction error versus 30.9 h for physics-only, with p < 0.001 and r = 0.74.Evaluation used five baselines, eight primary scenarios, published empirical dairy data as ground truth, and Wilcoxon signed-rank tests with Holm correction.
- Evaluation findings: 14.5% spoilage versus 14.3–16.6% for baselines, showing a directional trend with p = 0.08.The comparison covered five baselines across eight primary scenarios with 150 runs per scenario.
- Operational limitation: Threshold-based monitoring cannot detect mild sustained temperature elevation below the threshold, requiring reasoning about cumulative degradation dynamics rather than better threshold calibration.The conclusion identifies this as the most operationally significant finding.
- Future directions: Future work includes Phi-4 fine-tuning, improved LSTM generalisation, Bayesian physics modeling, field validation, and multi-product, multi-leg routing optimisation.These directions target explanation error, grounding, over-intervention, uncertainty updating, practical utility, and jointly optimized interacting shipments.