SPADE: A Large Language Model Framework for Soil Moisture Pattern Recognition and Anomaly Detection in Precision Agriculture

Lee, Yeonju, Chen, Rui Qi, Oboamah, Joseph, Su, Po Nien, Liang, Wei-zhen, Shi, Yeyin, Gan, Lu, Chen, Yongsheng, Qiao, Xin, Li, Jing

arXiv.org Artificial Intelligence 

Accurate interpretation of soil moisture patterns is critical for irrigation scheduling and crop management, yet existing approaches for soil moisture time-series analysis either rely on threshold-based rules or data-hungry machine learning or deep learning models that are limited in adaptability and interpretability. In this study, we introduce SP ADE (Soil moisture Pattern and Anomaly DE-tection), an integrated framework that leverages large language models (LLMs) to jointly detect irrigation patterns and anomalies in soil moisture time-series data. By converting time-series data into a textual representation and designing domain-informed prompt templates, SP ADE identifies irrigation events, estimates net irrigation gains, detects, classifies anomalies, and produces structured, interpretable reports. Experiments were conducted on real-world soil moisture sensor data from commercial and experimental farms cultivating multiple crops across the United States. Results demonstrate that SP ADE outperforms the existing method in anomaly detection, achieving higher recall and F1 scores and accurately classifying anomaly types. Furthermore, SP ADE achieved high precision and recall in detecting irrigation events, indicating its strong capability to capture irrigation patterns accurately. SP ADE's reports provide interpretability and usability of soil moisture analytics. This study highlights the potential of LLMs as scalable, adaptable tools for precision agriculture, which is capable of integrating qualitative knowledge and data-driven reasoning to produce actionable insights for accurate soil moisture monitoring and improved irrigation scheduling from soil moisture time-series data. Introduction Global crop production systems are facing mounting challenges due to climate change, population growth, and water scarcity (Farooq et al., 2023). These challenges demand more resource-efficient agricultural strategies.