Submitted:
07 March 2025
Posted:
10 March 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Materials and Methods
- GAIN algorithm has been implemented using tf.compat.v1, which is part of the TensorFlow 1.x API that is intended to aid migration from TF1 to TF2 [16]. EGAIN, on the other hand, is implemented in TensorFlow 2, benefiting from improved performance optimizations, reduced boilerplate code, enhanced function tracing, and increased readability, debuggability, and maintainability.
- GAIN algorithm utilizes a deep neural network for both the generator and the discriminator, each composed of two dense layers. The data with missing values and its corresponding mask array are concatenated side by side (by columns) before being fed into the networks. EGAIN, on the other hand, employs a deep convolutional neural network for the generator and the discriminator, consisting of one convolutional layer followed by a max-pooling layer, along with two dense layers. In this approach, the data with missing values and its mask array are stacked on top of each other, similar to a sandwich, before being fed into the network. This structure enables the network to capture spatial associations in the input more effectively.
- GAIN implementation is highly sensitive to hyperparameter selection and may fail to converge or produce results if the number of iterations is not appropriate. This issue is particularly evident when missing values exist in only a few columns, as seen in MAR and MNAR scenarios. In contrast, EGAIN consistently provides reliable imputations in every run. This is accomplished through the use of checkpoints, where the network weights are stored and recalled when performance issues arise.
- GAIN implementation includes several nonstandard user-defined functions for scaling, sampling, and network initialization, whereas EGAIN utilizes standard built-in functions. For example, Xavier initialization is implemented as a user-defined function in GAIN for network weight initialization, while EGAIN leverages the built-in Xavier initialization for layer kernels.
- EGAIN provides charts displaying the loss function over iterations, aiding in hyperparameter selection and offering a visual indication of network performance. In contrast, GAIN lacks such a chart and since it is highly sensitive to hyperparameters, the network often fails to converge when poor hyperparameter choices are made.
3. Results

4. Discussion
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| GAIN | Generative Adversarial Imputation Network |
| EGAIN | Enhanced Generative Adversarial Imputation Network |
| MAR | Missing At Random |
| MCAR | Missing Completely At Random |
| MNAR | Missing Not At Random |
| MICE | Multiple Imputation by Chained Equations |
| LFM-D2GAIN | Latent Factor Model with Dual Discriminator GAIN |
| GAGIN | Generative Adversarial Guider Imputation Network |
| ccGAIN | Conditional Clinical GAIN |
| LWGAIN | Loss Wasserstein GAIN |
| TensorFlow | TF |
| API | Application Programming Interface |
| RMSE | Root Mean Squared Error |
References
- Rubin, D. Inference and missing data. Biometrika 1976, 63, 581–592. [Google Scholar]
- Van Buuren, S.; Groothuis-Oudshoorn, K. mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software 2011, 45, 1–67. [Google Scholar]
- White, I.; Royston, P.; Wood, A. Multiple imputation using chained equations: Issues and guidance for practice. Statistics in Medicine 2011, 30, 377–399. [Google Scholar] [PubMed]
- Stekhoven, D.; Buhlmann, P. MissForest—non-parametric missing value imputation for mixed-type data. Bioinformatics 2011, 28, 112–118. [Google Scholar] [CrossRef] [PubMed]
- Waljee, A.; Mukherjee, A.; Singal, A.; Zhang, Y.; Warren, J.; Balis, U.; Marrero, J.; Zhu, J.; Higgins, P. Comparison of imputation methods for missing laboratory data in medicine. BMJ Open 2013, 3, e002847. [Google Scholar] [CrossRef] [PubMed]
- Yoon, J.; Jordon, J.; Van Der Schaar, M. GAIN: Missing Data Imputation using Generative Adversarial Nets. In Proceedings of the 35th International Conference on Machine Learning, Stockholm, Sweden, 10-15 July 2018. [Google Scholar]
- Dong, W.; Fong, D.; Yoon, J.; Wan, E.; Bedford, L.; Tang, E.; Lam, C. Generative adversarial networks for imputing missing data for big data clinical research. BMC Medical Research Methodology 2021, 21, 78. [Google Scholar]
- Zhou, Y.; Aryal, S.; Bouadjenek, M. Review for Handling Missing Data with special missing mechanism. arXiv 2024. [Google Scholar]
- Sun, Y.; Li, J.; Xu, Y.; Zhang, T.; Wang, X. Deep learning versus conventional methods for missing data imputation: A review and comparative study. Expert Systems with Applications 2023, 227, 120201. [Google Scholar]
- Shahbazian, R.; Greco, S. Generative Adversarial Networks Assist Missing Data Imputation: A Comprehensive Survey and Evaluation. IEEE Access 2023, 11, 88908–88928. [Google Scholar]
- Shen, Y.; Zhang, C.; Zhang, S.; Yan, J.; Bu, F. LFM-D2GAIN: An Improved Missing Data Imputation Method Based on Generative Adversarial Imputation Nets. In Proceedings of the 2022 IEEE International Conference on Electrical Engineering, Big Data and Algorithms (EEBDA), Changchun, China, 25-27 February 2022. [Google Scholar]
- Wang, W.; Chai, Y.; Li, Y. GAGIN: generative adversarial guider imputation network for missing data. Neural Computing and Applications 2022, 34, 7597–7610. [Google Scholar]
- Zhao, S. ClueGAIN: Application of Transfer Learning On Generative Adversarial Imputation Nets (GAIN). arXiv 2023. [Google Scholar]
- Bernardini, M.; Doinychko, A.; Romeo, L.; Frontoni, M.; Amini, M. A novel missing data imputation approach based on clinical conditional Generative Adversarial Networks applied to EHR datasets. Computers in Biology and Medicine 2023, 163, 107188. [Google Scholar]
- Qian, H.; Geng, Y.; Wang, H.; Wu, X.; Li, M. LWGAIN: An Improved Missing Data Imputation Method Based on Generative Adversarial Imputation Network. In Proceedings of the 2024 5th International Conference on Computer Vision, Image and Deep Learning (CVIDL), Zhuhai, China, 19-21 April 2024. [Google Scholar]
- TensorFlow 1.x vs TensorFlow 2 - Behaviors and APIs. Available online: https://www.tensorflow.org/guide/migrate/tf1_vs_tf2 (accessed on Feb, 2025).
- The UCI Machine Learning Repository. Available online: https://archive.ics.uci.edu (accessed on Feb, 2025).



| Dataset | Cases | Features | Description |
|---|---|---|---|
| breast | 569 | 31 | 30 numerical, 1 binary categorical |
| spam | 4,601 | 58 | 57 numerical, 1 binary categorical |
| credit | 30,000 | 24 | 14 numerical, 10 categorical |
| Method | GAIN | EGAIN |
|---|---|---|
| breast cancer | 0.0385 ± 0.0331 | 0.0373 ± 0.0314 |
| spam | 0.0200 ± 0.0157 | 0.0161 ± 0.0152 |
| credit | 0.0413 ± 0.0284 | 0.0345 ± 0.0263 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).