September 30, 2026
Machine Learning for assessing the gender impact on women’s inclusion in STEM
Machine Learning for Gender Impact Assessment on Women’s Inclusion in Stem
Claudia Sobral de Melo Giglio; Manoel Flavio Leal
DOI: 10.22167/2675-6528-202602799
Article derived from a Final Course 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 representation of women in Science and Technology degrees remains unequal, despite the equalization of genders in higher education for over a decade. This study implemented Machine Learning algorithms to assess the impact of the female gender on inclusion in technology careers, using data from Higher Education admissions via the National High School Exam (Enem). Enem grade data from 2018 to 2023 were selected, and training was performed with ensemble Decision Tree models, including Random Forest, LightGBM, XGBoost, and CatBoost. The CatBoost model demonstrated greater consistency in classifying participants with a profile geared towards STEM areas. The analysis of the impact of variables on the model revealed that identification with the female gender is a relevant factor for a lower probability of admission into these areas. It was also observed that family income and parents’ education level also influenced participants’ inclusion in Science and Technology careers. The results obtained can support the development of public inclusion policies for underrepresented groups.
Keywords: Supervised Learning; Data Classification; Gender Inequality.
1. Introduction
The achievement of parity in education levels between genders is a still very recent issue, having been a challenge overcome in the last decade, in 2014, when equity in the presence of women was achieved globally at all levels of education (UNESCO, 2017). However, it is evident that the female presence is concentrated in courses of a more social nature, such as Pedagogy, Nursing, and Nutrition, which until the 2000s had 80% to 90% women in their student body, while Engineering courses had only about 15% to 20% female students (Carvalho and Sobreira, 2008).
Inserted into this scenario, the historical participation of girls and women in the so-called hard sciences, also known as STEM (Science, Technology, Engineering and Mathematics) disciplines, has always been low. Studies point to several possibilities as factors influencing this disparity, such as gender stereotypes, sexism in the professional environment, and the lack of female role models in science-related workplaces (Aires et al., 2018). Even when entering the field, women’s retention is more difficult than that of their male peers, especially when interpreted through the lens of motherhood and domestic work (Kmec, 2013).
These factors point to a deeply ingrained gender culture in society, which in itself discourages female participation in fields considered “naturally” masculine. In a line of thought that resonates with post-structuralist feminism, gender is seen as a non-natural construction (Butler, 2003). Bourdieu (2002) discusses an androcentric construction of society that shapes the division of labor by gender. It is observed that, despite women’s greater access to higher education, the majority of them are concentrated in specializations considered more feminine, with discouragement towards pursuing more technological and scientific careers from basic education being common. This perception proves accurate when compared to the decreasing interest of girls in STEM disciplines as they get older, as their involvement in science is equivalent to that of boys until the end of childhood, a proportion that drops sharply by the end of adolescence (UNESCO, 2017).
The persistent under-representation of women in STEM areas, despite general parity in higher education, constitutes a practical and theoretical gap that demands in-depth investigation. Understanding the mechanisms by which gender influences inclusion in these careers is fundamental for the development of effective public policies. The application of Machine Learning techniques offers a promising path to analyze large volumes of data and identify complex patterns that would not be evident through traditional methods.
In this context, the present work is justified by the need to elucidate the impact of gender on the inclusion of women in higher education in science and technology. Using the Microdata from the National High School Exam (ENEM) made available by the National Institute for Educational Studies and Research Anísio Teixeira (INEP, 2026) for the period from 2018 to 2023, we seek to analyze how gender impacts the inclusion of women in higher education, considering this factor as one of the characteristics of the Machine Learning model. The study aims to evaluate how the female gender is an impact factor in inclusion in technology careers and to identify the socioeconomic factors that influence performance in entrance exams in exact sciences, establishing parameters of greater relevance for the development of initiatives that promote female participation in science.
2. Material and Methods
This study was characterized as a quantitative research, with a methodological approach based on Machine Learning. The central objective was to evaluate the impact of the female gender on inclusion in technology careers and to identify the socioeconomic factors that influence performance in entrance exams in exact sciences areas. To this end, a Machine Learning algorithm was implemented, applied to the higher education entrance data via the National High School Exam (Enem).
The project execution was structured in seven sequential steps: data collection, exploratory data analysis, data preprocessing, Machine Learning model training, data visualization, results analysis, and finally, text writing. This organization aimed to ensure the reproducibility and clarity of the methodological process, from data acquisition to the final interpretation of the findings.
The unit of analysis consisted of the Microdata from the National High School Exam (Enem), publicly available from the National Institute for Educational Studies and Research Anísio Teixeira (INEP, 2026). Data from the period 2018 to 2023 were selected. The choice of this temporal scope allowed for observation of the development of the analyzed scenario, including the atypical year of the Covid-19 pandemic in 2020. All data used were anonymized, in accordance with Law No. 13,709 (General Law on Personal Data Protection – LGPD), ensuring the ethical use of information.
The database was acquired in .zip format, containing .csv files with test items, socioeconomic data of the participants, and grade results, in addition to a data dictionary for interpretation support. Each unzipped folder ranged from 1.55 to 2.47 gigabytes, which demanded an efficient processing strategy. The project was structured in a root directory named “tcc-stem-gender/”, with an isolated virtual environment for Python libraries and specific directories for raw, processed data, images, notebooks, and texts.
The exploratory data analysis began with descriptive statistics of the data from the extreme years (2018 and 2023), using the Pandas library for dataframe manipulation and Matplotlib for visualization. Methods such as `.info`, `.columns`, `.describe()`, `.shape()`, and `.head()` were applied to understand the quartile distribution, size, and structure of the datasets. Boxplot and violin plots were generated to observe the density distribution of scores in Natural Sciences and Mathematics, excluding zeros and nulls.
In preprocessing, to handle datasets with millions of records, a pipeline was created that processed the data in Apache Parquet format, recognized for its efficiency in cloud storage for big data. The processing was performed in “chunks” (smaller segments) to avoid computational overload. Additionally, a downcast of numerical formats from `int64` to `int8` was performed, optimizing memory usage.
With the support of the INEP data dictionary (2026), columns of interest were selected for the Machine Learning model or for filtering criteria. The columns included “IN_TREINEIRO”, “NU_NOTA_CN”, “NU_NOTA_MT”, “Q001”, “Q002”, “Q006”, “Q025”, “SG_UF_PROVA”, “TP_COR_RACA”, “TP_FAIXA_ETARIA”, “TP_SEXO”, and “TP_ST_CONCLUSAO”. Columns such as “Q027” and “TP_LOCALIZACAO_ESC” were excluded due to the high rate of missing records, and “SG_UF_ESCOLA” was replaced by “SG_UF_PROVA” as a proxy.
The filtering stage removed participant profiles irrelevant to the research. Excluded were “trial” students, candidates absent from the Natural Sciences or Mathematics exams, participants with zero scores in one or both exams, and students who had not completed or were not in the 3rd year of High School. After structuring the pipeline, nulls in most columns were handled by imputing the value -1 and subsequently removing fields with this value.
The mapping of variables was performed according to their type. The “TP_SEXO” column was mapped binarily to “IN_FEMININO” (F=1, M=0). The “Q025” column (internet access) was similarly mapped to “TEM_INTERNET” (A=1, B=0). Ordinal variables such as “ESC_MAE” and “ESC_PAI” (parents’ schooling, from A to H) were mapped to numerical values from 0 to 7. The “Q006” column (average monthly family income, from A to Q) was mapped to 0 to 16. The “TP_FAIXA_ETARIA” column was kept in its original ordinal format.
For nominal categorical variables, One-Hot Encoding was used. The “SG_UF_PROVA” column (state where the test was applied) was mapped to its respective geographical regions and then transformed into binary variables. Similarly, the “TP_RACA_COR” column was mapped from numerical to textual labels and subsequently converted into binary variables. The “TP_ST_CONCLUSAO” column (high school completion status) was also mapped to textual labels and then transformed into binary variables.
The training of Machine Learning models aimed to evaluate the influence of gender in defining a profile geared towards STEM. Ensemble models based on Decision Trees were employed: Random Forest, LightGBM, XGBoost, and CatBoost. Random Forest served as the baseline model, using the bagging method. LightGBM, XGBoost, and CatBoost, in turn, are Gradient Boosting models, which progressively adapt to create stronger predictors (Géron, 2019).
To facilitate model interpretability, the SHAP (SHapley Additive exPlanations) framework was applied (Lundberg and Lee, 2017). The Python language, with libraries such as scikit-learn and SHAP, was used for all development. Four “targets” were defined as proxies for the STEM profile, based on scores above the median in Mathematics and/or Natural Sciences. The models were trained with an 80% train and 20% test data split, with stratification to maintain class proportion. The performance metrics evaluated were ROC-AUC and F1-Score. Hyperparameter optimization was performed with the Optuna library, using a lean testing of 15 attempts with 10% of the population sample.
3. Results and Discussion
The implementation of Machine Learning algorithms in this study revealed significant patterns regarding the impact of gender and socioeconomic factors on inclusion in Science and Technology careers. Initial findings indicated a persistent inequality in female representation in these areas, despite overall parity in higher education. In-depth analysis of the National High School Exam (Enem) data from 2018 to 2023 allowed not only for the quantification of this disparity but also for the identification of the most influential variables and the direction of their impact, providing a robust basis for understanding the phenomenon and supporting future inclusion policies.
The exploratory analysis of ENEM microdata, which covered millions of records, revealed a notable difference in average scores between genders in the Natural Sciences and Mathematics tests. Female participants consistently obtained lower scores than their male counterparts in all evaluated years. This disparity was more pronounced in Mathematics, where the median score for females was 43.2 points lower than for males in 2018, and this difference widened to 58.1 points in 2023. In Natural Sciences, the difference was 12.5 points in 2018 and 28.5 points in 2023, indicating an increase in the gap over time.
When investigating the proportion of participants in the top 10% group with the highest grades, it was observed that the Natural Sciences discipline presented a more pronounced gender balance, with women even surpassing men in this group in 2018. However, in Mathematics, male predominance remained evident, although with a slight tendency towards greater parity in 2023 compared to 2018. The distribution of grade density, visualized through graphs, suggested that while female performance in 2023 showed greater regularity, male performance demonstrated more significant evolution over the analyzed period, especially in Mathematics.
To handle the extent of the datasets and ensure computational efficiency, the data preprocessing step was crucial. A pipeline was developed that utilized the Apache Parquet format and “chunk” processing, optimizing memory usage and performance. The columns of interest were carefully selected from the Inep data dictionary, prioritizing socioeconomic and test performance information. Variables such as school type and location were excluded due to the high rate of missing data, opting to use the federative unit of test application as a proxy for the region, given the absence of nulls in this variable.
The filtering stage was essential to refine the dataset, removing participant profiles that did not align with the research objectives. “Trainers”, candidates absent from the Natural Sciences or Mathematics exams, and those who scored zero in one or both exams were excluded. Additionally, students who had not completed or were not in their third year of High School were removed, ensuring that the analyzed audience was effectively eligible for higher education. The variables were transformed by binary mapping for gender and internet access, and by ordinal mapping for parental education and family income, preserving the intrinsic hierarchy of this data. One-Hot Encoding was applied to categorical variables such as race/color, region, and High School completion status, so that all models could process them consistently.
In the training phase, ensemble Machine Learning models were employed, including Random Forest, LightGBM, XGBoost, and CatBoost, all based on Decision Trees. To classify a participant as having a STEM profile, four “targets” or proxies were defined, based on scores above the Enem median in Mathematics and Natural Sciences. The T3 target, which required scores above the median in both disciplines, proved to be the most rigorous, encompassing only 35.5% of the studied population. This approach allowed for the evaluation of the impact of features at different levels of stringency and the identification of gender sensitivity in each discipline.
The performance evaluation of the models, using the ROC-AUC and F1-Score metrics, indicated that the CatBoost model, trained with target T3, presented the most consistent performance, achieving a ROC-AUC value of 0.7707 after hyperparameter tuning. Random Forest demonstrated the worst performance among the models, while XGBoost exhibited abrupt variations, making it less reliable. CatBoost and LightGBM presented quite comparable performances, but CatBoost was selected due to its slight superiority and its ability to evaluate feature importance, a crucial aspect for the interpretability of the results (Fávero and Belfiore, 2025). The hyperparameter optimization process was conducted with the Optuna library.
The analysis of the importance of variables, performed with the SHAP library, revealed that “family income” is the most prevalent factor in defining a STEM profile, consistently remaining in the top positions over the six years analyzed. “Gender” (female identification) and “mother’s education level”, followed by “father’s education level”, also stood out as factors of constant importance. Variables such as “white race” and “age group” showed some variation in position, but frequently appeared among the most relevant factors. These findings underscore the complexity of the multiple socioeconomic and demographic factors that influence entry into technology careers.
The temporal evolution of the importance of features demonstrated that, in 2020, the year the Covid-19 pandemic began, there was an increase in the relevance of “family income” and “gender” for the classification of the STEM profile. This peak in importance may be related to the postponement of the 2020 Enem, which boosted participation, followed by a progressive drop in the number of applicants in subsequent years. After 2020, the importance of “gender” gradually returned to levels similar to those observed in 2018 and 2019, while the stability of parental education remained, indicating that these factors have a more lasting and less volatile impact.
The directional analysis of the impact of gender, also performed with SHAP, confirmed that identification with the female gender decreases the probability of a participant being classified as a STEM profile. In contrast, identification with the male gender increases this probability. This difference in impact was more pronounced in the year 2020, coinciding with the beginning of the Covid-19 pandemic, suggesting that external events can exacerbate existing inequalities. This result reinforces the perception that gender stereotypes and cultural barriers still influence the choice and performance in science and technology fields (Aires et al., 2018; Bourdieu, 2002).
It is fundamental to emphasize that the applied Machine Learning models establish correlations, but not necessarily causalities. Although the algorithm statistically validated an empirically observed scenario, it does not encompass all aspects that influence student enrollment in STEM. The hyperparameter tuning process was carried out leanly, adapted to the available computational resources, suggesting that a more powerful computational environment could enhance the model’s accuracy. Future investigations could expand the scope to other years and include data from underrepresented populations not contemplated, such as the transgender population or indigenous peoples, for a more comprehensive understanding of inequalities.
In summary, the research demonstrated that the female gender is a relevant factor that negatively impacts inclusion in technology careers, with family income and parents’ schooling also exerting significant influence. The CatBoost model, with target T3, proved to be the most consistent for identifying STEM profiles, and the SHAP analysis revealed the dynamics of the importance of these variables over time, with a peak impact of gender in 2020. These findings provide a robust basis for the development of public policies aimed at promoting female participation and reducing inequalities in Science and Technology areas, aligning with the study’s central objective.
4. Conclusion
The study sought to evaluate the impact of the female gender on inclusion in technology careers and identify socioeconomic factors that influence performance in entrance exams in exact sciences areas. For this purpose, Machine Learning algorithms were implemented, using data from the National High School Exam (Enem) from 2018 to 2023. It was found that identification with the female gender is a relevant factor for a lower probability of entry into these areas. It was also observed that family income and parents’ schooling significantly influenced the inclusion of participants in Science and Technology careers. The CatBoost model, trained with the T3 target, demonstrated the most consistent performance in classifying STEM profiles, and the analysis of variable importance revealed that the impact of gender and family income intensified in 2020, the period when the Covid-19 pandemic began. These findings provide a robust basis for the development of public policies aimed at promoting female participation and reducing inequalities in Science and Technology areas.
It is fundamental to emphasize that the applied Machine Learning models establish correlations, and not necessarily causalities, not encompassing all aspects that influence student entry into STEM. The hyperparameter tuning process was carried out in a lean manner, adapted to available computational resources, suggesting that a higher computational power environment could improve model accuracy. For future studies, it is suggested to expand the scope to other years, analyzing a more comprehensive historical period, and include data from underrepresented populations not yet contemplated, such as the transgender population or indigenous peoples, for a more comprehensive understanding of inequalities. Additionally, future investigations could focus on data that more specifically explore the reasons why gender impacts inclusion in STEM fields, such as information on the development of female high school students.
Bibliographic References
Aires, J.; Mattos, G.; Oliveira, C.; Brito, A.; Aragão, A.; Alvez, S.; Coelho, T.; Moreira, G.. 2018. Barreiras que Impedem a Opção das Meninas pelas Ciências Exatas e Computação: Percepção de Alunas do Ensino Médio. In: WOMEN IN INFORMATION TECHNOLOGY (WIT), 12., 2018, Natal. Anais […]. Porto Alegre: Sociedade Brasileira de Computação, 2018 . p. 34-38. ISSN 2763-8626. DOI: https://doi.org/10.5753/wit.2018.3378.
Bourdieu, Pierre. 2002. A dominação masculina. 2ed. Bertrand Brasil, Rio de Janeiro, RJ, Brasil.
Butler, J. 2003. Problemas de gênero: feminismo e subversão da identidade. 1ed. Civilização Brasileira. Rio de Janeiro, RJ, Brasil.
Carvalho, M. G.; Sobreira, J. L.. 2008. Género en los cursos de ingeniería de una universidad tecnológica brasileña. Arbor, v. CLXXXIV n.733, p 889-904, sep./oct, 2008.
Fávero, L. P.; Belfiore, P. 2025. Manual de análise de dados: estatística e machine learning com Excel®, SPSS®, Stata®,R® e Python®. 2ed. LTC, Rio de Janeiro, RJ, Brasil.
Géron, A. 2019. Mãos à Obra Aprendizado Máquina com Scikit-Learn e TensorFlow. 1ed. Alta Books, Rio de Janeiro, RJ, Brasil.
Instituto Nacional de Estudo e Pesquisas Educacionais Anísio Teixeira [INEP]. 2025. Microdados do Enem. Disponível em: <https://www.gov.br/inep/pt-br/acesso-a-informacao/dados-abertos/microdados/enem>. Acesso em: 07 abr. 2026.
Kmec, J. 2013. Why Academic STEM Mothers Feel They Have to Work Harder than Others on the Job. International Journal of Gender, Science and Technology, [S. Ι.], v. 5, n. 2, p. 79–101, 2013. Disponível em: https://genderandset.open.ac.uk/index.php/genderandset/article/view/277.. Acesso em: 9 feb. 2026.
Lundberg, S. M.; Lee, S. 2017. A unified approach to interpreting model predictions. Advances in neural information processing systems 30(1): 4766-4776.
Organização das Nações Unidas [UNESCO]. 2017. Cracking the code: girls’ and women’s education in science, technology, engineering and mathematics (STEM). Disponível em: <https://unesdoc.unesco.org/ark:/48223/pf0000253479>. Acesso em: 09 fev. 2026.
Article originating from the Final Course Work 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