October 13, 2026
Use of Unsupervised Machine Learning techniques for planning remuneration review work for retirement
Use of Unsupervised Machine Learning Techniques for Planning of Compensation Review Work for Retirement
Marcos Augusto Lobato Miani; Miguel Ângelo Lellis Moreira
DOI: 10.22167/2675-6528-202603293
Article derived from a Course Conclusion Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.
Summary
The sizing of personnel and the management of retirement flows in federal public bodies presented complex strategic challenges. The study aimed to apply unsupervised Machine Learning techniques, specifically Clustering (K-means) and Multiple Correspondence Analysis (MCA), to improve the planning of functional reviews in a Brazilian federal autarchy. The methodology consisted of processing a validated database of 487 active servers. Initially, quantitative variables, such as age, contribution time, and remuneration, were subjected to the K-means algorithm, resulting in the formation of five clusters, supported by the Elbow Method and Silhouette Coefficient. Subsequently, the groups were integrated with qualitative variables via MCA, projected onto a perceptual map that explained 74.81% of the data’s inertia. The results revealed that clusters 0 and 3 represented profiles of greatest pension criticality, concentrating all beneficiaries of permanence bonuses and the majority of extinct positions. The research generated a phased Action Plan, prioritizing the 75 servers in these clusters who met the retirement requirements by 2025, with a similar guideline for 2026. In contrast, cluster 2 presented lower risk, with inactivity predicted only from 2031 onwards. The model proved to be a widely favorable tool for auditing and remediation, although its full effectiveness depends on more rigorous data governance in public service.
Keywords: Clustering; Multiple Correspondence Analysis (MCA); Retirement; Clusterization.
1. Introduction
Staffing and the management of retirement flows in federal public agencies represent complex strategic challenges, especially in the face of regulatory instabilities. Dutra et al. (2025) emphasize that, although the long-term quantitative and qualitative staffing is a strategic pillar for organizations, its execution is inherently complex, influenced by various variables, including political nuances that challenge effective management.
The organization under study is an autarchy of the Federal Executive Branch, headquartered in Brasília, Federal District. Changes in its human resources staff are conditioned on approvals from the central body and the Legislative Branch, in addition to the mandatory public examination (Brazil, 1988). Lara (2023) highlights that even replacements due to retirements remain dependent on prior approval from the central body. In this scenario of low turnover and difficulty in replacement, the management of issues such as leaves of absence and retirements becomes strategically essential (Costin, 2010).
The human resources area in this context faces constant challenges in evaluating and granting retirements. This process demands the analysis of a series of complex variables, such as the verification of all remunerations and contributions from July 1994 onwards, in addition to the correction of employee registration data, including age, contribution time, leave periods, and service time endorsements (Brazil, 1988, art. 40). The instability of Brazilian social security regulations, evidenced by successive reforms, requires professionals to have constantly updated technical knowledge to mitigate procedural errors. Giambiagi (2025) observes that expenses with retirees occupy a significant portion of the Gross Domestic Product, highlighting the urgency of new structural adjustments, despite the fiscal breathing room generated by the 2019 reform.
The database used in this study comes from the Integrated System of Human Resources Administration (SIAPE), originally established by Decree No. 99.328/1990. Currently, the system is undergoing modernization, governed by Decree No. 10.715/2021, which establishes the Structuring Personnel Management Systems as pillars of digital governance and data integration in the Federal Executive Branch. This scenario imposes on teams the challenge of operating in a technological transition environment. Grande (2025) states that such modernization demands adaptations that transcend the technological sphere, encompassing cultural, procedural, and institutional management model changes. Thus, the simultaneous use of legacy and advanced databases results in an increase in the analytical effort required to safeguard the integrity and consistency of functional information.
Additionally, operational complexity is accentuated by the oversight of control bodies, such as the Comptroller General of the Union (CGU), which acts as the internal control body, and the Federal Court of Accounts (TCU), which exercises external control. Their audits have expanded technical responsibility over administrative acts (Brazil, 1988, art. 70 to 74). As a direct consequence of audits, rework demands are generated for human resources departments, in addition to exposing inactive civil servants to the risk of having their retirements denied or questioned. It should be noted that retirement is only considered legal and definitive after the TCU analyzes and formally approves it, or tacitly after five years, according to the understanding established by the Supreme Federal Court in Topic 445 of general repercussion (Brazil, 2020). Therefore, it becomes fundamental to carry out a preventive and systematic review of contributions, remunerations, and, especially, the service records of public servants.
Considering the expressive number of active servers, it is necessary to establish objective criteria to plan this review work. In this context, unsupervised Machine Learning techniques can be useful, since this type of approach, by definition, seeks to identify patterns among variables without the need to predefine a target variable (Sicsú et al., 2023). Carneiro et al. (2023) demonstrated that the combined methodological approach, which uses Multiple Correspondence Analysis (MCA) together with clustering techniques, is effective for analyzing and grouping observations in datasets of a mixed nature, qualitative and quantitative. As an exploratory technique, cluster analysis identifies patterns and similarities in quantitative data without the need for predefined categories, allowing servers to be segmented by profiles to support strategic decisions in planning functional reviews (Fávero and Belfiore, 2024). MCA, in turn, acts as a non-inferential exploratory technique to identify patterns of association between qualitative variables, being effective in mapping and segmenting similar profiles, visually projecting these relationships in multidimensional planes through factorial axes (Bernardino et al., 2025).
Thus, the need to optimize human resources and reduce the risks of inconsistencies in audited processes justifies the application of innovative approaches. Therefore, this work aims to apply Unsupervised Machine Learning techniques, with emphasis on Clustering and ACM, using the SIAPE database with various attributes related to federal public servants, in order to group servers into sets with similar characteristics and assist in the planning of remuneration reviews and retirement registrations.
2. Material and Methods
This research was characterized as an applied case study, with a quantitative approach, using machine learning techniques. The objective was to segment and prioritize social security reviews in an agency of the federal public sector. The methodological process followed fundamental steps, including problem understanding, variable identification and treatment, algorithm application, and result interpretation, as recommended by Sicsú et al. (2023).
The empirical object of the study was a database of active servers from a federal autarchy, headquartered in Brasília, Federal District, located in the Center-West Region. The functional records were anonymized to ensure individual privacy. The original database, from the Integrated Human Resources Administration System (SIAPE), contained approximately 1,266 active servers.
The extraction and processing of data occurred in October 2025. Inconsistencies were identified in the reports generated by the personnel management system. To ensure the integrity of the results, manual cleaning of the fundamental variables was carried out, focusing on the fields that determined retirement proximity. This individual validation process resulted in a consolidated final sample of 487 observations, all composed of validated data.
The variables selected for the study were divided into quantitative and qualitative. The quantitative ones, used in Clustering, included age, time of entry into the organization (in years), contribution time, expected retirement year, and remuneration. The qualitative ones, used in Multiple Correspondence Analysis (MCA), were sex, physical disability, marital status, position, type of entry, opting for Funpresp, and receiving a permanence bonus.
Cluster analysis was performed using the K-means algorithm, aiming to identify natural cluster structures in data without predefined labels (Faceli et al., 2025). Its choice was due to its simplicity and performance on large data volumes (Fávero and Belfiore, 2024; Umargono et al., 2019). The quantitative variables were standardized using the Zscore procedure, via the StandardScaler function from the Python scikit-learn library, and the distance metric employed was Euclidean Distance.
The K-means model sought to minimize intra-cluster variance, with the iterative assignment of points to the nearest centroids and their subsequent update. The ideal number of clusters was determined by the Elbow Method and the Silhouette Coefficient (SC) (Umargono et al., 2019; Vezo, 2024). The relevance of numerical variables in discriminating the groups was validated through one-way Analysis of Variance (ANOVA One-Way), considering significant p-values (p < 0.05).
For the diagnosis of categorical variables and the identification of association patterns, Multiple Correspondence Analysis (MCA) was applied. Its selection was due to its ability to handle multiple qualitative variables and reduce data dimensionality (Fávero and Belfiore, 2024). MCA was based on the decomposition of an Indicator Matrix (Z) and the Burt Matrix (B), whose row and column profiles were projected into a low-dimensional vector space through Singular Value Decomposition (SVD) (Carrasco-Bonal et al., 2025).
The K-means clusters were integrated into the database as a new categorical variable, allowing for a combined analysis with the other qualitative variables (Carneiro et al., 2023). The data were previously normalized using the StandardScaler technique to ensure comparability between variables with different scales (VanderPlas, 2025). Computational processing was executed in Python, using the libraries Pandas, Scikit-learn, Prince, matplotlib.pyplot, and seaborn.
The proximity of retirement was established as a central criterion in the grouping of servers, combining variables such as expected retirement year, current age, time in the agency, and contribution time. This approach allowed for the identification of servers with a greater imminence of requesting the benefit, directing the planning of functional reviews. The final stage consisted of interpreting the groupings projected on the ACM perceptual map, aiming to support the planning of procedural reviews.
3. Results and Discussion
This section presents the results obtained through the application of unsupervised Machine Learning techniques, focusing on Clustering (K-means) and Multiple Correspondence Analysis (MCA), aiming to improve the planning of functional reviews in a Brazilian federal autarchy. The findings reveal profiles of servers with different levels of social security criticality, allowing the proposition of a strategic action plan for retirement management. The analysis began with the characterization of the sample and the application of the K-means algorithm to segment the servers into homogeneous groups, followed by MCA to explore the associations between these groups and qualitative variables, according to the established methodology.
Preliminary Results
Initially, a descriptive statistical analysis of the sample of 487 active servers was performed, after a rigorous manual data cleaning process. This procedure was crucial for correcting inconsistencies in the original reports, ensuring the integrity of the quantitative and qualitative variables used in the study. The individual validation step focused on critical fields for proximity to retirement, such as age, contribution time, and remuneration, ensuring the statistical robustness of the final sample for subsequent analyses.
The overall descriptive statistics of the sample revealed that the average age of the servers was 54.6 years, with an average contribution period of 23.6 years. The average predicted year for retirement was 2035, and the observed average remuneration was 22,548.55. The average service time in the agency was 15.4 years. The data range varied significantly, with ages between 27 and 74 years, and predicted retirement years between 2025 and 2062, indicating a diversity of profiles in the staff.
To determine the ideal number of clusters in the K-means algorithm, the Elbow Method and the Silhouette Coefficient were applied. The Elbow Method identified the inflection point in the variance curve, indicating where the addition of new groups did not result in significant reductions in model inertia. The Silhouette Coefficient, in turn, evaluated the internal cohesion and distinction between clusters, seeking the highest index for the ideal number of categories, as described by Vezo (2024). Both methods converged on the formation of five distinct clusters as the most suitable structure for server segmentation.
Clustering Analysis by K-means Algorithm
The application of the K-means algorithm aimed to identify natural cluster structures in the data, segmenting public servants based on similar characteristics, without the need for predefined labels, which is fundamental for discovering hidden patterns and profiles (Faceli et al., 2025). The choice of K-means was justified by its simplicity of implementation and recognized performance in handling large volumes of data, in addition to being suitable for the hypothesis of clusters with a globular structure (Fávero and Belfiore, 2024; Umargono et al., 2019).
The clustering process involved standardizing the quantitative variables (age, contribution time, retirement year, remuneration, and time in the organization) using the Z-score procedure, through the StandardScaler function from the Python scikit-learn library. This step was essential to ensure that variables with different scales contributed equitably to the model. The Euclidean distance metric was employed to measure the similarity between observations, and the algorithm sought to minimize the sum of squared distances within each cluster (Inertia), dynamically reallocating observations until system convergence.
The statistical validation of the segmentation was ratified by the Analysis of Variance (One-Way ANOVA), which confirmed the relevance of all numerical variables in differentiating the groups. The ANOVA results indicated high F-test values and significant p-values (p < 0.05) for remuneration, time in the organization, retirement year, contribution time, and age. This demonstrates that the variability between clusters is significantly higher than the internal variability, confirming the statistical importance of each attribute in the composition of the groupings.
The detailed descriptive analysis of each cluster revealed distinct profiles. Cluster 0, composed of 61 servers, presented the highest average age (63 years), longest contribution time (38 years), and the closest retirement year (2026), configuring the most senior profile. However, its average remuneration (13,972) was relatively low. Cluster 3, with 140 servers, also stood out for seniority, with an average age of 61 years and a contribution time of 30 years, with retirement planned for 2029, and the highest average remuneration (27,408).
In contrast, Cluster 2, with 83 servers, presented an average age of 52 years and a contribution period of 21 years, with retirement expected in 2037, and an average remuneration of 13,620, similar to Cluster 0. Cluster 1 (160 servers) and Cluster 4 (43 servers) represented younger profiles, with retirement years expected in 2039 and 2049, respectively. Cluster 4, in particular, was the youngest, with the shortest contribution period and time in the organization, indicating a lower risk of imminent inactivity.
The visualization of the structure of the five groups was complemented by Principal Component Analysis (PCA), which transformed the quantitative variables into new orthogonal axes. The first two principal components (PCA1 and PCA2) jointly explained 77.57% of the total data variance. PCA1 was responsible for 57.41% of the variance and concentrated the variability of the temporal and age dimensions, with negative correlations for age and length of service and positive for the retirement year. PCA2, in turn, accounted for 20.16% of the variance, being defined almost exclusively by the financial dimension, with a factor loading of 0.99 for remuneration. This orthogonal distinction highlighted a clear segmentation of server profiles between a “temporal factor” and a “remuneration factor”.
Multiple Correspondence Analysis (MCA)
The second stage of the statistical analysis used Multiple Correspondence Analysis (MCA) to identify associations between the formed clusters and the qualitative variables of the sample. MCA is an effective non-inferential exploratory technique for dealing with a large number of categorical variables, reducing data dimensionality and facilitating the identification of underlying patterns (Fávero and Belfiore, 2024). The server groups (clusters) were incorporated as a new categorical variable, allowing for an integrated analysis with sex, marital status, position, opting for Funpresp, receiving a permanence bonus, and type of entry into the agency (Carneiro et al., 2023).
The perceptual map generated by the ACM showed that the first two dimensions retained 74.81% of the total inertia of the data, with Dimension 1 capturing 45.50% of the variance and Dimension 2, 29.31%. It was observed that some variable categories, such as marital status, sex, physical disability, and opting for Funpresp, showed low contribution to the total variance of the data, concentrating near the origin of the map. This suggests that these variables had less relevance in the formation of the clusters.
In contrast, the categories around Clusters 0 and 2 demonstrated high contribution to the variance. Cluster 0, considered the most expressive group for the study, showed a strong association with servers who receive a permanence bonus and hold already extinct positions, whose entry method was “redistribution”. This association is coherent, as servers who receive a permanence bonus have already met the requirements for retirement. Historically, many of these extinct positions were filled by redistributions upon the agency’s creation, which explains the high length of service of these servers.
The in-depth analysis revealed that 100% of the beneficiaries of retention bonus were concentrated in Clusters 0 (52%) and 3 (48%), reinforcing the pension criticality of these groups. Additionally, 81% of all servers holding extinct positions were mostly in Clusters 0 and 3, confirming a pattern of high length of service and provision method by redistribution (Brazil, 1988, art. 37 of Law No. 8.112/90). This concentration of senior profiles eligible for bonus and in extinct positions indicates a high risk of imminent vacancy.
Cluster 2, on the other hand, was associated with intermediate-level positions, such as Regulatory Technician, Administrative Technician, and Administrative Assistant, with lower remuneration compared to higher-level careers. The majority of Administrative Agents (82%) were concentrated in Cluster 0, while the majority of Administrative Technicians (82%) and Regulatory Technicians (65%) were in Cluster 2. This group is significantly distant from the imminent risk of inactivity, with the closest retirement date projected only for the year 2031, and has the lowest average salary in the sample.
Action Plan and Strategic Implications
Based on the results of the clustering and the perceptual map, which isolated the groups with the highest seniority and risk of vacancy, a phased Action Plan was proposed. The main focus is the review and regularization of contribution and endorsement salaries, prioritizing the impact and imminence of retirement. The initial priority was directed towards intervention in Cluster 0, which, with 61 servers, has the highest seniority and concentrates 52% of the servers who already receive a permanence bonus. This group also includes individuals who, although eligible, have not yet requested the benefit, suggesting less attention or knowledge about pension rules.
For Cluster 0, the action must be twofold: carry out the remuneration review and conduct active, individualized outreach to confirm requirements and inform them about the benefit of the Permanence Bonus. Prioritization for the year 2025 involved starting the review with the 39 servers in Cluster 0, followed by the 36 servers in Cluster 3. In parallel, the situation of the 18 servers who, although eligible, do not yet receive the bonus was identified. For the 2026 fiscal year, the schedule must advance, following the same order of priority, focusing on servers who will meet the retirement requirements during this period.
The progression to other clusters should only occur after the completion and regularization of the phases involving Clusters 0 and 3. This gradual approach to intervention ensures that the human resources management team’s effort is concentrated where the impact of the layoff is most immediate, optimizing resources and mitigating the risks of inconsistencies in the audited processes. To facilitate the search and analysis of servers responsible for contribution reviews, an interactive Business Intelligence dashboard has been developed, allowing for dynamic data visualization and management.
The effectiveness of the statistical model, however, was limited by the quality of the data from the Integrated System of Human Resources Administration (SIAPE). During the research execution, successive interventions with the central body were necessary to correct inconsistencies in the reports. The persistence of divergent data showed that the full effectiveness of advanced analytical models is intrinsically linked to more rigorous data governance by the Ministry of Management and Innovation in Public Services (MGI). Maintaining reliable databases is an indispensable prerequisite for predictive work in the public sector.
In summary, the application of unsupervised Machine Learning techniques allowed the segmentation of the autarchy’s workforce into pension risk profiles, identifying the groups with the highest criticality (Clusters 0 and 3) and those with the lowest risk (Cluster 2). This segmentation enabled the proposal of a phased action plan for the review of remunerations and registrations, prioritizing servers with imminent retirement and entitlement to a permanence bonus. The model proved to be a valuable tool for data cleansing and strategic people management, although its effectiveness depends on the continuous improvement of data governance in public service.
4. Conclusion
This study sought to apply unsupervised Machine Learning techniques, specifically Clustering (K-means) and Multiple Correspondence Analysis (MCA), to enhance the planning of functional reviews in a Brazilian federal autarchy. Through the application of the K-means algorithm, five distinct clusters of servers were identified, their suitability confirmed by the Elbow Method and Silhouette Coefficient. Subsequently, Multiple Correspondence Analysis integrated these groupings with qualitative variables, projecting them onto a perceptual map that explained 74.81% of the data’s inertia. The results showed that clusters 0 and 3 represented profiles of greatest pension criticality, concentrating all beneficiaries of permanence bonuses and the majority of abolished positions. In contrast, cluster 2 presented lower risk, with inactivity predicted only from 2031 onwards. The research culminated in the generation of a phased Action Plan, which prioritized the review of the 75 servers in these clusters who met the retirement requirements by 2025, with a similar guideline for the 2026 fiscal year. This model proved to be a valuable tool for data auditing and cleansing, optimizing strategic human resource management.
However, the full effectiveness of the developed statistical model was limited by the quality of the data from the Integrated System of Human Resources Administration (SIAPE). The need for successive interventions to correct inconsistencies in the original reports showed that the effectiveness of advanced analytical models is intrinsically linked to more rigorous data governance in public service. As a consequence, it is suggested to share the results with the technical teams and with the Ministry of Management and Innovation in Public Services (MGI), aiming to foster continuous improvement of data governance. It is also recommended to replicate this methodology in other bases of the Federal Public Administration to validate its scalability and assist in the strategic management of the workforce nationwide, provided that the informational integrity of the databases is assured.
Bibliographic References
Bernardino, D.C.A.M.; Souza, T.; Leitão, G.T.; Araújo, M.R.; Romero, A.C.; Fonseca, G. 2025. Fatores ocupacionais e socioeconômicos e mortalidade por câncer em participantes do Estudo Longitudinal de Saúde do Adulto (ELSA-Brasil): uma análise de correspondência múltipla. Revista Brasileira de Epidemiologia 28: e250022.
Brasil. 1988. Constituição da República Federativa do Brasil. Diário Oficial da União, Brasília, 5 out. 1988. Seção 1, p. 1.
Brasil. Supremo Tribunal Federal. 2020. Recurso extraordinário nº 636.553. Tema 445: prazo para o exercício do controle externo de legalidade dos atos de concessão inicial de aposentadoria, reforma e pensão. Diário Oficial da União, Brasília, 19 fev. 2020.
Carneiro, A.M.; Bin, A.; Ferrero, L.G.P.; Morini, C. 2023. A motivação dos estudantes de programas de pós-graduação: uma análise a partir das diferenças de perfis na área de administração. Disponível em: https://www.scielo.br/j/aval/a/7kpCXYNRD7CFhdpsWnb3jpz/. Acesso em: 17 nov. 2025.
Carrasco Bonal, V.; Vicente Galindo, P.; Queiruga Dios, A. 2025. Multiple correspondence analysis and hierarchical clustering of occupational exposure to COVID-19 among healthcare workers in Castilla y León, Spain. Mathematics 13(22): 3574. Disponível em: https://doi.org/10.3390/math13223574. Acesso em: 13 mar. 2026.
Costin, C. 2010. Administração Pública. Atlas, São Paulo, Brasil. Disponível em: https://app.minhabiblioteca.com.br/reader/books/9788595152281/. Acesso em: 06 jan. 2026.
Dutra, J.S.; Dutra, T.A.; Dutra, G.A. 2025. Gestão de Pessoas: Realidade atual e desafios futuros. Atlas, São Paulo, Brasil.
Faceli, K.; Lorena, A.C.; Gama, J.; Almeida, T.A.D.; Carvalho, A.C.P.L.F. 2025. Inteligência Artificial – Uma Abordagem de Aprendizado de Máquina. 3ed. LTC, Rio de Janeiro, Brasil. Disponível em: https://app.minhabiblioteca.com.br/reader/books/9788521639213/. Acesso em: 21 set. 2025.
Fávero, L.P.; Belfiore, P. 2024. Manual de Análise de Dados: Estatística e machine learning com Excel®, SPSS®, Stata®, R® e Python®. 2ed. LTC, Rio de Janeiro, Brasil.
Giambiagi, F. 2025. A previdência social no Brasil: tendências e desafios. Disponível em: https://web.bndes.gov.br/bib/jspui/handle/1408/27627. Acesso em: 07 jan. 2026.
Grande, S.R. 2025. Transformação digital no setor público: a legislação e os desafios em uma instituição de ensino superior. Dissertação de Mestrado em Ciência, Tecnologia e Sociedade. Universidade Federal de São Carlos, São Carlos, SP, Brasil.
Lara, L.R. 2023. Como as agências reguladoras selecionam seus burocratas? um estudo exploratório do sistema de incorporação na ANVISA, ANP e ANAC. Dissertação de Mestrado em Análise de Políticas Públicas. Escola de Artes, Ciências e Humanidades, Universidade de São Paulo, São Paulo, SP, Brasil.
Sicsú, A.L.; Samartini, A.; Barth, N.L. 2023. Técnicas de Machine Learning. Editora Blucher, São Paulo, Brasil. Disponível em: https://app.minhabiblioteca.com.br/reader/books/9786555063974/. Acesso em: 16 set. 2025.
Umargono, E.; Suseno, J.E.; Gunawan, V.S.K. 2019. K-means clustering optimization using the elbow method and early centroid determination based on mean and median formula. In: International Seminar on Science and Technology, 2019, Yogyakarta, Indonésia. Anais… p. 121-127.
VanderPlas, J. 2025. Guia do Python para Data Science: Ferramentas essenciais para trabalhar com dados. 2ed. Editora Alta Books, Rio de Janeiro, Brasil. Disponível em: https://app.minhabiblioteca.com.br/reader/books/9788550821795/. Acesso em: 26 nov. 2025.
Vezo, M.C.C. 2024. Identificação dos níveis de qualidade do sono usando o algoritmo k-means clustering: benefícios de um estilo de vida fisicamente ativo durante o envelhecimento. Dissertação de Mestrado em Exercício e Saúde. Instituto Politécnico de Bragança, Bragança, Portugal.
Article originating from the Final Course Project of the Specialization in Data Science and Analytics of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform