{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T11:06:11Z","timestamp":1790075171506,"version":"4.0.1"},"reference-count":26,"publisher":"MDPI AG","issue":"18","license":[{"start":{"date-parts":[[2026,9,21]],"date-time":"2026-09-21T00:00:00Z","timestamp":1789948800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100009096","name":"Scientific Research Projects Coordination Unit of Firat University","doi-asserted-by":"publisher","award":["MF.26.114"],"award-info":[{"award-number":["MF.26.114"]}],"id":[{"id":"10.13039\/100009096","id-type":"DOI","asserted-by":"publisher"}]},{"award":["MF.26.114"],"award-info":[{"award-number":["MF.26.114"]}],"id":[{"id":"https:\/\/ror.org\/05teb7b63","id-type":"ROR","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>Accurate age estimation and gender classification from facial images remain challenging tasks owing to substantial variations in facial appearance caused by pose, illumination, expression, occlusion, image quality, and age-related morphological changes. Although transformer-based architectures have recently demonstrated remarkable performance in facial analysis, effectively exploiting their complementary representation capabilities within a unified multi-task framework remains an open research problem. To address this limitation, this study proposes a transformer-based Multi-task Learning (MTL) framework that jointly performs age estimation and gender classification using a shared feature extraction backbone and task-specific prediction heads. Three state-of-the-art vision transformers, namely Vision Transformer (ViT), Shifted Window Transformer (Swin Transformer), and Data-efficient Image Transformer (DeiT), were independently implemented within the proposed MTL architecture to learn both global contextual information and local facial characteristics. Furthermore, two ensemble learning strategies, namely standard ensemble and Task-aware Weighted Ensemble (TAWE), were developed to exploit the complementary strengths of the individual transformer models. Experiments were conducted on the publicly available UTKFace dataset comprising 15,503 facial images, which were divided into 10,385 training, 1833 validation, and 3285 test samples, while gender balancing was applied during model training to alleviate class imbalance. Age estimation performance was evaluated using Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE), whereas gender classification performance was assessed using Accuracy and F1-score. Experimental results demonstrate that the proposed TAWE achieved the best point estimates among the evaluated ensemble strategies, obtaining an MAE of 4.8905, an RMSE of 6.4674, a gender classification accuracy of 94.86%, and an F1-score of 95.17% for the dataset-defined positive class. Compared with equal-weight averaging, TAWE provided a statistically significant improvement in gender classification accuracy, while the improvement in age estimation was modest and not statistically significant.<\/jats:p>","DOI":"10.3390\/s26185982","type":"journal-article","created":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T10:21:48Z","timestamp":1790072508000},"page":"5982","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Transformer-Based Multi-Task Learning with a Task-Aware Weighted Ensemble for Simultaneous Age Estimation and Gender Classification from Facial Images"],"prefix":"10.3390","volume":"26","author":[{"ORCID":"https:\/\/orcid.org\/0009-0001-7052-389X","authenticated-orcid":false,"given":"S\u00fcmeyye","family":"Sar\u0131ate\u015f","sequence":"first","affiliation":[{"name":"Department of Computer Engineering, Firat University, 23119 Elazig, T\u00fcrkiye"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9004-4802","authenticated-orcid":false,"given":"Erdal","family":"\u00d6zbay","sequence":"additional","affiliation":[{"name":"Department of Computer Engineering, Firat University, 23119 Elazig, T\u00fcrkiye"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2026,9,21]]},"reference":[{"key":"ref_1","first-page":"1289408","article-title":"Deeply learned classifiers for age and gender predictions of unfiltered faces","volume":"2020","author":"Viriri","year":"2020","journal-title":"Sci. World J."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"2223","DOI":"10.1109\/TCSVT.2023.3304724","article-title":"SwinFace: A multi-task transformer for face recognition, expression recognition, age estimation and attribute estimation","volume":"34","author":"Qin","year":"2023","journal-title":"IEEE Trans. Circuits Syst. Video Technol."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Liao, H., Yan, Y., Dai, W., and Fan, P. (2022). Face gender and age classification based on multi-task learning and multi-instance feature fusion. Appl. Sci., 12.","DOI":"10.3390\/app122312432"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"2597","DOI":"10.1109\/TPAMI.2017.2738004","article-title":"Heterogeneous face attribute estimation: A deep multi-task learning approach","volume":"40","author":"Han","year":"2018","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"121","DOI":"10.1109\/TPAMI.2017.2781233","article-title":"HyperFace: A deep multi-task learning framework for face detection, landmark localization, pose estimation, and gender recognition","volume":"41","author":"Ranjan","year":"2019","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Rothe, R., Timofte, R., and Van Gool, L. (2015, January 7\u201313). DEX: Deep EXpectation of apparent age from a single image. Proceedings of the IEEE International Conference on Computer Vision Workshops, Santiago, Chile.","DOI":"10.1109\/ICCVW.2015.41"},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Yang, T.Y., Huang, Y.H., Lin, Y.Y., Hsiu, P.C., and Chuang, Y.Y. (2018, January 13\u201319). Ssr-net: A compact soft stagewise regression network for age estimation. Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, Stockholm, Sweden.","DOI":"10.24963\/ijcai.2018\/150"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Islam, M.M., and Baek, J.-H. (2021). Deep learning based real age and gender estimation from unconstrained face image towards smart store customer relationship management. Appl. Sci., 11.","DOI":"10.3390\/app11104549"},{"key":"ref_9","unstructured":"Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., and Houlsby, N. (2021, January 3\u20137). An image is worth 16x16 words: Transformers for image recognition at scale. Proceedings of the International Conference on Learning Representations (ICLR), Virtual."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., and Guo, B. (2021, January 11\u201317). Swin transformer: Hierarchical vision transformer using shifted windows. Proceedings of the IEEE\/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada.","DOI":"10.1109\/ICCV48922.2021.00986"},{"key":"ref_11","unstructured":"Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., and J\u00e9gou, H. (2021, January 18\u201324). Training data-efficient image transformers & distillation through attention. Proceedings of the International Conference on Machine Learning PMLR, Virtual."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"1289","DOI":"10.1007\/s11042-022-12678-6","article-title":"Review: Single attribute and multi attribute facial gender and age estimation","volume":"82","author":"Gupta","year":"2023","journal-title":"Multimed. Tools Appl."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"5586","DOI":"10.1109\/TKDE.2021.3070203","article-title":"A survey on multi-task learning","volume":"34","author":"Zhang","year":"2022","journal-title":"IEEE Trans. Knowl. Data Eng."},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Zhang, Z., Song, Y., and Qi, H. (2017, January 21\u201326). Age progression\/regression by conditional adversarial autoencoder. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, Hawaii.","DOI":"10.1109\/CVPR.2017.463"},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"102","DOI":"10.1186\/s40537-022-00652-w","article-title":"Transfer learning: A friendly introduction","volume":"9","author":"Hosna","year":"2022","journal-title":"J. Big Data"},{"key":"ref_16","unstructured":"Loshchilov, I., and Hutter, F. (2017). Decoupled weight decay regularization. arXiv."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Sar\u0131ate\u015f, M., and \u00d6zbay, E. (2025). Transfer learning-based ensemble of CNNs and vision transformers for accurate melanoma diagnosis and image retrieval. Diagnostics, 15.","DOI":"10.3390\/diagnostics15151928"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"5481","DOI":"10.5194\/gmd-15-5481-2022","article-title":"Root-mean-square error (RMSE) or mean absolute error (MAE): When to use them or not","volume":"15","author":"Hodson","year":"2022","journal-title":"Geosci. Model Dev."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"221","DOI":"10.1007\/s13748-016-0094-0","article-title":"Learning from imbalanced data: Open challenges and future directions","volume":"5","author":"Krawczyk","year":"2016","journal-title":"Prog. Artif. Intell."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"60","DOI":"10.1186\/s40537-019-0197-0","article-title":"A survey on image data augmentation for deep learning","volume":"6","author":"Shorten","year":"2019","journal-title":"J. Big Data"},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"314","DOI":"10.1016\/j.procs.2024.06.030","article-title":"Human age and gender prediction from facial images using deep learning methods","volume":"238","author":"Dey","year":"2024","journal-title":"Procedia Comput. Sci."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"21839","DOI":"10.1007\/s00521-024-10390-0","article-title":"Deep convolutional neural networks for age and gender estimation using an imbalanced dataset of human face images","volume":"36","year":"2024","journal-title":"Neural Comput. Appl."},{"key":"ref_23","first-page":"1","article-title":"Comparative Analysis of CNNs and Vision Transformers for Age Estimation","volume":"46","author":"Tanveer","year":"2025","journal-title":"Jorn. Autom\u00e1tica"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Koco\u0144, M., and Pawlukiewicz, S. (2025). Age estimation and gender classification from facial images. Appl. Sci., 15.","DOI":"10.3390\/app151810212"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"e1249","DOI":"10.1002\/widm.1249","article-title":"Ensemble learning: A survey","volume":"8","author":"Sagi","year":"2018","journal-title":"Wiley Interdiscip. Rev. Data Min. Knowl. Discov."},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"427","DOI":"10.1016\/j.ipm.2009.03.002","article-title":"A systematic analysis of performance measures for classification tasks","volume":"45","author":"Sokolova","year":"2009","journal-title":"Inf. Process. Manag."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/26\/18\/5982\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T10:39:33Z","timestamp":1790073573000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/26\/18\/5982"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,9,21]]},"references-count":26,"journal-issue":{"issue":"18","published-online":{"date-parts":[[2026,9]]}},"alternative-id":["s26185982"],"URL":"https:\/\/doi.org\/10.3390\/s26185982","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,9,21]]}}}