A Memory-Efficient and Gradient-Stable Lightweight ANFIS for Real-Time Humidity Prediction in Precision Agriculture - Eddy Nurraharjo; Ema Utami; Kusrini; Kumara Ari Yuana (Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, 2026)
Precision agriculture demands artificial intelligence solutions that are both accurate and deployable on resource-constrained hardware, yet conventional machine learning models require excessive memory while traditional ANFIS architectures suffer from training instability. This study developed a memory-efficient and gradient-stable lightweight Adaptive Neuro-Fuzzy Inference System (ANFIS) for real-time humidity prediction on microcontroller-class devices. The proposed architecture strategically reduced the rule base from 27 to only 4 interpretable fuzzy rules and limited membership functions to two per input, achieving an 85.2% reduction in learnable parameters. A gradient-stable training mechanism was introduced, combining physics-informed parameter initialization with adaptive gradient clipping to prevent gradient explosion. The model was trained and validated using 31,474 real-world greenhouse samples collected over 218 days, with 80% allocated for training and 20% for temporal testing. Experimental results demonstrated that the gradient-stable architecture successfully converged from a catastrophic R² of -64.08 to 0.9148, with a root mean square error of 1.32% and mean absolute error of 1.05%. The model required only 0.211 KB of memory, representing a 99.9% reduction compared to baseline Random Forest models, while achieving inference time of 8.2 milliseconds on Arduino UNO. The system was successfully deployed on three independent hardware modules, maintaining consistent performance with average RMSE of 1.99% over 168 hours of continuous operation. This study concludes that strategic simplification and stability-aware training enable interpretable neuro-fuzzy systems to operate effectively on ultra-low-resource devices, bridging the gap between predictive accuracy and hardware feasibility in embedded agricultural IoT applications.