Abstract
Accurate crop yield prediction is vital for food security and economic stability. However, machine learning models often exhibit spatial bias, performing poorly in specific regions, and lack robustness to temporal shifts caused by changing weather patterns. This paper introduces the Physics-Guided Attention Network (PG-AN), which integrates domain-specific physical constraints—specifically the carbon cycle—with a novel bi-level optimization strategy. This approach ensures "spatial fairness," maintaining consistent predictive performance across different counties even as environmental conditions evolve. Evaluated on real-world corn yield data from Illinois and Iowa, PG-AN demonstrates superior accuracy and significantly reduced spatial disparity compared to standard deep learning models.
Introduction
Machine learning applications in agriculture face two critical hurdles: spatial bias and temporal shift. Spatial bias occurs when a model achieves high global accuracy but fails significantly in certain regions, potentially leading to unfair distribution of subsidies or insurance. Temporal shift refers to the model's inability to generalize across years with drastically different weather conditions (e.g., droughts vs. floods). Traditional fairness-preserving methods often treat data as a black box, ignoring the underlying physical processes of plant growth, which makes them brittle under climate variability.
Methods
The proposed PG-AN model bridges the gap between deep learning and physical modeling through several key components:
- Physics-Aware Embeddings: The model is constrained to learn intermediate variables of the carbon cycle, such as Autotrophic Respiration ($R_a$), Heterotrophic Respiration ($R_h$), and Net Ecosystem Exchange (NEE).
- Mass Conservation Constraint: A physical penalty is applied to ensure predictions adhere to the carbon balance equation: $-NEE = GPP - R_a - R_h$.
- Sample Reweighting: To mitigate temporal shift, a classifier identifies training years most similar to the target testing period, assigning them higher weights during training.
- Bi-Level Optimization: A "Global Referee" system dynamically adjusts regional learning rates. By increasing the focus on regions where the model underperforms, the system forces the network to improve its weakest predictions without sacrificing overall accuracy.
Datasets
The study utilized county-level corn yield data from 199 counties in Illinois and Iowa (2000–2020), sourced from the USDA National Agricultural Statistics Service (NASS). Input features included 19 dimensions of climate data (NLDAS-2), soil properties (gSSURGO), and satellite vegetation indices. Additionally, simulated data from the Ecosys physics-based model provided "weak supervision" for the intermediate carbon cycle variables that are difficult to measure in the field.
Results and Discussion
PG-AN was benchmarked against several baselines, including standard LSTMs and adversarial domain adaptation models. In the 2019-2020 testing scenario, PG-AN achieved an RMSE of 29.96, a substantial improvement over the 37.43 RMSE of the standard LSTM-Attention model.
Beyond accuracy, the model significantly improved spatial fairness. For the most granular partitioning ($P_{199}$), the fairness score dropped from 16.86 (LSTM) to 12.53 (PG-AN). Visual analysis of error maps confirmed that PG-AN eliminates the "hot spots" of high error typical of standard models, distributing predictive error more uniformly across the study area. This suggests that by forcing the model to respect the carbon cycle, it learns a more "universal" representation of plant growth that is less likely to overfit to the specific quirks of a single county or year.
Conclusion
The PG-AN framework demonstrates that physics can serve as a powerful regularizer for fairness. The bi-level optimization approach successfully disentangles the competition between accuracy and fairness, proving that treating fairness as a dynamic adjustment process is more effective than static constraints. While computationally more intensive than standard networks, the model's ability to maintain fairness under temporal shift is a critical step toward reliable AI in climate-sensitive domains.
Summary updated