arXiv:2608.29008cs.AIAug 2026

Manuscript Offprint

arXiv:2608.29008

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Accurate forecasting of grape berry temperature (TbT_b) 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

*Corresponding author. Email address: lav.khot@wsu.edu (Lav Khot)

(FAM-LSTM) was developed and evaluated for multi-step, high-resolution TbT_b prediction. The models were trained using environmental data collected during the summer of 2023 and 2024 from a research vineyard (cv. Chardonnay) located at Prosser, WA, USA, and validated on data from the summer of 2025. The proposed FAM-LSTM model was benchmarked against conventional approaches, including Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), Recurrent Neural Network (RNN), and Random Forest (RF), across prediction horizons ranging from 15 minutes to 72 hours at a 15-minute temporal resolution (288 time steps). Additionally, two input scenarios were evaluated: (1) nearest open-field weather station observations and (2) in-vineyard microclimate measurements (i.e., air temperature and relative humidity). The model performance was assessed using mean absolute error (MAE), root mean squared error (RMSE), and mean absolute percentage error (MAPE). Results indicate that the FAM-LSTM model consistently outperformed all benchmark models across all prediction horizons and input scenarios. Furthermore, incorporating in-vineyard microclimate data significantly improved forecasting accuracy, particularly at longer horizons (72 h). Using open-field weather data, the FAM-LSTM achieved MAE, RMSE and MAPE in the respective ranges of 0.58 to 1.70°C, 0.65 to 2.07°C, and 2.65 to 8.09%. In-vineyard observations further improved the model performance with respective MAE, RMSE, and MAPE in the ranges of 0.51 to 1.55°C, 0.71 to 1.87°C, and 2.48 to 7.68%. Error analysis revealed that prediction uncertainty was highest during peak daytime periods (11:00 to 18:00) and increased progressively with the forecast horizon. Overall, FAM-LSTM framework offered a robust and high-resolution TbT_b forecasting and could support precision heat stress management in vineyards. Future work will focus on extending the model to multiple grape cultivars and increasing forecast resolution to five minutes.

Keywords:

Berry Temperature, LSTM, Forecasting, Vineyards, Heat Stress Management.

1. Introduction

As in other parts of the world, heat waves (daily maximum temperatures above 35 °C) have become increasingly frequent in the Pacific Northwest (PNW) region of the United States. These high temperatures are affect-ing agricultural production, particularly in perennial specialty crops such as grapes, apples, and blueberries. Particularly in grapes, the optimal temperature to synthesize berry anthocyanin is approximately 30 °C (Keller, 2010), and anthocyanin accumulation is highly sensitive to temperature and light during the ripening phase (Zheng et al., 2016). The color, firmness, sugar, and acid content of grape berries are important indicators for their quality and they degrade when exposed to high air temperature and solar radiation for prolonged periods (Tarara et al., 2008; Cohen et al., 2012; Torres et al., 2020). Thus, timely and effective heat-stress mitigation is crucial for maintaining grape berry quality. However, the lack of timely and reliable decision-support tools remain a significant challenge for implementing appropriate mitigation strategies.

Temperatures above 35 °C with extensive solar radiation exposure can impose severe physiological stress on grape berries affecting growth, ripening, sugar accumulation, acidity, and coloration (Keller, 2023). Prolonged exposure to heat and ultraviolet (UV) radiation can degrade anthocyanins in red cultivars and accelerate acid loss and dehydration in both red and white cultivars, ultimately diminishing wine quality. During a heat event, the berry temperature (TbT_b) can rise up to 15 °C above ambient air temperature, with TbT_b above 45 °C potentially causing sunburn injury and associated yield and economic losses (Müller et al., 2023). Therefore, accurate berry temperature estimation is critical for detecting heat stress on grapes for effective heat-stress mitigation in vineyards.

Berry temperature is governed by complex and nonlinear interactions among environmental variables, including air temperature (TaT_a), solar radiation, wind speed, relative humidity, and soil temperature (TsT_s) (Heilman et al., 1994; Hicks, 1973; Nobel, 1999; Kool et al., 2016). For example, convective heat exchange between the surrounding air and berry surface can either increase or decrease TbT_b depending on the prevailing temperature gradient and wind conditions, while incident solar radiation can substantially elevate TbT_b above TaT_a. Previous studies have estimated TbT_b using mechanistic or energy-balance models (Ortega-Farías et al., 2010; Spanò et al., 2000; Sene, 1994; Cola et al., 2009; de León and Bailey, 2021), as well as physical berry mimics (Vogel et al., 2022). Although these approaches provide a physics-based representation of berry thermal dynamics, their performance is highly sensitive to boundary conditions and parameters such as aerodynamic resistance, surface emissivity, radiation exposure, and canopy architecture. These parameters vary with variable microclimates in vineyards and often lead to inaccurate berry temperature estimation.

Consequently, the application of physics-based models remains limited for real-time heat stress mitigation strategies in vineyards. Therefore, there is a need to develop a data-driven approach which can capture these non-linear environmental interactions while remaining adaptable to heterogeneous and dynamically changing vineyard conditions. In efforts to predict grape berry temperature, Gorthi et al. (2024) developed a machine-learning model using an in-field vineyard dataset; however, the model predicts the current berry temperature and does not have the ability to forecast future berry temperature. These berry temperature forecasts help in mitigation resource use planning and automated actuation of under-canopy cooling systems (Bhalekar et al., 2025, 2026). The latter systems have proven effective and model-driven actuation can bring precision to the actuation and help optimize irrigation water use in summer months.

Advances in sensing technologies and Internet of Things (IoT)-based field monitoring now enable continuous environmental data collection at sub-canopy and cluster-level scales, facilitating the development of data-driven prediction models capable of learning nonlinear relationships among co-varying environmental variables (Rajak et al., 2023). Traditional statistical and machine learning methods, such as linear regression, support vector regression (SVR), and autoregressive integrated moving average (ARIMA), have been applied to environmental forecasting but often struggle to capture temporal dependencies and perform poorly in long-term or multi-step prediction tasks (Wang and yang Li, 2022; Guo et al., 2020; Tsai et al., 2020; Dai et al., 2022; Kour, 2022). For real-time heat stress mitigation in vineyards, mid- to long-term forecasting at high temporal resolution is critical. Specifically, forecasts covering 24 to 72 hours at 15-minute intervals would enable growers to schedule equipment deployment, procure water resources, and implement canopy interventions well before damaging temperatures are reached.

Recent progress in deep learning, such as convolutional neural networks (CNN), recurrent neural networks (RNN), gated recurrent units (GRU), and long short-term memory (LSTM) networks, have provided powerful tools for multivariate time-series modeling. For example, Codeluppi et al. (2021) introduced a neural network framework for predicting greenhouse temperature using both historical and real-time temperature observations. Liu et al. (2022) proposed the GCP-LSTM model, which leverages LSTM networks to capture nonlinear interactions among past environmental variables and pro-vides short-term (5-min) greenhouse temperature forecasts. Although these studies illustrate the capability of deep learning to learn temporal patterns in controlled agricultural environments, they ignore environmental coupling effects, offer only short prediction windows, and do not sufficiently address multi-step forecasting. Moon et al. (2020) achieved reliable 30-minute greenhouse CO2CO_2 prediction using an LSTM model, yet the performance dropped markedly for 2-hour forecasts. Similarly, Choi et al. (2019) observed declining accuracy for extended multi-step predictions of greenhouse temperature and humidity when using a multilayer perceptron (MLP).

The attention mechanism has recently shown remarkable success in both natural language processing and computer vision, owing to its strong feature extraction and long-range dependency modeling capabilities (Mnih et al., 2014). In environmental prediction research, attention-based models are increasingly being adopted to enhance both accuracy and interpretability. Li et al. (2024), for example, designed an attention-augmented LSTM architecture capable of forecasting air and soil temperatures up to 480 minutes into the future with strong accuracy. Likewise, Raffel and Ellis (2015) proposed a streamlined feed-forward attention mechanism (FAM) that efficiently consolidates temporal features for multi-step time-series forecasting by computing raw attention scores directly from input representations, without requiring the computational overhead of query-key interactions. These developments demonstrate that FAM can substantially enhance both the precision and stability of sequential prediction models. Notably, while time-series deep learning has been applied to controlled environment agriculture and greenhouse conditions, research specifically targeting TbT_b forecasting in open-field vineyard systems remains largely absent in the current literature. Moreover, standard weather data from open-field stations (e.g., regional or mesonet networks) are widely used for agricultural decision-making but may not fully represent site-specific microclimatic conditions, where berries experience dynamic radiative and convective thermal environments due to canopy architecture, foliage density, and row orientation. In contrast, in-vineyard weather measurements collected within or near the canopy can help capture the localized effects of canopy architecture and soil-plant-atmosphere interactions. A comparative evaluation of models developed using open-field versus in-vineyard weather data is therefore essential to quantify the relative influence of data source on model accuracy and forecast reliability. Such an evaluation can provide valuable insights into whether readily available open-field data can serve as reliable surrogates for predicting TbT_b, or if localized monitoring is critical for reliable heat-stress forecasting.

This study was aimed towards developing accurate multi-step prediction of TbT_b in vineyard (cv. Chardonnay) systems to enable proactive heat-stress mitigation decision-making. In this research, the feed-forward attention mechanism was integrated with an LSTM model to assign learned, and dynamic attention weights to input features across different time steps, thereby improving the model's capacity to exploit the most informative historical data. The specific study objectives were to: 1) design and develop an FAM-LSTM architecture capable of forecasting TbT_b at 15-minute intervals across a 72-hour horizon, and 2) conduct comparative experiments using open-field and in-vineyard weather data and benchmark FAM-LSTM against mainstream prediction models, including LSTM, RNN, GRU, and random forest (RF).

References (47)