Source-linked AI summary
Multi-Step Forecasting of Grape Berry Temperature based on LSTM Model with Feed-Forward Attention
Srikanth Gorthi, L. G. Divyanth, Dattatray Bhalekar, Markus Keller, Lav Khot
TL;DR
The paper addresses the need for reliable future grape berry temperature forecasts to support vineyard heat-stress management. It develops an attention-enhanced LSTM and evaluates it across forecast horizons, benchmark models, and weather-input scenarios. FAM-LSTM consistently performs best, while in-vineyard microclimate data improve longer-horizon accuracy and peak daytime periods remain the most uncertain.
Problem
Reliable multi-step grape berry temperature forecasting is needed because existing approaches struggle with nonlinear environmental interactions, real-time use, or extended forecast windows.
Method
The study integrates feed-forward attention with LSTM encoding and compares FAM-LSTM with LSTM, GRU, RNN, and RF using open-field and in-vineyard inputs.
Results
FAM-LSTM consistently outperformed all benchmark models across horizons up to 72 hours and both input scenarios, while in-vineyard data yielded superior accuracy.
Takeaways & Limitations
Open-field FAM-LSTM remained operationally meaningful at 72 hours, while in-vineyard microclimate observations provided additional accuracy for heat-stress decision support.
Takeaways & Limitations
The framework still requires validation across additional cultivars, vineyard locations, and canopy architectures, and future work should consider predicted meteorological inputs.
Abstract
from arXiv · showhide
Accurate forecasting of grape berry temperature (Tb) is essential for enabling timely heat stress management in vineyards. In this study, a feed-forward attention mechanism integrated with a Long Short-Term Memory network (FAM-LSTM) was developed and evaluated for multi-step, high-resolution Tb prediction. Models were trained using environmental data from 2023 and 2024 at Prosser, WA, USA, and validated on 2025 summer data. FAM-LSTM was benchmarked against LSTM, GRU, RNN, and Random Forest (RF) across horizons ranging from 15 minutes to 72 hours (288 time steps). Two input scenarios were evaluated: nearest open-field weather station observations and in-vineyard microclimate measurements. FAM-LSTM consistently outperformed all benchmark models across all horizons and input scenarios. Incorporating in-vineyard microclimate data significantly improved forecasting accuracy at longer horizons. Using open-field data, FAM-LSTM achieved MAE and RMSE ranges of 0.58 to 1.70 deg C and 0.65 to 2.07 deg C, respectively. In-vineyard observations further improved performance, with MAE and RMSE in the ranges of 0.51 to 1.55 deg C and 0.71 to 1.87 deg C. Error analysis showed prediction uncertainty was highest during peak daytime periods (11:00 to 18:00) and increased progressively with forecast horizon. Overall, the FAM-LSTM framework offers robust Tb forecasting to support precision heat stress management in vineyards.
1. Introduction
Grape berry temperature is difficult to estimate because heat, radiation, and nonlinear environmental interactions affect berry quality and heat-stress risk. The study therefore develops multi-step FAM-LSTM forecasting and compares it with established models using open-field and in-vineyard data.
- Heat-stress motivation: Temperatures above 35 °C and prolonged solar or UV exposure can damage grape growth, ripening, composition, coloration, and wine quality.Berry temperature may reach 15 °C above ambient air temperature, and values above 45 °C can cause sunburn injury.
- Heat-stress motivation: Accurate berry temperature estimation is critical for detecting grape heat stress and supporting mitigation in vineyards.The paper links timely mitigation to maintaining grape berry quality.
- Forecasting challenge: Berry temperature reflects nonlinear interactions among air temperature, solar radiation, wind speed, humidity, and soil temperature.Convective exchange can raise or lower berry temperature depending on temperature gradients and wind conditions.
- Forecasting challenge: Physics-based models remain limited for real-time mitigation, while prior machine-learning work predicted current rather than future berry temperature.The paper identifies a need for adaptable data-driven forecasting under heterogeneous vineyard conditions.
- Forecasting challenge: Traditional statistical and machine-learning methods often struggle with temporal dependencies and long-term or multi-step environmental forecasting.Prior deep-learning studies also showed declining accuracy as forecast windows lengthened.
- Study approach: FAM-LSTM integrates feed-forward attention with LSTM encoding to forecast berry temperature every 15 minutes across 72 hours and benchmark performance against LSTM, RNN, GRU, and RF.The study evaluates both open-field and in-vineyard weather inputs.
2.1. Data Collection
The study collected berry temperature and environmental observations in a Chardonnay vineyard in Prosser, Washington, using local sensors and LoRaWAN transmission. It prepared both in-vineyard and nearest-station open-field weather datasets for model evaluation.
- Study site: Data were collected in Washington State University’s Roza experimental vineyard in Prosser, Washington, from Chardonnay vines established in 2010.The site has an arid climate with hot, dry summers and cold winters.
- Sensors: Berry temperature was measured with one thermistor and three E-type thermocouples inserted into west-facing berries exposed to afternoon sun.Air temperature and humidity were measured at 1.5 m above ground, while soil moisture was measured at 10 cm depth.
- Sensors: The sensing system collected observations through a LoRaWAN wireless network at 15-minute intervals.The network supported continuous berry-temperature and environmental monitoring.
- Input datasets: Two meteorological datasets represented in-vineyard measurements and observations from the nearest WSU AgWeatherNet open-field station.The in-vineyard dataset included air temperature, relative humidity, soil moisture, and soil temperature.
2.2. Data pre-processing
Preprocessing regularized the sensor time series, repaired missing or anomalous observations, reduced noise, and transformed variables to support model training. Derived temporal features represented temperature changes and daily cycles.
- Data cleaning: Outliers were screened using box-plot criteria, while missing observations were reconstructed according to gap length.Short gaps used time-based linear interpolation; longer gaps used nearby observations under comparable weather conditions.
- Data cleaning: A uniform 15-minute time index re-indexed all environmental and berry-temperature measurements for temporal consistency.This established the expected sampling timeline across the monitoring period.
- Noise reduction: A Savitzky–Golay filter with window length 4 and polynomial order 2 attenuated high-frequency sensor noise while preserving diurnal temperature extremes.Preserving extreme timing and magnitude was important for characterizing berry heat-stress dynamics.
- Derived features: First- and second-order air-temperature differences represented instantaneous change and acceleration or deceleration of the heating process.These adjacent-difference features quantified transitions in ambient conditions.
- Derived features: Sine and cosine hour-of-day features represented continuous daily heating–cooling cycles without artificial midnight discontinuities.The encoding helps the model learn periodic patterns affecting environmental variables and berry temperature.
- Scaling: All variables were min–max normalized to [0, 1] to reduce scale-related bias and facilitate model convergence.The normalized value uses each variable’s observed minimum and maximum across the dataset.
2.3. Selection of input variables
Input-variable selection evaluated each environmental feature’s linear association with berry temperature using Pearson correlation. Variables with very weak correlations were excluded to reduce model complexity and computation time.
- Correlation screening: Pearson’s correlation coefficient measured the association between berry temperature and each environmental factor.The evaluated factors included variables used in both in-vineyard and open-field models.
- Correlation screening: Very weakly correlated environmental variables were excluded before training to reduce high-dimensional input overhead.Correlation strength was classified from very weak through very strong using absolute r thresholds.
2.4. Data preparation for time-series modeling
The time series was converted into overlapping supervised input-output pairs, using historical measurements to predict future Tb values across multiple steps. Training used 2023–2024 data, while 2025 data served exclusively for testing.
- Historical measurements were transformed into supervised learning pairs with a fixed-length input window and future Tb output window.The input covers past time steps, while the target sequence contains Tb values from t + 1 through t + nout.
- The sliding window moved in 15-minute increments, generating overlapping pairs for both in-vineyard and open-field scenarios.
- 2023 and 2024 data were used for training, whereas 2025 data served exclusively as the test set.The dataset contained n = 2232 training observations and n = 744 test observations, with a 75%/25% split.
2.5. Grape berry temperature forecasting models
The forecasting framework combines LSTM temporal representation with feed-forward attention that dynamically weights informative hidden states and input features. It generates multi-step Tb forecasts from multivariate historical inputs and is evaluated against recurrent and ensemble baselines using standard error metrics.
- Long short term memory network: LSTM gating and cell-state memory encode nonlinear temporal patterns and long-term dependencies in environmental time-series data.The input, forget, and output gates regulate information flow through the cell state and hidden state.
- Feed-forward attention mechanism: Feed-forward attention assigns normalized, adaptive weights to input features and hidden representations to emphasize more informative temporal information.The attention-weighted representations are aggregated into context vectors for subsequent prediction.
- FAM-LSTM model configuration: FAM-LSTM processes multivariate inputs as [S, T, X] tensors through stacked LSTM layers and produces Tb forecasts in [O, H] form.The architecture uses two stacked LSTM layers with dropout, followed by attention, a fully connected layer, and an output layer.
- Model evaluation and comparison: The model was benchmarked against LSTM, RNN, GRU, and RF after repeated architectural optimization.
- Model evaluation and comparison: All models used the preceding 72 hours, or 288 15-minute steps, to forecast Tb over a 72-hour horizon.
- Model evaluation and comparison: MAE, RMSE, and MAPE evaluated prediction error, with lower values indicating higher predictive accuracy.MAE measures average deviation, RMSE weights large errors more heavily, and MAPE expresses error as a percentage.
3. Results and Discussion
FAM-LSTM produced the strongest multi-horizon berry-temperature forecasts across open-field and in-vineyard inputs, while localized measurements improved accuracy and reduced peak-temperature underestimation. Errors increased with forecast horizon and were highest during daytime warming periods.
- Correlation analysis: Ta,IW showed the strongest correlation with Tb across in-vineyard variables (r = 0.98), exceeding the corresponding open-field association.Localized relative humidity was also more strongly negatively correlated with Tb than open-field relative humidity.
- Open-field forecasting: 0.58 °C MAE and 0.65 °C RMSE: FAM-LSTM achieved the lowest reported open-field errors at the 15-minute horizon.It also recorded MAPE = 2.65%, outperforming LSTM, GRU, RNN, and RF at this horizon.
- Open-field forecasting: 1.70 °C MAE and 8.09% MAPE: FAM-LSTM remained best at 72 hours, although accuracy declined as the forecast horizon increased.At 24 hours, it achieved MAE = 1.47 °C and MAPE = 7.12%.
- Forecast behavior: Peak daytime Tb was systematically underestimated with open-field inputs, whereas in-vineyard measurements substantially reduced, but did not eliminate, this error.Open-field stations may miss canopy-level radiation and thermal conditions; localized measurements more closely represent berry microclimate.
- In-vineyard forecasting: 12.1% and 8.8% MAE improvement: in-vineyard FAM-LSTM outperformed open-field FAM-LSTM at 15-minute and 72-hour horizons, respectively.In-vineyard MAE was 0.51 °C at 15 minutes and 1.55 °C at 72 hours, compared with 0.58 °C and 1.70 °C using open-field inputs.
- Temporal error analysis: 1.66 °C daytime MAE versus 0.86 °C overnight/morning MAE: open-field errors were highest during 11:00–18:00 and lowest during 18:00–11:00.Rapidly changing radiation, wind, and turbulent heat exchange make daytime berry temperatures more difficult to predict.
- Practical implications: 29.2% peak-temperature error reduction: in-vineyard inputs lowered 0–24-hour peak Tb MAE from 1.66 °C to 1.17 °C.Open-field FAM-LSTM nevertheless maintained MAPE below 9% at 72 hours, supporting its use where canopy sensors are unavailable.
4. Conclusions
The FAM-LSTM model consistently outperformed benchmark models for grape berry temperature forecasting across horizons up to 72 hours and both input scenarios. In-vineyard data improved accuracy, while uncertainty increased during daytime and with forecast horizon.
- FAM-LSTM consistently outperformed LSTM, GRU, RNN, and RF across prediction horizons up to 72 hours and both input scenarios.
- In-vineyard microclimate data yielded superior accuracy across all models and horizons, with FAM-LSTM reducing MAE by 8.8–29.2% relative to open-field FAM-LSTM.
- Prediction uncertainty was highest during daytime warming and peak berry temperatures, increasing from MAE = 0.5–1.7 °C at 0–24 hours to MAE = 1.4–2.0 °C at 48–72 hours.