Explainable AI could help greenhouses cut energy use while protecting crop yields

Explainable AI could help greenhouses cut energy use while protecting crop yields
Representative image. Credit: ChatGPT

A new explainable deep learning framework could help greenhouse operators forecast crop yields and energy use more accurately while showing which environmental factors drive those predictions, according to new research published in AgriEngineering.

The study, titled Explainable Deep Learning for Greenhouse Horticulture: Feature and Temporal Interpretability in Crop Yield and Energy Optimization, presents an AI system designed to predict incremental capsicum yield and daily energy usage in high-tech greenhouse horticulture while using explainable artificial intelligence methods to reveal how radiation, drainage, temperature, humidity and other variables influence model outputs.

The researchers claim that predictive accuracy alone is not enough for greenhouse decision support. Growers and managers need to know why an AI system is recommending changes to irrigation, ventilation, heating or climate-control settings. Without transparency, advanced models may produce decisions that appear mathematically sound but fail to align with plant physiology, greenhouse operations or biological constraints.

Deep learning models target crop yield and energy demand

The study used data from a high-technology glasshouse at the National Vegetable Protected Cropping Centre at Western Sydney University in Richmond, New South Wales, Australia. The greenhouse compartment was used for capsicum trials between January and June 2022. Two commercial capsicum varieties, Gina and YO8366, were grown on rockwool substrates under standard protected-cropping practices.

The greenhouse was equipped with automated environmental control systems, roof vents, thermal screens, fogging, pad-fan cooling and hot-water pipe heating. Sensors recorded internal climate, external weather, operational signals, energy flows and water flows at five-minute intervals. This high-resolution data allowed the researchers to study both the slow biological process of crop growth and the faster operational process of energy demand.

The predictive targets were incremental crop yield, reconstructed from harvest records into a continuous yield curve, and daily energy usage, representing electrical and thermal loads linked to heating, ventilation and auxiliary systems. The team combined greenhouse telemetry, environmental measurements, energy-use records and harvest observations into a unified five-minute time series.

The researchers selected 20 input features, covering internal greenhouse operations and external climate conditions. These included irrigation and drainage variables, outside temperature, outside humidity, outside carbon dioxide, solar radiation, radiation sum and rainfall indicators. The goal was to create a model that could learn from the interactions between greenhouse management decisions and weather-driven pressures.

Four deep learning architectures were tested: one-dimensional convolutional neural network, Long Short-Term Memory network, Bidirectional Long Short-Term Memory network and TinyTimeMixer. Each model was trained on the same window of historical environmental and operational data, covering about 42.6 hours before the prediction target.

The study found that different models were better suited to different greenhouse tasks. For incremental yield prediction, recurrent models performed strongly because they could capture the cumulative nature of plant growth. LSTM achieved the best result for Capsicum Gina, with a root mean square error of 0.089 and an R² of 0.9849. For the YO8366 variety, 1D-CNN produced the lowest error, with an RMSE of 0.151 and an R² of 0.9577.

Energy usage showed a different pattern. TinyTimeMixer was the strongest performer for daily energy forecasting, with an RMSE of 0.254 and an R² of 0.9288. The researchers attributed this advantage to the model's ability to capture long-range temporal interactions and climate-driven variability. Energy demand in greenhouses can shift quickly when outside temperature, humidity or ventilation conditions change, making it different from the slower accumulation of crop yield.

The results highlights an important point for agricultural AI: no single model structure is best for every task. Crop yield reflects a slow biological response shaped by plant development, irrigation, radiation and growing conditions. Energy use responds more immediately to short-term climate fluctuations and control actions. Matching model architecture to the target's time behavior is therefore central to reliable forecasting.

Explainable AI reveals what drives greenhouse performance

The study leverages explainable artificial intelligence. The researchers applied two complementary methods: Gradient SHAP and a Temporal Convolutional Network with a Convolutional Block Attention Module, known as TCN-CBAM.

Gradient SHAP was used to estimate which features contributed most to model predictions. TCN-CBAM was used to show both which features mattered and when they exerted the strongest influence within the input time window. Together, the methods provided a dual-layer explanation: feature-level attribution and temporal-feature interpretation.

For crop yield prediction, radiation and drainage-related variables emerged as dominant contributors. Radiation is a key driver of photosynthesis and biomass accumulation, making its influence biologically consistent. Drainage-related variables indicated the role of root-zone water balance, irrigation response and nutrient delivery in fruit development.

The study found that yield was not driven only by total irrigation volume. Instead, drainage dynamics and climate sensitivity played important roles. Variables such as cycle drainage quantity, 24-hour drainage percentage and irrigation-related consumption were influential in the attention-based analysis. This suggests that how water moves through the root zone may be as important as how much water is supplied.

External atmospheric variables also mattered. Humidity showed broader influence on yield, reflecting the importance of microclimate regulation in protected cropping. Rainfall had limited direct influence, which is consistent with greenhouse cultivation, where crops are buffered from direct outdoor rainfall.

Energy usage was controlled by a different group of factors. The strongest predictors were external temperature, humidity and carbon dioxide. These results are physically intuitive. When outside conditions differ sharply from desired internal conditions, heating, cooling and ventilation demand rises. Humidity and carbon dioxide also affect ventilation strategies, which can increase energy consumption.

The time-based analysis revealed a deeper pattern. Yield prediction was influenced by both recent irrigation responses and longer-term developmental patterns, meaning that the AI system was not simply reacting to short-term fluctuations - it was also detecting longer biological trends. Energy usage, on the other hand, was driven mainly by recent climatic changes and operational control actions immediately before the forecast period.

For growers, the results suggest that yield management depends on sustained control of radiation exposure, irrigation response and root-zone conditions. Energy optimization, meanwhile, depends heavily on anticipating near-term outdoor climate changes and adjusting heating or ventilation systems accordingly.

The consistency between Gradient SHAP and TCN-CBAM strengthened the researchers' confidence in the model explanations. When two different interpretability methods identify similar agronomic drivers, the AI system becomes more credible as a decision-support tool. The study presents this as a step toward moving greenhouse AI away from opaque black-box prediction and toward operational tools that growers can inspect and trust.

Findings point to more transparent greenhouse decision support

The study tries to connect AI forecasting with practical greenhouse management. High-tech horticulture depends on many interacting variables, including weather, crop physiology, irrigation, drainage, energy use and climate control. Decisions made in one area can affect another. Increasing ventilation may reduce humidity but raise heating demand. Adjusting irrigation may support yield but affect drainage and nutrient balance. Optimizing one outcome does not automatically optimize the whole system.

The researchers say this makes multi-objective management essential. Greenhouse operators need systems that can balance crop yield, energy cost, environmental impact and biological constraints. Explainable AI can help by showing whether a model's recommendations are based on plausible drivers and by identifying the time periods when interventions may matter most.

The framework could support irrigation scheduling by identifying when drainage and irrigation-related variables are most influential for yield. It could also support climate-control strategies by showing how external temperature, humidity and carbon dioxide affect energy use. In practice, this type of insight could help growers reduce unnecessary energy consumption while protecting crop productivity.

The study also adds to the growing field of sustainable protected cropping. Greenhouses are important for food security because they allow production across seasons and under controlled conditions. But their energy use remains a major barrier to cleaner and more affordable production. AI systems that forecast energy demand and explain its causes could help growers reduce waste, plan control actions more efficiently and make better use of renewable or low-carbon energy sources.

The researchers note that the dataset came from a single greenhouse facility, so the model's performance across other locations, crop systems, climate zones and management styles still needs testing. Greenhouse operations vary widely, and a model trained in one facility may not transfer directly to another without adaptation.

The study also did not include spatial information such as canopy-level microclimate variation or multimodal data such as imagery, leaf temperature and soil moisture sensing. These data sources could improve both forecasting and interpretability in future systems. The researchers also note that attention patterns and feature attributions show learned associations, not direct causation. Agronomic experiments would be needed to confirm causal relationships between specific interventions and outcomes.

Future work is expected to focus on cross-greenhouse validation, multimodal sensing and causal modeling. Testing the framework across more facilities would show whether the model can generalize beyond one high-tech glasshouse. Adding thermal images, plant physiological signals or root-zone sensors could provide a richer picture of crop-environment interactions. Causal modeling could help separate correlation from intervention-ready insight.

  • FIRST PUBLISHED IN:
  • Devdiscourse
Give Feedback