## 5 Results
TFNN enhances the network's lifetime compared to the direct-to-base-station communication approach. The autonomous hierarchical clustering configuration enabled by TFNN allows cluster heads to communicate directly with the base-station, while all other communications occur within the cluster. Members of each cluster send their local results to their cluster head for processing. Each cluster consists of nodes that are in close proximity to  
Figure 1: Figures (**a-j**) present a selection of handwritten digits from 0–9 of the MNIST dataset, respectively. one another, resulting in generally short distances between the cluster head and its cluster members. In contrast to the direct communication approach, which requires long-distance, energy-intensive transmissions to the base-station, such communications are limited to cluster heads and nodes that are not part of any cluster. By ensuring that the majority of data communications occur within the cluster, TFNN significantly reduces energy consumption among the nodes. This reduction prolongs the network's operational lifespan, allowing it to detect patterns for longer periods without the need to replace or recharge batteries. Figure 3 illustrates that the number of active nodes experiences a significant drop around round 400. However, the network continues to operate and detect patterns, with the number of active nodes gradually declining after round 800 when using TFNN. Consequently, TFNN nearly doubles the network's lifetime. The simulation results presented in Figure 4 establish a connection between the accuracy and lifetime of the network. The figure compares the accuracy of event recognition against the network's lifetime (measured in rounds) while testing MNIST patterns from 0 to 9 using both TFNN and direct communication approaches. Each node was trained with 200 random patterns from the MNIST training dataset. The results indicate comparable performance across different test patterns. However, when direct communication is employed instead of TFNN, accuracy begins to decline around round 400 for all pattern classes. The above figure demonstrates that nodes utilizing direct communication deplete their battery power more quickly than those using TFNN, as direct communication to the base-station is more energy-intensive. Consequently, the accur  
Figure 2: Network setup featuring 50 nodes deployed within a 100 m \(\times\) 100 m field, with the base-station positioned at (50, 200). In this round, 19 clusters are formed. communication decreases rapidly as they start to go offline due to battery depletion, which is exacerbated by the high energy consumption associated with direct communication. FedAvg, FedProx, and FedBuff rely on multiple communication rounds to detect patterns and achieve specific accuracy thresholds. According to the study in [51], these algorithms require an average of 231, 228, and 31.9 rounds, respectively, to detect each pattern. This multi-round process significantly impacts the network's lifetime, as each communication round consumes resources such as battery power, memory, and processing capacity. Consequently, these algorithms may be unsuitable for deployment in IoT networks with strict resource constraints. The communication-intensive nature of these algorithms suggests that an IoT network employing any of them would be capable of detecting only a limited number of patterns before depleting its energy reserves and going offline. Based on the required number of communication rounds, such a network may operate for only a short duration before the nodes exhaust their battery power and cease functioning. Integrating LEACH with FedAvg, FedProx, or FedBuff could mitigate this issue by reducing the frequency of direct communication with the base-station, thereby conserving energy. The communication-intensive nature of these algorithms suggests that an IoT network employing any of them would detect only a limited number of patterns before depleting its energy reserves and going offline.