# Variational Autoencoders for Network Lifetime Enhancement in Wireless Sensors
## 3 Methodology
### Performance Analysis  
The comparison chart of the compression ratio of the proposed VAE, in comparison to the existing methods is shown in Figure 5, and its average value is projected in Table 3. Figure 5 signifies that the compression ratio of VAE is comparatively higher than the three (AE, CS and LTC) existing methods. The maximum compression ratio of VAE reaches near 2.5, and its average compression ratio is 1.5572 which is better among all the existing methods considered. AE that attains an average compression ratio of 1.4111, provides a competitive compression ratio to the proposed VAE. CS algorithm provides the least average compression ratio of 1.2956, whereas the compression ratio by LTC is 1.3613. This analysis indicates that the amount of data transferred through VAE is comparatively less, than that of the other methods. Since the amount of data transferred though VAE based WSN is less, it can provide a better network lifetime than the other approaches. The performance of the VAE is found satisfactory, due to its probabilistic nature of encoding and decoding process. Similarly, the latent space regularization on the objective of VAE, makes the model learn the compact data representations at a high compression rate. Compression ratio is one of the primary analyses that is required for calculating the amount of data transferred in a WSN. However, data reconstruction rate needs to be considered for identifying an overall efficiency of a compression algorithm. Figure 6 indicates the reconstruction data and its error value of the analyzed methods. It compares the reconstruction data of all 10,000 original data samples with the reconstructed data, to find the reconstruction error. The average reconstruction rate of each model is shown in Table 4. It can be found that the reconstruction rate of VAE is high at 0.9902, which shows a better reconstruction rate of 0.0793 than the AE model, due to the involvement of Kullback-Leibler divergence in VAEs. _KL_ helps in avoiding the overfitting issues, and \begin{table}
\begin{tabular}{c c c c} \hline \hline
**VAE** & **AE** & **CS** & **LTC** \\ \hline
1.5572 & 1.4111 & 1.2956 & 1.3613 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Average compression ratio of different methods. the loss function of VAE reduces its reconstruction error. LTC shows a poor reconstruction rate of 0.4984 and CS provides a decent reconstruction rate of 0.7552. From this analysis, it is observed that VAE provides excellent compression and reconstruction rate than the comparative methods. The experimental work identifies that CS algorithm provides a low compression rate and the LTC algorithm provides a poor reconstruction rate. Figure 5: Comparison of the compression ratio of different methods. Figure 6: _Cont._  
Figure 7 indicates the number of active sensor nodes available in the WSN architecture on every 100 s, in the overall simulation time of 1500 s. It can be discovered that the number of active nodes available in the VAE incorporated WSN is always higher than all the other methods. This has been attained as the number of retransmissions are less in VAE due to its betterment in reconstruction rate. The performance of AE comes in between VAE and CS, where all the active nodes are dead around 1300 s of simulation time. It has also been observed that the number of active nodes of both AE and VAE are same up to 100 s, then a steady drop has been observed from 100 to 800 s and that leads to all node dead state before 1300 s. Similarly, all the sensor nodes of CS and LTC approaches went into dead state before 1200 s and 700 s respectively. It has also been observed that VAE exhibits significantly better performance, with a notable deviation up to 1000 simulation seconds compared to the other three methods. The residual energy availability of the sensor network for all the approaches has been shown in Figure 8. It can be deduced that the residual energy of VAE included sensor network is comparatively higher than that of the other approaches.