Precision agriculture and smart farming can enable real-time decision-making to optimize resources and lower costs via data-driven model predictions. Adoption rates of smart farming systems are unfortunately low due to farmers’ privacy concerns and the high initial monetary costs of deploying such systems. High monetary costs can be lowered by replacing expensive sensing equipment with machine learning models. Cloud computing can be used to train models, but this suffers from poor privacy. Instead, fog and edge computing can train local models, but important geographical trends may be lost due to data segmentation. Federated learning can be used to address these challenges. A privacy-aware Internet of Things (IoT)-based smart farming architecture that uses federated learning was proposed. A prototype was deployed to gather sensor data from a local Canadian smart farm in Ottawa, Ontario. For various data-driven models, we perform nitrous oxide prediction experiments using centralized, local, federated, and distributed ensemble learning. We found that federated and ensemble learning can compete similarly well with centralized learning. Our results demonstrate that our methodology can potentially replace expensive nitrous oxide emission sensing equipment using inexpensive sensors combined with predictive analytics models.
24 October 2024 in ACM Transactions on Internet of Things
Agriculture and Agri-Food Canada, in its unwavering commitment to sustainable agriculture, has launched a program to reduce nitrous oxide (N 2 O) emissions from fertilizer utilization in farming practices. This initiative is a response to the pressing environmental and climate challenges we face. To achieve our goal, we must delve into the mechanism of N 2 O emission by measuring and predicting the flux of N 2 O. This study proposes a novel architecture for neural network models, namely the agriculture-informed neural network (AINN) model, consisting of recurrent neural networks and a process-based ecosystem model, the Dynamic Land Ecosystem Model (DLEM), to predict N 2 O emissions from farming. During the 2021 and 2022 growing seasons, field data on the flux of N 2 O, soil temperature, and soil moisture were collected. However, the amount of nitrate in the soil was missing since collecting accurate data on nitrate quantities from the soil was challenging. Therefore, assumptions about the nitrate quantity in the soil were made when training and testing AINN with the data collected from the 2021 and 2022 growing seasons. In 2024, from January to April, an indoor experiment under controlled conditions was successfully executed to collect data on nitrate quantity in the soil. This experiment demonstrated that nitrate quantity is an essential factor for predicting the emission of N 2 O. To demonstrate the versatility of the AINN across various neural networks, we conduct a comprehensive comparison with four state-of-the-art models: multilayer perceptron, convolutional neural network, long short-term memory, and Transformer. Our experiment and simulation results unequivocally demonstrate that the performance of AINN is superior to single neural network models. The DLEM component of the AINN acts as a regularizer, facilitating the training process of the AINN. This mathematical formulation transforms the problem of N 2 O emission into a constrained optimization issue, minimizing the explicit objective function and satisfying the constraints of the parameters fed into the DLEM in the AINN. The empirical results show that by incorporating information from the agricultural field, the AINN significantly reduces the generalization error compared to the corresponding neural network, underscoring its potential to revolutionize the field of neural network modeling.
In traditional approaches to time series data augmentation, the focus has largely been on refining the architecture of Generative Adversarial Networks (GANs) to better align with the original data distribution while attempting to preserve the dynamic behavior inherent in the data. However, GANs inherently struggle to accurately retain the temporal dynamics of the original time series, primarily due to the absence of first-order difference information. To address this gap, we propose a novel framework, titled the GAN-MCMC approach, for generating multivariate time series data that integrates two key modules: (a) a GAN-based module for generating multivariate time series, and (b) an MCMC-based module designed to preserve the first-order difference distribution. This integrated approach ensures that the synthetic data not only replicates the original data distribution but also retains its dynamic properties. In this study, the multivariate time series data used were collected from Area X.O, which was employed to predict N2O emissions from farming. This dataset is ideal for our analysis because it originates from a complex dynamic system, and the equipment used to gather the data is prohibitively expensive to deploy on a wide scale. Therefore, data augmentation techniques to generate synthetic agricultural data are both necessary and valuable for improving the predictive models. A central aspect of the GAN-MCMC approach is adjusting the β factor in the modified Metropolis-Hastings algorithm, which is the core algorithm in the MCMC module. The β factor controls the extent to which information from the original time series is preserved. Our experiments demonstrate that small values of β effectively retain periodic information, and the joint distribution of the firstorder differences in the synthetic data remains consistent when the same β is used in the algorithm. Additionally, the memoryless property of the Markov Chain is preserved in the generated data, and we employ an exponential moving average (EMA) technique to simulate the long-term relationships present in the original time series. Finally, we use the synthetic time series data to train Long Short-Term Memory networks (LSTMs). Our results show that LSTMs trained on synthetic data generated by the GAN-MCMC framework outperform those trained on synthetic data produced by other GANs. The link to source code: https://github.com/Developer2046/GAN-MCMC
Both the Restricted Hopfield Network (RHN) and Dense Associative Memory (DAM) are derived from the classical Hopfield Neural Network (HNN), but they improve upon HNN using different mechanisms. This paper presents a comparative analysis of RHN and DAM with respect to storage capacity, time complexity, training efficiency, and retrieval from incomplete or noisy patterns. The analysis reveals that RHN and DAM use different mechanisms for storing patterns. RHN, trained using the Subspace Rotation Algorithm (SRA), exhibits better time complexity than DAM, which is trained using the Energy-based Algorithm (EBA). Furthermore, in practice, RHN requires significantly less time than DAM to memorize the same number of patterns, as DAM needs more epochs to converge. The experimental results demonstrate that when storing 1,000 character patterns (825 bits), RHN with two hidden layers outperforms DAM in terms of retrieval from noisy and incomplete patterns. When memorizing 10, 50, and 100 patterns from both the MNIST and Fashion MNIST datasets, RHN shows a slight advantage over DAM in retrieval from incomplete and noisy patterns. However, the performance of both models degrades as the number of hidden nodes or stored patterns increases.
This paper introduces the Subspace Rotation Algorithm (SRA) for training the Restricted Hopfield Network (RHN) as an auto-associative memory. SRA is a gradient-free subspace tracking method based on Singular Value Decomposition (SVD) to update the weight matrix. Despite having slightly worse time complexity than Back-propagation (BP) theoretically, in practice, SRA completes training faster since it requires fewer iterations to converge. Comparative analysis with BP for training RHN reveals that SRA consistently reaches the optimal solution, whereas BP fails to achieve comparable performance if the weight initialization is not within the appropriate basin of attraction. Experiments involving the memorization of 10, 50, and 100 patterns from the MNIST dataset show that RHN trained with SRA exhibits better robustness to noisy and corrupted patterns compared to RHN trained with BP. These findings suggest that SRA offers a more reliable and effective method for training RHNs in applications needing high tolerance to input distortions.
The Restricted Hopfield Network (RHN) builds upon the classical Hopfield Neural Network (HNN) by introducing multiple hidden layers and employing the Subspace Rotation Algorithm (SRA) for training. These advancements address the limitations of traditional HNNs, such as limited storage capacity and vulnerability to noise and adversarial perturbations. RHNs with orthogonal weight matrices trained by SRA can form stable attraction basins, enhancing their capacity and adversarial resilience. This paper systematically evaluates RHN against Dense Associative Memory (DAM), Predictive Coding Network (PCN), and Multilayer Perceptron (MLP) in terms of adversarial robustness and retrieval performance using incomplete patterns. Experiments using alphabet and character datasets demonstrate that RHN consistently outperforms the other models across a variety of adversarial scenarios, including Fast Gradient Sign Method (FGSM), Basic Iterative Method (BIM), Projected Gradient Descent (PGD), and Gaussian Noise (GN) attacks. The results show that RHNs trained with SRA not only enhance model capacity but also ensure high retrieval accuracy under adversarial conditions. These findings highlight the robustness and versatility of RHN as an effective solution for adversarially resilient memory systems.