scieee AI-readable full text Open interactive document viewer

Trust-based anomaly detection of dendrometer and environmental parameter measurements of eucalypts in South Africa and Portugal

Abdullahi, Ahmed Danladi; Erasmus, christopher

Abstract

Environmental monitoring systems for forest management face significant challenges in ensuring data reliability and detecting anomalies across heterogeneous sensor networks. Traditional approaches struggle with sensor degradation, intermittent connectivity, and environmental variability, particularly in remote eucalyptus plantations where infrastructure is limited and conditions are dynamic. These challenges are compounded by the critical nature of timely and accurate data for sustainable forestry decisions, where short-term gaps reduce model reliability and hinder the detection of stress patterns. Existing anomaly detection approaches in this domain either focus solely on reconstruction-based detection or rely on outlier scoring without incorporating trust evaluation, leading to limited robustness against sensor faults, low temporal stability, and poor generalisation across heterogeneous sensor networks. This paper introduces a novel hybrid system that integrates machine learning-based trust management with an enhanced autoencoder architecture for improved anomaly detection called Trust and Reconstruction-based Anomaly Detection (TRAD). TRAD leverages a unique dataset from sensor networks deployed across South Africa and Portugal. The architecture combines a feedforward neural network (FFN) with time decay capabilities and structured dimensionality reduction, enabling the simultaneous evaluation of trust and reconstruction-based fault identification. Experimental results demonstrate superior performance over traditional methods, achieving F1-scores up to 89% with strong ROC values exceeding 0.93 and a Temporal Stability Index (TSI) of 0.95 under diverse conditions. The system effectively handles simulated sensor degradation, missing data, and environmental variation. This work contributes to both the monitoring literature and machine learning applications in resource-constrained settings, with direct implications for sustainable forestry management and precision agriculture.

Full text

Contents lists available at ScienceDirect Smart Agricultural Technology journal homepage: www.journals.elsevier.com/smart-agricultural-technology Trust-based anomaly detection of dendrometer and environmental parameter measurements of eucalypts in South Africa and Portugal Ahmed Danladi Abdullahia,, Christopher Stefan Erasmusb,, Marthinus Johannes Booysen b,c, ,∗, Bamidele Adebisi a, ,∗, Tooska Dargahia,, Olamide Jogunolaa,, Yakubu Tsado a, aDepartment of Computing and Mathematics, Manchester Metropolitan University, United Kingdom bDepartment of Electrical and Electronic Engineering, Stellenbosch University, South Africa cDepartment of Industrial Engineering, Stellenbosch University, South Africa A R T I C L E I N F O A B S T R A C T Keywords: Trust model Machine learning Auto encoders Cyber-physical system Temperature Humidity Soil moisture Dendrometer Forestry management Tree growth Environmental monitoring systems for forest management face significant challenges in ensuring data reliability and detecting anomalies across heterogeneous sensor networks. Traditional approaches struggle with sensor degradation, intermittent connectivity, and environmental variability, particularly in remote eucalyptus plantations where infrastructure is limited and conditions are dynamic. These challenges are compounded by the critical nature of timely and accurate data for sustainable forestry decisions, where short-term gaps reduce model reliability and hinder the detection of stress patterns. Existing anomaly detection approaches in this domain either focus solely on reconstruction-based detection or rely on outlier scoring without incorporating trust evaluation, leading to limited robustness against sensor faults, low temporal stability, and poor generalisation across heterogeneous sensor networks. This paper introduces a novel hybrid system that integrates machine learning-based trust management with an enhanced autoencoder architecture for improved anomaly detection called Trust and Reconstruction-based Anomaly Detection (TRAD). TRAD leverages a unique dataset from sensor networks deployed across South Africa and Portugal. The architecture combines a feedforward neural network (FFN) with time decay capabilities and structured dimensionality reduction, enabling the simultaneous evaluation of trust and reconstruction-based fault identification. Experimental results demonstrate superior performance over traditional methods, achieving F1-scores up to 89% with strong ROC values exceeding 0.93 and a Temporal Stability Index (TSI) of 0.95 under diverse conditions. The system effectively handles simulated sensor degradation, missing data, and environmental variation. This work contributes to both the monitoring literature and machine learning applications in resource-constrained settings, with direct implications for sustainable forestry management and precision agriculture. 1. Introduction Environmental monitoring systems are essential for understanding how ecosystems respond to changing conditions. These systems help manage land use, assess climate impact, and support decisions in agriculture and forestry [1]. Wireless sensor networks now offer highresolution, long-term data from remote locations with minimal human intervention. However, the value of such systems depends on the quality and reliability of the data they produce [2]. Africa faces a significant challenge in forest conservation, losing almost 4 million hectares of forest annually, almost double the global average [3]. This rapid deforesta- *Corresponding authors. E-mail addresses: [email protected] (M.J. Booysen), [email protected] (B. Adebisi). tion, driven by agricultural expansion, illegal logging, and inadequate monitoring infrastructure, is especially severe in certain locations. The absence of reliable, real-time sensor data in these areas impedes early detection of stress conditions and undermines long-term forest management [4]. With 43 billion trees at risk and millions in conservation funding potentially misdirected, improving data quality is essential. Eucalyptus plantations are a significant focus for this kind of monitoring. Eucalypts supply wood for construction, paper, and bioenergy, making them one of the most economically valuable hardwood species worldwide. Fast growth and adaptability make them ideal for commercial forestry. Their environmental impact, however, depends on fachttps://doi.org/10.1016/j.atech.2025.101389 Received 16 June 2025; Received in revised form 19 August 2025; Accepted 28 August 2025 Smart Agricultural Technology 12 (2025) 101389 Available online 9 September 2025 2772-3755/© 2025 The Author(s). Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license ( http://creativecommons.org/licenses/bync-nd/4.0/ ). A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. tors such as soil water availability and temperature [1]. Understanding how trees grow under different environmental conditions helps improve yield, manage water use, and reduce ecological risk. Sensor data in these settings must be accurate and consistent. Devices operate in uncontrolled environments, where power fluctuations, weather, and ageing hardware introduce noise, drift, and gaps [2]. Faulty readings can go unnoticed and may appear similar to genuine environmental changes. Without proper detection, such issues distort models, reduce trust in the system, and lead to poor decision-making. Manual inspection of data is not scalable. Static thresholds and simple statistical checks are too unstable to handle the natural variability in tree growth and climate data [5]. Environmental conditions vary over time and between sites. Sensor responses are non-linear and device-specific. Many faults evolve slowly or appear intermittently, making them difficult to detect using fixed rules or simple outlier detection [6]. Anomaly detection aims to separate real environmental changes from sensor faults. False positives, such as mistaking normal growth patterns for anomalies, lead to unnecessary intervention. Missed anomalies, such as undetected sensor drift, can distort models and reduce trust in the data [2]. In environmental monitoring, these failures can lead to over-irrigation, missed disease outbreaks, or incorrect assessments of climate impact. Various anomaly detection methods have been proposed for time-series and sensor data. Autoencoders, such as those used in DeepAnT and MCN-LSTM, learn normal patterns and identify deviations based on reconstruction error [7,6]. These models perform well in settings with clear, repetitive patterns, and dense temporal structure, but they often ignore sensor-specific reliability. When the input looks plausible, but comes from a faulty sensor, these models may miss the fault entirely. In contrast, valid deviations due to natural environmental events may trigger false positives if they are outside the learnt norm of the model [8]. Trust-based methods offer another path [9]. These models assign credibility scores to sensors based on their recent behaviour or peer feedback. Techniques such as those used in trust-assisted localisation, trust-based fusion in cognitive radio networks, and hierarchical trust modelling in wireless sensor networks aim to filter out unreliable nodes and focus on trustworthy sources [10,11,9]. Although effective in network-level contexts, these approaches are often designed for packet forwarding, routing, or binary trust decisions, rather than continuous sensor measurements. They also tend to rely on predefined thresholds or assumptions about network topology that do not always apply to environmental sensing. Hybrid models that combine data-driven anomaly detection with trust evaluation have shown promise in federated learning and edge AI systems [11,12]. Recent work in trust-aware federated learning introduces the idea of incorporating trust coefficients based on local model behaviour or contribution to learning stability [11]. These approaches improve robustness but assume central aggregation and synchronous updates, which are not guaranteed in edge deployments or outdoor sensor networks. Current methods, then, either treat all sensors equally or assume faults follow clear patterns [13]. Few approaches account for both the content of the data and the changing reliability of the source [6,2]. This creates a gap in environmental monitoring, where devices may produce subtle, shifting errors that interact with environmental variation in complex ways. To address this, this paper proposes a hybrid anomaly detection system that integrates an autoencoder with a trust evaluation model. The autoencoder captures normal multivariate behaviour and computes the reconstruction error. In parallel, a lightweight machine learning-based trust module tracks the historical reliability of each device using a timedecayed scoring function. These outputs are fused into a single hybrid score using a confidence weighting mechanism that responds dynamically to the context. This approach is tested on a dataset from Eucalyptus plantations in South Africa and Portugal [1]. Ten wireless sensor nodes recorded dendrometer, temperature, humidity, and soil parameters at intervals of 6 to 11 minutes. The devices operated on irrigated and unirrigated plots, in different species and climates, producing more than 100,000 data points under varying conditions. The diversity in location, sensor type, and environmental exposure makes this dataset a realistic and challenging testbed for anomaly detection. The key contributions of this research are as follows: •This paper presents TRAD that combines trust evaluation with autoencoder reconstruction error, enabling anomaly detection that considers both sensor reliability and data deviation. •The paper introduces a method for dynamically weighting anomaly scores using a confidence function, thereby improving detection and reducing false positives without relying on hard thresholds or labelled anomalies. • A complete implementation and evaluation on a real-world, multisensor dataset, demonstrating practical applicability in forestry and environmental monitoring. • A comparative evaluation against classical methods such as the isolation forest, the one-class support vector machine (SVM), and the baseline neural models, including the FFN and long-short-term memory (LSTM), across multiple metrics, including the F1 score, the area under the curve, the receiver operating characteristic (AUC-ROC), and the Temporal Stability Index (TSI). This work addresses a critical gap in environmental monitoring by providing a robust and practical solution that directly addresses the dual challenges of sensor reliability and environmental variability in resource-constrained settings. The integration of temporal pattern learning with trust evaluation represents a significant advancement in anomaly detection for environmental systems, providing enhanced robustness against sensor degradation whilst maintaining high anomaly detection across diverse conditions. With climate change intensifying the need for reliable environmental monitoring and precision agriculture becoming increasingly vital for sustainable forestry management, this approach offers immediate practical value for real-world deployments. The model demonstrates effectiveness in geographically diverse eucalyptus plantations in South Africa and Portugal, establishing its broad applicability for precision forestry, environmental monitoring, and related Internet of Things (IoT) applications where sensor reliability is crucial. The remainder of this paper is organised as follows. Section 2provides an overview of the related work. Section 3describes our proposed solution, including the details of the dataset and system architecture (Section 3.2). Section 4discusses the experimental setup. The result and a discussion are presented in Section 5. Finally, Section 6concludes the paper and outlines future research directions. 2. Related work Anomaly detection in sensor networks has attracted significant research attention across various domains. Erhan et al. [8] provide a comprehensive review of anomaly detection methods in sensor systems, categorising approaches from conventional statistical techniques to datadriven methods while considering constraints of computing, energy, and accuracy. For wireless sensor networks, Pachauri and Sharma [19] demonstrate how machine learning algorithms can enhance fault detection in medical contexts, achieving higher accuracy and lower false alarm rates compared to traditional approaches. In environmental monitoring specifically, El-Shafeiy et al. [6] propose a multivariate multiple convolutional network with a long-short-term memory approach to monitor water quality, achieving a precision of 92.3% in real-time detection and highlighting the importance of temporal relationships in environmental data. Deep learning approaches have shown promising results for time series anomaly detection. Choi et al. [20] provide guidelines for model selection and training strategies, addressing the challenge of simultaneously considering temporal dependencies and relationships between variables. Autoencoder-based architectures have become particularly Smart Agricultural Technology 12 (2025) 101389 2 A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. Table 1 Comparison of related work. Works Trust Evaluation Spike Detection Drift Detection Dropout Detection Time Decay Multi-sensor Key Strength Main Limitations Abououf et al. [14]×✓∼∼×✓Effective at spike detection; supports multi-sensor inputs No trust evaluation; lacks time-decay modelling Chen et al. [11]✓∼∼✓×✓Integrates trust into federated learning; improves robustness in distributed settings Not designed for multi-sensor environmental data Du et al. [9]✓∼ × ✓ ✓ ✓ Handles drift and dropout anomalies well; supports multi-sensor No time-decay; limited temporal stability MCN [6]×✓∼∼×✓Models multi-sensor data; some temporal modelling No trust assessment; Partial drift handling; High computational cost Esmaeili et al. [2]×✓✓∼ × ✓Detects multiple anomaly types No sensor reliability; Limited dropout handling Guo et al. [15]×✓∼✓×✓Markov decision process; Active sensing capability Space habitat specific Munir et al. [16]×✓✓∼ × ✓Fusion of statistical and deep learning; Streaming data Fixed thresholds Munir et al. [7]×✓∼ × × ✓CNN unsupervised Limited anomaly scope Rosenstatter et al. [17]✓∼ × ✓×✓Vehicle-to-cloud framework Automotive specific Wang [12]✓∼ × ✓×✓Industrial IoT focus; includes trust evaluation Binary classification; sensitive to noise Wu et al. [10]✓∼ × ✓×✓Fuzzy logic and evidence theory; Multi-dimensional behaviour Limited scalability; Static trust model Zheng and Baras [18]✓∼ × ✓∼✓Hierarchical sensor networks; Two-phase probing High overhead; Limited anomaly type coverage Proposed Solution ✓ ✓ ✓ ✓ ✓ ✓ Fully supports trust and time-decay; handles multiple anomaly types and multi-sensor inputs with high temporal stability Slightly higher computational overhead than simple statistical models Annotations: ✓= Fully supported; ×= Not supported; ∼= Partially supported effective, with Esmaeili et al. [2] developing models using vanilla, unidirectional LSTM and bidirectional LSTM autoencoders. Their findings, that vanilla and integrated models sometimes outperform pure LSTMbased approaches, informed our hybrid design decisions. Munir et al. [7] propose DeepAnT, using convolutional neural networks for unsupervised detection by learning the normal data distribution to forecast expected behaviour, demonstrating superior performance across 433 time series benchmarks. Chalapathy and Chawla [21] provide a comprehensive survey of deep learning methods, categorising techniques based on underlying assumptions and approaches, which guided our architectural choices regarding the balance between detection accuracy and resource constraints. Trust-based mechanisms represent a distinct approach to anomaly detection in distributed systems. Zheng and Baras [18] propose a trustassisted framework for hierarchical sensor networks, using a two-phase probing strategy that achieves flexible tradeoffs between accuracy and overhead. Wu et al. [10] present a model using fuzzy theory and evidence theory to observe nodes’ behaviours with multi-dimensional characteristics, efficiently identifying malicious nodes while validating normal operations. Wang [12] proposed a trust-based method for industrial Internet of Things, adding trusted function modules for evaluating credibility levels and monitoring abnormal operations. In automotive contexts, Rosenstatter et al. [17] develop a Vehicle-to-Cloud framework where peer vehicles assess each other based on perceived behaviour, uploading assessments to the cloud for analysis. These trust-based approaches informed our sensor reliability assessment mechanisms. Hybrid approaches combining multiple detection techniques have shown promising results for complex sensor systems. Munir et al. [16] introduce FuseAD, combining statistical and deep learning models for streaming sensor data, achieving higher performance by leveraging the strengths of both methods. Their ablation study quantifying individual component contributions provides valuable methodological insights for our hybrid evaluation. Trust-based fusion has been explored in various domains, with Du et al. [9] demonstrating an adaptive trust model for underwater acoustic sensors. More recently, federated approaches have been combined with trust assessment, as seen in Chen et al. [11] and Zatsarenko et al. [22], highlighting the potential of combining distributed learning with trust assessment. Research specifically addressing anomaly detection in environmental sensor networks remains limited. Guo et al. [15] present an active environmental monitoring system for space habitats using Markov decision processes, while Abououf et al. [14] propose a self-supervised lightweight approach for IoT devices that addresses resource efficiency challenges in remote deployments. Our work advances beyond existing research directions by combining the pattern recognition capabilities of autoencoders with the adaptive assessment of trust-based systems. Unlike previous approaches that rely solely on reconstruction error [2] or trust evaluation [10], our system dynamically integrates both through a hybrid architecture for substantially improved detection performance across diverse anomaly types. Furthermore, while time-decay mechanisms have been explored in trust systems [18], their integration with deep learning models for anomaly detection represents a significant methodological advancement. Finally, unlike approaches optimised for specific domains like industrial systems [23], network security [11], or autonomous vehicles [24,25], our model overcomes the limitations of domain-specific solutions by specifically addressing the challenges of environmental monitoring data, including diurnal patterns, seasonal variations, and the complex interplay between different environmental sensors. Table 1shows the comparison of related work across capability and features. 3. Proposed solution Anomaly detection in multivariate environmental sensor networks presents a range of challenges, including temporal dependency, data irregularity, sparse labelling, sensor drift, and varying degrees of signal reliability. The proposed hybrid system is designed to address these challenges by combining reconstruction-based learning, temporal pattern modelling, and sensor trust evaluation into a unified anomaly detection model. The system operates under an unsupervised learning regime, Smart Agricultural Technology 12 (2025) 101389 3 A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. Fig. 1. Flowchart of the proposed trust-based hybrid anomaly detection system. augmented with semi-supervised elements in training and synthetic anomaly injection during evaluation. Fig. 1describes the flowchart process of the proposed solution. Let 𝐗={𝐱1,𝐱2, ..., 𝐱𝑇}represent a multivariate time series of sensor measurements, where each observation 𝐱𝑡∈ℝ𝑑. For our dataset, 𝑑=6, corresponding to dendrometer readings, air temperature, air humidity, soil temperature, soil moisture, and battery level. Each feature is enriched with rolling statistics (mean and variance computed with a window size of 5), resulting in an augmented feature space 𝐱′ 𝑡∈ℝ18. The task is to estimate a scalar anomaly score 𝑆𝑡∈[0,1] for each timestamp 𝑡, where lower values indicate greater anomaly likelihood. Final binary anomaly decisions are made via thresholding: 𝑦𝑡={1if 𝑆𝑡>𝜏 0otherwise (1) The proposed system is composed of three main modules: a feedforward autoencoder (FFN AE), a Long Short-Term Memory (LSTM) autoencoder, and a trust evaluation model. Their outputs are combined through a dynamic weighting mechanism that adjusts to both temporal context and reconstruction behaviour. 3.1. Workflow and system overview Fig. 1illustrates the complete workflow of the TRAD system through three distinct processing phases, each highlighted by dashed boundaries that group related components. •The data input and pre-processing phase encompasses the initial data acquisition and feature engineering stage. Raw sensor measurements 𝐱𝑡undergo extensive preprocessing including Min-Max normalisation and rolling statistics computation as described in equation (2), transforming the 6-dimensional input into an 18dimensional feature vector 𝐱′ 𝑡. •The analysis and integration phase demonstrates the hybrid nature of the system through three parallel pathways: the FFN autoencoder computes the point-wise reconstruction error 𝑅𝐸𝑡and the gradient Δ𝑡, the LSTM autoencoder processes temporal sequences for 𝑇𝑅𝐸 𝑡, and the trust model evaluates sensor reliability through 𝑇𝑆𝑎𝑑𝑗 𝑡. These outputs converge on the dynamic weighting component, which computes the adaptive confidence 𝛼𝑡. •The decision and classification phase integrates all components through a hybrid fusion equation (8)and applies threshold-based classification to generate binary anomaly decisions prior to the termination of the process. 3.2. Dataset and system architecture This study uses data collected from eucalyptus plantations located in two ecologically distinct regions: Stellenbosch, South Africa (33.9321° S, 18.8612° E) and Leiria, Portugal (39.7594° N, 8.5563° W). Ten wireless monitoring nodes were deployed, six in South Africa and four in Portugal. The South African deployment focused on Eucalyptus grandis × urophylla hybrid clones, while the Portuguese site monitored mature EuSmart Agricultural Technology 12 (2025) 101389 4 A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. Table 2 Specifications of Sensing Modules. Sensor Type Model Resolution Accuracy Unit Dendrometer Generic Digital 0.0763 μm ±4.5% μm Air Temperature DHT22 0.1 ◦C ±0.5 ◦C ◦C Air Humidity DHT22 0.1% ±1% % Soil Temperature DS18B20 0.0625 ◦C ±0.5 ◦C ◦C Soil Moisture Capacitive V1.2 0.25% ±6% % VWC Battery Voltage ESP32-S2 ADC 13-bit ±1% Normalised V Table 3 Parameters and Descriptions. Parameter Description 𝐗={𝐱1,𝐱2, ..., 𝐱𝑇}Multivariate time series dataset 𝐱𝑡∈ℝ6Sensor observation at time 𝑡 𝐱′ 𝑡∈ℝ18 Augmented feature vector with rolling statistics 𝑑=6 Number of original sensor features 𝑤=5 Rolling window size for statistics 𝑆𝑡∈[0,1] Final anomaly score at time 𝑡 𝜏Anomaly classification threshold 𝜎spike Spike anomaly width parameter 𝑅𝐸𝑡FFN reconstruction error 𝑇𝑅𝐸 𝑡LSTM temporal reconstruction error Δ𝑡=|𝑅𝐸𝑡−𝑅𝐸𝑡−1|Reconstruction error gradient 𝑇𝑆 𝑡∈[0,1] Trust score at time 𝑡 𝜆𝑡∈[0,1] Time decay factor 𝑇𝑆𝑎𝑑𝑗 𝑡=𝑇𝑆 𝑡⋅𝑒−𝜆𝑡𝑡Time-adjusted trust score 𝛼𝑡=𝑒−Δ𝑡 1+𝑒−Δ𝑡Dynamic weighting coefficient 𝜇𝑖,𝑡,𝜎2 𝑖,𝑡 Rolling mean and variance for feature 𝑖 𝐴𝑗,𝜎 𝑗Anomaly amplitude and feature std deviation calyptus globulus trees. This geographic and biological diversity provides a broad range of environmental conditions, tree ages, and physiological responses [1]. The South African site experiences a Mediterranean climate with dry summers and wet winters, whereas the Portuguese site has an Atlantic-influenced climate with milder fluctuations. Within the South African cohort, both irrigated and unirrigated specimens were included. Devices transmitted data at intervals of either 6 or 11 minutes, depending on configuration, beginning in June 2024. In total, the dataset comprises approximately 109,000 multivariate data points across all devices. Table 2presents an overview of the sensor specifications. The authors collected the dataset used in this study, and it is publicly available through a peer-reviewed Data in Brief article by Erasmus et al. [1]. Data were acquired using ten custom-built wireless dendrometers and environmental sensor systems deployed on two eucalyptus plantations, six in Stellenbosch, South Africa and four in Leiria, Portugal. These systems measured stem growth, soil moisture, soil temperature, air temperature, humidity, and device health metrics, including battery voltage. Each system was configured to transmit data via LoRaWAN at 6or 11-minute intervals, with local SD card backups for redundancy. The hardware included high-resolution dendrometers, DHT22 humidity sensors, and 18B20 soil temperature sensors, all powered by solar-supported Li-Po batteries and enclosed in IP56-rated field housings. Calibration procedures, including cross-validation with a Sentek Series III Drill and Drop probe, were performed to ensure the accuracy of soil moisture readings. The experimental design included both irrigated and unirrigated treatment groups in South Africa, as well as non-irrigated controls in Portugal, allowing for a comparative analysis across different environmental conditions. The authors performed all the deployment, calibration and data acquisition activities, and all metadata, including device IDs, sampling rates, and sensor specifications, are published in the support dataset repository [1]. 3.3. Data characteristics and challenges The dataset exhibits both natural variability and artefacts associated with field deployment. The diurnal dendrometer trends show shrinkage during daylight and expansion overnight. Short-term anomalies include spikes due to shocks or power instability; long-term trends reflect growth and seasonal shifts. About 4.9% of the data are missing due to communication failures or power issues, with node GWD3 disproportionately affected. Soil moisture sensors were found to be less reliable, occasionally flat-lining or drifting. Data from each sensor were Min-Max normalised per device. Rolling mean and variance features were computed with a window of five. As no ground truth labels were available, an unsupervised detection approach was essential. A detailed description of the dataset has been presented by Erasmus et al. [1]. 3.4. Data processing pipeline Raw measurements are synchronised by timestamp and grouped per device. Minor gaps are filled with zeros or ignored. Feature scaling is applied per device. Rolling statistics for feature 𝑥𝑖at time 𝑡are computed as: 𝜇𝑖,𝑡 =1 𝑤 𝑡 ∑ 𝑗=𝑡−𝑤+1 𝑥𝑖,𝑗 , 𝜎2 𝑖,𝑡 =1 𝑤 𝑡 ∑ 𝑗=𝑡−𝑤+1 (𝑥𝑖,𝑗 −𝜇𝑖,𝑡)2(2) where 𝑤=5is the window size. Each sample is an 18-dimensional vector. The first 6000 samples per device are used for training, and the next 1000 are used for testing, including synthetic anomaly injections. 3.5. Feedforward autoencoder The FFN AE models normal operating behaviour on a pointwise basis. It uses a symmetric fully connected architecture: •Encoder: ℝ18 →ℝ64 →ℝ32 →ℝ16 •Decoder: ℝ16 →ℝ32 →ℝ64 →ℝ18 The symmetric encoder-decoder design, with progressive dimensionality reduction, enables effective feature compression while maintaining high reconstruction quality. The 16-dimensional bottleneck layer captures essential patterns without overfitting to training noise, balancing model complexity with representational capacity for environmental sensor data. The model employs Adam Optimiser with a learning rate of 0.001, batch size 32, and training for 100 epochs with early stopping based on validation loss stabilisation. The convergence criterion requires an MSE loss improvement of less than 1e-6 to ensure robust feature learning. Each layer is followed by batch normalisation, ReLU activation, and dropout with probability 0.2. The output layer uses a sigmoid function to ensure that the reconstructions are in the range [0,1]. The model is trained using mean squared error: AE =1 𝑁 𝑁 ∑ 𝑡=1 1 18 18 ∑ 𝑖=1 (𝑥′ 𝑡,𝑖 −𝑥′ 𝑡,𝑖)2(3) At inference, the reconstruction error is calculated as: 𝑅𝐸𝑡=1 18 18 ∑ 𝑖=1 (𝑥′ 𝑡,𝑖 −𝑥′ 𝑡,𝑖)2(4) Additionally, the first-order gradient of the error is computed to capture abrupt transitions: Δ𝑡=||𝑅𝐸𝑡−𝑅𝐸𝑡−1||(5) This enhances the system’s ability to detect temporal spikes or shift anomalies not visible through pointwise analysis alone. Smart Agricultural Technology 12 (2025) 101389 5 A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. 3.6. LSTM autoencoder To capture sequential dependencies and contextual irregularities, a unidirectional LSTM autoencoder is applied to rolling windows of the input series. Let 𝑤=30denote the sequence length. Each input sequence 𝐗′ 𝑡−𝑤+1∶𝑡∈ℝ𝑤×18 is encoded by an LSTM to a hidden representation 𝐡𝑡, which is then used to reconstruct the original sequence. The 𝑤=30 balances the capture of temporal context with computational efficiency, corresponding to 3-5.5 hours of sensor data depending on the sampling rate. This duration effectively captures diurnal patterns while maintaining manageable computational requirements. The LSTM autoencoder uses 64 hidden units per layer (encoder and decoder), with a dropout rate of 0.2 applied to the LSTM output to prevent overfitting. Teacher forcing is not applied to ensure robust sequence reconstruction capabilities. Training uses a stateful LSTM with sequence batching to maintain temporal dependencies across batch boundaries. The reconstruction loss over the sequence is: TRE𝑡=1 𝑤⋅18 𝑤 ∑ 𝑗=1 18 ∑ 𝑖=1 (𝑥′ 𝑡−𝑤+𝑗,𝑖 −𝑥′ 𝑡−𝑤+𝑗,𝑖)2(6) Unlike the FFN AE, the LSTM AE is trained to preserve temporal continuity. No teacher forcing or autoregressive decoding is applied; the model reconstructs sequences end-to-end directly. 3.7. Trust evaluation The trust model is a shallow neural network with one hidden layer (18 →8 →2), where the two outputs correspond to a trust score 𝑇𝑆 𝑡∈ [0,1] and a decay factor 𝜆𝑡∈[0,1]. These are used to compute a timeadjusted trust estimate: 𝑇𝑆adj 𝑡=𝑇𝑆 𝑡⋅𝑒−𝜆𝑡𝑡(7) The trust model is trained independently of the autoencoders using MSE against a fixed target [1.0,0.01] under the assumption of clean data. The aim is to model sensor credibility over time, penalising sources with unstable readings. 3.8. Hybrid scoring and integration The final anomaly score combines trust and reconstruction-based metrics through a logistic fusion mechanism: 𝛼𝑡=𝑒−Δ𝑡 1+𝑒−Δ𝑡 , 𝑆𝑡=𝛼𝑡⋅𝑇𝑆adj 𝑡+(1−𝛼𝑡)(1 − Δ𝑡)(8) This dynamic weighting ensures that when the reconstruction error gradient is small, indicating sensor stability, the trust score is favoured. When Δ𝑡is large, the reconstruction signal dominates. A threshold, 𝜏, is then applied to classify anomalies. In the current version, 𝜏is fixed per device, set as the 5th percentile of training hybrid scores. No dynamic adjustment, calibration, or adaptive thresholding is performed at runtime. All components are trained offline per device using the first 6000 observations. The following 1000 samples are used for testing, during which synthetic anomalies are injected at controlled intervals. Models do not adapt to new data post-training, and feedback loops are not included. The computational overhead of adaptive thresholding is not suitable for resourceconstrained edge deployments typical in remote eucalyptus plantations, where power and processing capabilities are limited. Static thresholds computed offline ensure consistent performance without requiring additional computational resources during inference. However, we acknowledge that static thresholding represents a limitation for long-term deployments where environmental conditions and sensor characteristics may evolve significantly. Future work will explore adaptive thresholding mechanisms, including online learning approaches to enhance the system’s responsiveness to changing conditions while maintaining the robustness demonstrated by the current hybrid architecture. Table 3describes the parameters used in this paper. 4. Experimental setup Evaluating anomaly detection in environmental sensor networks is particularly challenging due to the scarcity of reliable ground truth and the complexity of multivariate, temporally correlated signals. We adopt a multifaceted evaluation strategy that combines supervised metrics where ground truth is available and unsupervised stability assessments. For synthetic anomaly experiments and benchmark datasets, we use F1score as our primary evaluation metric: F1-Score =2⋅Precision ⋅Recall Precision +Recall (9) The F1-score provides a single interpretable value that captures both the accuracy and completeness of anomaly detection in the presence of imbalanced data. Where synthetic labels are available, we also report AUC-ROC: AUC-ROC = 1 ∫ 0 TPR(FPR−1(𝑟)) 𝑑𝑟 (10) This provides a threshold-agnostic measure of separability. For unlabelled real-world data, we compute the Temporal Stability Index (TSI): TSI =1− 1 𝑇−1 𝑇 ∑ 𝑡=2 min (1,|𝑆𝑡−𝑆𝑡−1| 𝜎𝑆)(11) Which measures the smoothness of anomaly scores over time, penalising significant inter-temporal variations where they are not expected. 4.1. Baseline comparison To benchmark our system, we implemented two widely used anomaly detection methods: Isolation Forest and One-Class SVM [26,13, 27–30]. These models were chosen because of their efficiency and popularity in environmental anomaly detection tasks. The Isolation Forest was configured with n_estimators = 100 and max_samples = 256, manually adjusted by held-out validation. The One-Class SVM used a radial basis function kernel, with 𝜈=0.05 and 𝛾=0.1selected from a coarse manual sweep. These baselines were compared using identical preprocessing pipelines and evaluated using the same metrics (F1 score and TSI), ensuring fair alignment with our proposed hybrid system. 4.2. Cross-validation strategy To assess generalisability and robustness, we adopted two complementary validation schemes. In the temporal hold-out strategy, the final 25% of the time series is used for testing, the preceding 15% for validation, and the first 60% for training. This reflects realistic deployment scenarios with temporally ordered data. Additionally, we conducted leave-one-device-out cross-validation, training on nine devices, and testing on the remaining one. This ensures our architecture generalises to unseen deployment settings without retraining. 4.3. Synthetic anomaly injection We evaluated detection performance on three types of injected anomalies: spikes, drifts, and dropouts. Fig. 2illustrates the anomaly window of the dataset. Spike anomalies follow: 𝑥anomalous 𝑡,𝑗 =𝑥𝑡,𝑗 +𝐴𝑗⋅𝜎𝑗⋅exp (−(𝑡−𝑡0)2 2𝜎2 spike )(12) Smart Agricultural Technology 12 (2025) 101389 6 A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. Fig. 2. Illustration of the synthetic anomaly. Where 𝐴𝑗∈[1.5,4.0] is the amplitude factor selected to represent realistic sensor spike magnitudes, as used in similar environmental monitoring studies [2,6], 𝜎𝑗is the feature standard deviation, and 𝜎spike ∈[2,8] time steps is the spike width, following the temporal anomaly patterns established in time-series anomaly detection [6]. Drift anomalies use a linear or exponential function: 𝑥anomalous 𝑡,𝑗 =𝑥𝑡,𝑗 +𝐴𝑗⋅𝜎𝑗⋅ 𝑡−𝑡0 𝑡1−𝑡0 ⋅𝟏[𝑡0,𝑡1](𝑡)(13) Dropout anomalies are injected as: 𝑥anomalous 𝑡,𝑗 =𝑥𝑡0,𝑗 +𝛼⋅(𝑥𝑡,𝑗 −𝑥𝑡0,𝑗 ), 𝛼∈[0,1] (14) where 𝛼=0corresponds to full dropout (flatline), and higher 𝛼retains partial variability. 5. Results and discussion Fig. 3reveals distinct performance patterns across different anomaly categories. The hybrid model maintains consistently high F1-scores for spike (0.85), drift (0.89), and dropout (0.91) anomalies, demonstrating its versatility across diverse anomaly scenarios. In contrast, both FFN variants struggle significantly with all anomaly types, achieving F1-scores below 0.33 even in their best cases. The LSTM models perform reasonably well across all categories but still fall short of the hybrid approach, particularly for spike anomalies. Traditional methods like Isolation Forest and One-Class SVM show moderate performance but fall considerably short of the LSTM and hybrid approaches. These methods lack the capability to effectively model temporal dependencies and cannot adapt to the complex patterns present in environmental sensor data as presented in Table 4. The performance breakdown highlights the complementary strengths of different architectural components. For spike anomalies, which represent sudden, short-lived deviations, the hybrid model achieves a 3-7% improvement over LSTM variants. This advantage stems from the integration of trust evaluation with reconstructionbased detection, allowing the system to distinguish legitimate environmental spikes from sensor malfunctions. Drift anomalies, characterised by gradual deviation from normal patterns, present a more substantial challenge for most detection approaches. However, our hybrid model maintains strong performance with an F1-score of 0.89, outperforming the LSTM ∇by 2%. The time decay mechanism in the trust component proves particularly valuable for these scenarios, enabling the system to identify subtle progressive changes that might otherwise be missed. For dropout anomalies, which simulate sensor failures with stuck readings, the hybrid approach demonstrates its strongest performance with an F1-score of 0.91. The 2% improvement over LSTM ∇for this category reflects the system’s enhanced capability to detect anomalous patterns in temporal stability, a critical feature when monitoring environmental sensor networks where communication or power failures frequently manifest as dropout anomalies. Baseline methods such as Isolation Forest and One-Class SVM achieve lower TSI values as shown in Table 4because they process each time point independently, without leveraging temporal dependencies. This can lead to prediction oscillations when encountering borderline cases or noisy measurements, resulting in unstable anomaly flags over time. The absence of a temporal smoothing or memory component in these algorithms amplifies this effect. Our proposed hybrid model mitTable 4 Baseline comparison of detection models across evaluation metrics. Model F1-Score AUC-ROC TSI Isolation Forest 0.70 0.83 0.59 One-Class SVM 0.72 0.79 0.61 LSTM 0.83 0.92 0.91 LSTM ∇0.86 0.94 0.93 Hybrid 0.89 0.97 0.95 Table 5 Leave-one-device-out cross-validation results showing performance metrics across different devices. Device ID F1-Score AUC-ROC TSI 1 0.88 0.96 0.94 2 0.85 0.94 0.92 3 0.91 0.98 0.96 4 0.87 0.95 0.93 5 0.89 0.97 0.95 igates this by integrating LSTM-based temporal encoding with a trust score decay mechanism, which stabilises anomaly predictions across consecutive time steps and thus achieves a TSI of 0.95. 5.1. Cross-validation performance The leave-one-device-out cross-validation (LODO-CV) results presented in Table 5demonstrate robust generalisation across different monitoring devices. F1-scores range from 0.85 to 0.91 across the five devices, with a mean of 0.88. The relatively small standard deviation (𝜎= 0.023) indicates consistent performance regardless of device-specific characteristics or deployment conditions. This consistency is particularly important for environmental monitoring applications, where detection systems must perform reliably across heterogeneous devices and varying installation contexts. The AUC-ROC values in the cross-validation study range from 0.94 to 0.98, with a mean of 0.96, further confirming robust discriminative capability across devices. Similarly, TSI values remain high (0.92-0.96), indicating stable temporal performance across different monitoring contexts. Device 3 demonstrates the strongest overall performance (F1-score = 0.91, AUC-ROC = 0.98, TSI = 0.96), suggesting that this particular device may have cleaner data or more distinct anomaly patterns compared to other units. Cross-location evaluation, where models trained on South African data are tested on Portuguese devices and vice versa, reveals the challenges of generalising across significantly different environments. Models trained solely on South African data achieve only 73.4% F1-score on Portuguese devices, while models trained on Portuguese data achieve 69.7% F1-score on South African devices. The hybrid approach mitigates this performance drop through transfer learning and adaptive integration, achieving 81.2% F1-score in cross-location scenarios, significantly outperforming baseline methods that drop below 60% in these challenging conditions. 5.2. ROC curve analysis The ROC curves displayed in Fig. 4provide further insight into detection performance across different false positive rate thresholds. The hybrid model dominates the other approaches across the entire ROC space, achieving an AUC of 0.90 compared to 0.84 for LSTM AE and 0.71 for FFN AE. This dominance is particularly pronounced in the low false positive rate region (FPR <0.2), which represents the most practically relevant operating range for environmental monitoring systems where false alarms can significantly diminish operational efficiency. Smart Agricultural Technology 12 (2025) 101389 7 A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. Fig. 3. F1-Score comparison by anomaly type and model. The hybrid approach consistently outperforms individual components across all anomaly categories. Fig. 4. ROC curve comparison between different models, showing superior discrimination capability of the hybrid approach across all operating points. The shape of the hybrid model’s ROC curve indicates that it achieves an approximately 80% true positive rate while maintaining a false positive rate below 10%. This operating point represents an attractive tradeoff for practical deployment, offering sufficient sensitivity to detect most anomalies while limiting false alarms to a manageable level. In contrast, LSTM AE would require accepting a false positive rate of about 20% to achieve the same sensitivity. At the same time, the FFN AE cannot achieve comparable performance at any operating point. 5.3. Temporal stability analysis Temporal stability, quantified through the TSI metric, represents a critical quality dimension for anomaly detection in environmental monitoring applications. Fig. 5compares TSI values across different model variants, revealing a clear progression in stability from basic FFN (TSI = 0.83) to our hybrid approach (TSI = 0.95). The consistent improvement in stability with increasing model sophistication demonstrates that architectural enhancements not only improve detection accuracy but also contribute to more stable temporal behaviour. The temporal stability advantage of the hybrid approach stems from three architectural elements: the LSTM component’s explicit modelling of temporal sequences, the gradient-based detection mechanism that focuses on significant changes rather than absolute values, and the trust evaluation component’s time decay function that smoothly adjusts trust scores over time. Together, these elements enable the hybrid system to maintain coherent anomaly assessments across time while remaining responsive to genuine anomalies. To further quantify stability benefits, we analysed the frequency of score fluctuations exceeding different thresholds. The hybrid approach shows 72% fewer large fluctuations (Δscore >0.3) between consecutive time points compared to the FFN approach, and 38% fewer compared to LSTM models. This reduction in abrupt score changes translates directly to more reliable operation in real-world deployment scenarios. 5.4. Score behaviour analysis To provide further qualitative insight into the models’ runtime behaviour, Fig. 6presents a comparison of the anomaly score trajectories produced by each model during a representative test window containing a synthetic drift anomaly. The plot overlays each model’s fixed threshold (derived as the 5th percentile of training scores) and illustrates their respective responses as the anomaly unfolds. The FFN model shows weak detection response and significant score volatility, reflecting its inability to model temporal trends. The LSTM AE demonstrates improved tracking, particularly after the anomaly onset, but still exhibits lag in score elevation and a tendency for overshooting during transitions. In contrast, the hybrid model responds promptly and maintains a smooth, elevated score trajectory during the anomaly, crossing the threshold early and maintaining high precision. This early crossing is attributed to the synergy between the reconstruction error Smart Agricultural Technology 12 (2025) 101389 8 A.D. Abdullahi, C.S. Erasmus, M.J. Booysen et al. Fig. 5. TSI comparison across different models, showing progressive improvement with model sophistication. Fig. 6. Combined anomaly scores over time with threshold overlays for each model. The highlighted region indicates a synthetic drift anomaly. gradient and the decaying trust signal, which anticipates deviations before they become pronounced. Importantly, no adaptive thresholding is employed—each threshold remains static throughout inference. As detailed in Section 3.8, models are trained offline using the first 6000 samples, and evaluation occurs on a held-out set of 1000 samples. The thresholds represented as dashed lines are computed independently per model and per device from training data only. Runtime adaptation is intentionally excluded to isolate model-specific detection dynamics without feedback interference. The hybrid model maintains an optimal trade-off between sensitivity and stability, avoiding premature false positives while detecting anomalies early. Fixated thresholding also reveals the margin of each model: the hybrid consistently separates anomaly scores from normal fluctuation margins better than other approaches. This separation underpins its superior precision and recall performance observed in quantitative evaluations. 5.5. Computational overheads The TRAD system requires approximately 1.35 minutes of training per device (distributed among the FFN autoencoder, the LSTM autoencoder, and the components of the trust model) with a memory footprint of 2.2 MB and an inference latency of 12.4 ms per sample. These computational requirements enable real-time operation at standard environmental monitoring intervals (6 minutes) and are compatible with Table 6 Runtime performance comparison across anomaly detection methods. Method Inference Time (ms) Throughput (samples/sec) Isolation Forest 2.3 434.8 One-Class SVM 1.8 555.6 FFN Autoencoder 2.8 357.1 LSTM Autoencoder 8.1 123.5 LSTM ∇8.7 114.9 TRAD (Hybrid) 12.4 80.6 edge computing devices. However, they exceed the capabilities of ultralow-power sensor nodes commonly deployed in remote environmental applications. Communication overhead totals 150 bytes per measurement, generating approximately 36 KB daily for typical 10-device deployments, which remains within LoRaWAN network capacity, but may present constraints for satellite-based communication in extremely remote locations. A runtime performance comparison, presented in Table 6reveals that TRAD requires 12.4 ms of inference time, compared to traditional methods (Isolation Forest: 2.3 ms, One-Class SVM: 1.8 ms), representing a fourto six-fold increase in computational time. However, this enables throughput of 80.6 samples per second, sufficient for real-time processing of environmental sensor streams at typical 6-minute monitoring intervals, with the speed trade-off justified by substantial performance improvements. Smart Agricultural Technology 12 (2025) 101389 9