September 30, 2026
Predictive modeling applied to fiscal self-regulation for revenue optimization
Predictive Modeling Applied to Fiscal Self-Regulation for Revenue Optimization
Cleiber Cruzeiro Queiroz; Aimée Shirozono
DOI: 10.22167/2675-6528-202602792
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
A predictive model was developed to support the identification of taxpayers with a higher probability of adhering to ICMS tax self-regularization programs in the state of Goiás. Based on data from electronic tax documents, the Payment Means Information Declaration [DIMP], and corporate tax mesh databases, homogeneous taxpayer clusters were built, respecting legal restrictions associated with tax secrecy and the General Data Protection Law [LGPD]. Predictive modeling was performed using the Light Gradient Boosting Machine [LightGBM] algorithm, with hyperparameter tuning via Grid Search and k-fold cross-validation. The results indicated the model’s discriminatory performance compared to traditional approaches, with an Area Under the Curve (AUC) of 0.63 and a high capacity to identify taxpayers with greater regularization potential. Variable importance analyses and model interpretation, through Feature Importance and SHAP, showed that variables associated with the economic volume of operations and the history of tax inconsistencies exerted the greatest influence on the probability of adherence. The results suggest that the application of machine learning techniques can contribute to more efficient taxpayer selection in tax self-regularization programs, increasing the potential for tax credit recovery and strengthening data-driven compliance strategies.
Keywords: tax administration; tax self-regulation; tax compliance; LightGBM; machine learning.
1. Introduction
Global tax administration is undergoing a profound restructuring, characterized by the transition from operational models historically focused on manual and repressive verification of large volumes of data to integrated, predictive, and cooperative compliance-oriented ecosystems (Eberhartinger and Zieser, 2021). This transformation reflects a relevant shift in how the relationship between the State and the taxpayer is established, as the strictly repressive logic gives way to an approach based on trust, transparency, and conflict prevention (Nunes and Garbaccio, 2023).
In this new paradigm, the expansion of tax compliance is sought through institutional cooperation, in which the taxpayer commits to sharing relevant fiscal information, while the tax administration offers greater legal certainty, predictability in decisions, and permanent channels of dialogue. Tax self-regulation emerges as a practical development of the principles of cooperative compliance, by encouraging the taxpayer to spontaneously correct any inconsistencies, strengthening mutual trust and reducing the need for repressive actions (Nunes and Garbaccio, 2023; Martinez, 2022). In this scenario, the use of digital technologies, artificial intelligence, and machine learning techniques has been employed as a tool for risk management and focusing fiscal action, allowing for greater efficiency in taxpayer selection and the conduct of preventive actions (Yang, 2025).
In the national tax system, the Digital Bookkeeping Public System (SPED, 2007) organizes and enables the massive and continuous delivery of accessory obligations in digital format. Through this environment, taxpayers recurrently transmit large volumes of data, including electronic fiscal documents, the Digital Fiscal Bookkeeping (EFD), and the Digital Accounting Bookkeeping (ECD). This informational set is used by the tax administration to identify inconsistencies, perform analyses, and support decision-making. In the legislation of the State of Goiás, Article 142-A of Law nº 11.651/91 (Goiás, 1991), which integrates the State Tax Code, establishes the rules for fiscal self-regulation, allowing taxpayers with tax infringements to spontaneously regularize their situation.
However, the political and economic viability of fiscal self-regulation depends on the ability to adequately identify taxpayers with the greatest potential for compliance. Notifications targeted at profiles with low propensity for regularization tend to generate unnecessary costs and weaken the institutional trust relationship. On the other hand, the absence of communication with taxpayers who present a high potential for credit recovery results in lost revenue opportunities. Experimental studies, such as Kleber et al. (2025), demonstrate that behavioral messages adapted to the target audience can significantly increase the probability of fulfilling tax obligations, while generic or poorly targeted communications have little effect or may even reduce positive responses (Jamison et al., 2021).
In view of this scenario, the application of Artificial Intelligence techniques, especially Machine Learning, presents itself as a technical alternative capable of identifying patterns, correlations, and anomalies in large volumes of data, generating relevant information to support strategic decision-making (Xu et al., 2024). Unlike expert systems based on predefined rules, which have limited capacity to deal with the complexity and dynamism of contemporary behaviors, machine learning models, especially those based on Gradient Boosting techniques, such as LightGBM, have demonstrated superior performance to traditional statistical approaches, such as logistic regression, in the task of classifying and ranking contributors to tax compliance programs (Yang, 2025). This analytical flexibility allows for the identification of more complex patterns of fiscal behavior, which are often not captured by inspection systems based solely on rules (Chen and Guestrin, 2016; Xu and Kong, 2020).
In this context, the motivation for this study lies in the possibility of integrating Data Science into tax management to optimize the selection of taxpayers in fiscal self-regulation programs. By directing administrative actions more efficiently, the aim is to contribute to the strengthening of tax compliance, the promotion of fiscal justice, and the sustainability of public finances. Given the above, the main objective of this study is to develop a predictive model capable of supporting the identification of taxpayers with the greatest potential for self-regulation in the state of Goiás.
2. Material and Methods
The present study was characterized as a research of an applied nature, with a quantitative methodological approach, aiming at the development of a predictive model. The central objective was to support the identification of taxpayers with the greatest potential for self-regularization in the state of Goiás, using machine learning techniques. The research was conducted within the scope of the Secretariat of State for the Economy of the State of Goiás, respecting the legal restrictions associated with fiscal secrecy and the General Data Protection Law (LGPD).
For the research, data from 8,343,075 tax invoices identified by self-regulation tax meshes were used, from which 4,113 taxpayers were selected. Data sources included electronic tax documents, information from the Payment Means Information Declaration (DIMP), and corporate tax mesh bases. All data were obtained from corporate bases and stored on the database servers of the Secretariat of State for the Economy of the State of Goiás.
The unit of analysis adopted for predictive modeling was homogeneous groups of taxpayers, not individual taxpayers, aiming to reduce random variability and comply with legal restrictions. This aggregation resulted in 3,173 observations, built from structuring variables such as economic activity, geolocation, legal nature, sales volume, and risk history. To qualify the aggregated data, the selection criterion was the regularization of at least 30% of the invoices per taxpayer and an adhesion rate greater than 50% in the grouping.
The extraction of data related to invoices and DIMP was performed using the SAS Enterprise Guide v.9.2 tool, with information stored in a MySQL database. The SQL language was used for data querying, cleaning, consolidation, and grouping. Subsequent treatment and analysis were conducted in a Python environment, utilizing the Pandas and NumPy libraries for manipulation and transformation, and Scikit-learn for base partitioning and cross-validation.
Variable engineering structured and qualified fiscal, financial, and registration data. Information was consolidated by taxpayer, covering quantities and values of invoices under self-regulation, ICMS due, and amounts paid and in installments. The values of incoming and outgoing invoices for 2024, and the DIMP values for 2024 were totaled. This data was integrated with registration information, such as CNAE, territorial delegation code, legal nature, and planned audit hours.
From the consolidated base, derived variables were constructed to represent dimensions of the taxpayer profile, including registration time ranges, ICMS debt value ranges, economic size ranges, and digital exposure ranges. Two additional derived variables were the Logarithmic Ratio of Outflows to Inflows and the Debt to Contribution Ratio, both transformed to stabilize variability. The target variable, named TARGET, was created to classify the groupings regarding adherence or non-adherence to the self-regularization process, using a 50% adherence criterion.
Predictive modeling was performed using a supervised approach. Logistic Regression, Random Forest, XGBoost, and Light Gradient Boosting Machine (LightGBM) were compared, with the latter being selected as the final algorithm due to its computational efficiency and ability to model complex relationships and nonlinear interactions among variables, characteristics suitable for the tax context (Friedman, 2001). The database was divided into training (70%) and testing (30%) sets, in a stratified manner and with a fixed random seed.
Model performance was optimized and the risk of overfitting was reduced by adjusting hyperparameters via Grid Search. Model performance evaluation was conducted based on the metrics of Accuracy, Precision, Recall, F1-Score, and Area Under the Curve (AUC). Robustness was evaluated by five-fold cross-validation. Model interpretation was performed through analyses of variable importance (Feature Importance) and SHAP values, which indicate the contribution of each variable to the predicted probability of adherence.
3. Results and Discussion
The research results revealed significant insights into the factors influencing taxpayers’ adherence to fiscal self-regularization programs in the state of Goiás, as well as the effectiveness of a predictive model based on machine learning to identify profiles with higher compliance potential. The initial analysis of quantitative and categorical variables provided a detailed understanding of data distribution and heterogeneity, while the predictive modeling and its interpretations validated the LightGBM algorithm’s ability to capture complex patterns of fiscal behavior. These findings are crucial for improving tax administration strategies, directing actions more efficiently and based on evidence.
Analysis of Quantitative Variables
The descriptive statistics of the quantitative variables, synthesized in Tables 1, 2, and 3, indicated an asymmetric distribution for most of the financial and operational variables, a common pattern in tax bases where a few clusters concentrate high volumes of operations and tax amounts. For example, the quantity of tax invoices in self-regulation (QTD_NOTAS_AUTOREG) presented an average of 2,629.40, but a median of only 52.00 and a first quartile of 8.00, evidencing that the majority of clusters have a reduced volume of documents, while a minority concentrates a large volume. The high standard deviation of 16,248.99 reinforces the presence of extreme values in the distribution, which justifies the choice of algorithms robust to these characteristics.
Monetary variables, such as the average value of self-assessed invoices (VLR_NOTA_AUTOREG), the due ICMS (VLR_ICMS_AUTOREG), input (VLR_ENTRADAS) and output (VLR_SAIDAS) operations, and the values calculated by DIMP (VLR_DIMP), exhibited a similar pattern of high dispersion. The means of these variables were significantly higher than the medians, accompanied by high standard deviations, indicating pronounced economic heterogeneity among taxpayers. For instance, the average value of outputs (VLR_SAIDAS) recorded a mean of 48,286,125.95, but a median of 5,285,496.94, with a standard deviation of 323,752,292.96. This data characteristic reinforces the suitability of the LightGBM algorithm, which is particularly effective in handling asymmetric distributions and nonlinear relationships between variables, as highlighted by Chen and Guestrin (2016).
The ratio between debt and economic size (DEBT_SIZE_RATIO) was concentrated close to zero for most clusters, with a mean of 0.68 and a median of 0.00. However, the third quartile of 249.65 and a standard deviation of 10.91 indicated that, for a portion of the groups, debt assumes a significant weight in relation to the volume of operations, which may influence adherence to self-regulation. The adherence rate (ADHERENCE_RATE) presented a mean of 0.45, with a median and first quartile of 0.00, reflecting a concentration of results at the extremes of the distribution. This means that most clusters showed low or no adherence to self-regulation, while a smaller portion concentrated high levels of regularization, which corroborates the adequacy of the 50% adherence criterion adopted for the definition of the target variable, as illustrated in the distribution of the groups’ adherence rate and classification criterion.
.
Analysis of Categorical Variables
The analysis of categorical variables revealed distinct patterns of adherence to self-regulation. The FAIXA_FATURAMENTO variable, which segments taxpayers into quartiles based on the total value of outgoing invoices, demonstrated a direct relationship with the adherence rate. Taxpayers in the lower revenue quartiles showed lower average adherence rates, while the upper quartiles exhibited progressively higher percentages of regularization. For example, the 0-25% revenue bracket registered an adherence rate of 34.8%, while the >75% bracket achieved 58.9% adherence, as observed in the distribution of taxpayers and adherence rate by revenue bracket.
. This pattern indicates that economic size exerts a relevant influence on adherence behavior, reinforcing its importance as an explanatory variable in the predictive model.
The NATUREZA_JURIDICA variable, despite presenting a strong imbalance with the ‘Sociedade Empresária Limitada’ category concentrating approximately 87% of observations, demonstrated predictive relevance. Anonymous Societies (S.A.) presented the highest adherence rates, with 62.1%, indicating a profile of greater compliance. In contrast, the ‘Individual’ and ‘Other’ groups exhibited lower rates, with 41.6% and 32.0% respectively, suggesting a greater propensity for non-regularization. These results, presented in the distribution of contributors and adherence rate by legal nature
, corroborated the decision to group the original categories into macro-groups to preserve the discriminatory power of the variable and avoid overfitting, according to the categorical binning strategy (p. 9).
The ICMS_DEBT_BAND, which categorizes the total amount of ICMS due, also revealed an association with the propensity for regularization. It was observed that the majority of taxpayers are concentrated in the lower debt value bands. However, the higher value bands showed the highest adhesion rates, reaching 55.1% for debts above R$ 100,000.00, compared to 44.6% for debts up to R$ 10,000.00. This finding, detailed in the distribution of taxpayers and adhesion rate by debt value band
, suggests that larger debts may motivate a greater propensity for regularization, possibly due to a higher associated risk or a greater fiscal management capacity on the part of these taxpayers.
The FAIXA_EXPOSICAO_DIMP variable, which measures the degree of traceability of operations through the ratio between the DIMP value and the average total value of outputs, also proved to be relevant. The groups with no exposure registered the lowest average adherence rate, at 28.3%. Intermediate ranges, such as 0-30% and 30-70%, showed higher percentages, with 59.4% and 50.0% adherence, respectively. Although most taxpayers are concentrated in the highest exposure range (>70%), with 48.0% adherence, the results, according to the distribution of taxpayers and adherence rate by exposure range
, indicate that the degree of exposure of operations through payment methods is associated with the regularization behavior, suggesting that the transparency of financial operations can influence tax compliance.
Correlation Matrix
The analysis of the correlation matrix between the quantitative variables, presented in the correlation matrix of the variables
, indicated that most variables have low or moderate correlations among themselves and with the target variable. This pattern suggests a relative independence between attributes, which is favorable for predictive modeling, as it reduces the risk of multicollinearity. The highest correlations were observed between VLR_SAIDAS and VLR_ENTRADAS (0.65), an expected result, since companies with a higher volume of outgoing operations tend to present corresponding incoming volumes. Similarly, a relevant correlation was found between VLR_NOTA_AUTOREG and VLR_ICMS_AUTOREG (0.64), reflecting the direct relationship between the value of self-regularized operations and the amount of tax due.
The other variables, including financial ratios and derived indicators, showed weak correlations both among themselves and with respect to the target variable. This behavior suggests that adherence to self-regulation is not explained by simple linear relationships but results from the interaction of multiple economic, operational, and structural factors. The low multicollinearity and the complexity of the relationships between variables reinforce the choice of machine learning algorithms, such as LightGBM, which are capable of capturing nonlinear relationships and complex interactions, overcoming the limitations of traditional statistical models based on linearity assumptions.
Comparison between classification models
The comparison stage between different supervised predictive modeling techniques demonstrated the superior performance of tree-based models compared to logistic regression. As illustrated in the ROC curve comparison of the classification models
, the LightGBM algorithm presented the highest Area Under the Curve (AUC) of 0.631. It was followed by Random Forest, with an AUC of 0.623, and by XGBoost, with an AUC of 0.611. Logistic Regression, used as a baseline model, achieved an AUC of 0.594. This performance hierarchy indicates that ensemble learning models, especially those based on gradient boosting, possess a greater discriminatory capacity to identify clusters with a higher probability of adherence to self-regulation, confirming the literature that points to the superiority of these techniques in complex data contexts (Yang, 2025).
Hyperparameter Optimization (Grid Search)
The hyperparameter optimization of the LightGBM model, performed using the Grid Search technique, was fundamental to maximizing predictive performance and reducing the risk of overfitting. The best combination of parameters identified was: class_weight = {0:1, 1:3}, learning_rate = 0.01, max_depth = 5, min_child_samples = 30, n_estimators = 500, and num_leaves = 31. These parameters indicate the use of moderately deep trees and a reduced learning rate, strategies that contribute to controlled model growth and a reduced tendency to capture sample-specific noise. The adjustment of class weights favored model stability and better identification of self-regulation adherence cases, which is particularly relevant in class imbalance scenarios.
LightGBM Model Performance Evaluation
The performance evaluation of the LightGBM model on the test dataset, using metrics such as Accuracy, Precision, Recall, F1-Score, and AUC, revealed adequate performance for the study’s objective. The results obtained were: Accuracy of 0.536, Precision of 0.503, Recall of 0.899, F1-Score of 0.645, and AUC of 0.626. The high Recall value (0.899) is particularly noteworthy, as it indicates a high capacity of the model to correctly identify clusters with a higher probability of adhering to self-regulation. This characteristic is of great importance for tax administration, as it minimizes the risk of failing to select taxpayers with the potential for tax credit recovery, thus avoiding revenue losses.
Although the Precision and Accuracy metrics presented moderate values, the F1-Score of 0.645 indicates a satisfactory balance between the identification of positive cases and the control of classification errors. Furthermore, the AUC of 0.626 demonstrates a discriminatory capacity superior to that of a random classifier, showing that the model is capable of capturing relevant patterns associated with adherence behavior. Together, these results suggest that the LightGBM model has adequate performance to support prioritization and segmentation processes of contributors in fiscal self-regulation programs, contributing to the efficiency of administrative actions and the strengthening of tax compliance.
Cross-Validation (Cross-Validation)
The model’s robustness was confirmed by five-fold cross-validation, as illustrated in the cross-validation (Cross-Validation ROC)
. The results indicated AUC values ranging from 0.60 to 0.66, with a mean of 0.63 and a standard deviation of 0.02. The low variability observed between the folds demonstrates the stability of the model’s performance across different sample partitions, reducing the dependence of the results on a single data split. Furthermore, all ROC curves were positioned above the random classifier’s reference line, evidencing a consistent discriminatory capacity in identifying clusters with a higher probability of adherence to self-regulation. These results provide evidence of the model’s stability and generalization, which is crucial for its application in a real operational environment.
Importance of Variables (Feature Importance – Gain)
The analysis of the importance of variables in the LightGBM model, calculated based on the gain criterion, revealed that variables related to the financial volume of operations showed the greatest influence on the model’s predictive capacity. The total value of outflows (VLR_SAIDAS), with a gain of 11054.7, and the total value of inflows (VLR_ENTRADAS), with 9911.8, were among the most important variables for classification. The ratio between outflows and inflows (RAZAO_SAIDA_ENTRADA), with 8524.6, and the quantity of invoices in self-regularization (QTD_NOTAS_AUTOREG), with 7793.8, also stood out. These results are presented in the variable importance (Feature Importance – Gain)
, indicate that the economic size and the operational activity level of the taxpayers contribute significantly to the predictions made by the model.
Other variables that proved important include the National Classification of Economic Activities (CNAE), with a gain of 5945.9, the values moved by payment methods (VLR_DIMP), with 5302.1, and the ICMS value associated with self-regularization notes (VLR_ICMS_AUTOREG), with 4610.5. In contrast, institutional and administrative variables, such as planned audit hours (HORAS_AUDITORIA), legal nature (NATUREZA_JURIDICA), and revenue range (FAIXA_FATURAMENTO), presented a smaller relative contribution to the model. Overall, these findings suggest that factors associated with the economic scale of operations and the taxpayer’s financial exposure are more determinant for identifying patterns of adherence to self-regularization than more generic administrative or registration characteristics.
Model Interpretation (SHAP)
The model interpretation through the SHAP Summary Plot, presented in the SHAP Summary Plot
, confirmed the contribution of the variables to the predicted probability of adherence to self-regulation. It was observed that the variables associated with the financial volume of operations, such as VLR_SAIDAS, VLR_ENTRADAS, and RAZAO_SAIDA_ENTRADA, exerted the greatest influence on the model’s behavior. Higher values of these variables tended to shift the points to the right on the graph, indicating a higher probability of regularization. This result reinforces that higher levels of economic activity are associated with higher predicted probabilities of adherence to self-regulation, in line with the findings of the Feature Importance analysis.
Variables related to the history and dimension of fiscal inconsistencies, such as QTD_NOTAS_AUTOREG, VLR_ICMS_AUTOREG, and VLR_DIMP, also stood out, contributing to explaining the regularization behavior. In contrast, registration or administrative variables, such as legal nature, revenue brackets, and debt brackets, had a relatively smaller impact on the model. In general terms, the SHAP analysis reinforces the consistency of the results obtained in the variable importance analysis, indicating that the model primarily uses financial and operational information from taxpayers to make predictions. Factors related to the volume of operations and fiscal exposure are, therefore, determinants for adherence to self-regularization, which validates the model’s ability to identify taxpayers with greater compliance potential.
In summary, the study demonstrated that the predictive model based on LightGBM possesses a robust discriminatory capacity to identify taxpayers with a higher probability of adhering to fiscal self-regularization programs. Variable importance and model interpretation analyses, through Feature Importance and SHAP, consistently indicated that the economic volume of operations, tax exposure, and history of inconsistencies are the main factors influencing the propensity for regularization. These findings confirm that the application of machine learning techniques can optimize taxpayer selection, directing tax administration actions more efficiently and data-driven, contributing directly to the objective of developing a predictive model to support the identification of taxpayers with higher self-regularization potential in the state of Goiás.
4. Conclusion
This study sought to develop a predictive model capable of supporting the identification of taxpayers with the greatest potential for fiscal self-regularization in the state of Goiás. It was found that the Light Gradient Boosting Machine (LightGBM) algorithm demonstrated robust discriminatory capacity, with an Area Under the Curve (AUC) of 0.63 and a high Recall of 0.899, indicating its effectiveness in correctly identifying clusters with a higher probability of adherence. Feature Importance and SHAP analyses consistently highlighted that variables associated with the economic volume of operations, such as entry and exit values, and with the history of fiscal inconsistencies, such as ICMS due and the number of self-regularization notes, exerted the greatest influence on the propensity for regularization. These findings suggest that taxpayers with greater economic activity and higher fiscal exposure tend to exhibit a higher propensity for regularization when notified. The application of this predictive model contributes to making the selection of taxpayers in self-regularization programs more efficient, optimizing tax credit recovery and strengthening data-driven compliance strategies.
Despite methodological consistency and robust results, the study presents a main limitation related to the modeling of homogeneous groups of taxpayers, rather than individual units. This approach was adopted due to legal fiscal secrecy restrictions and the General Data Protection Law (LGPD), in addition to the need to mitigate random data variability. However, aggregation may introduce an analytical bias arising from the loss of granularity. For future studies, it is recommended to compare aggregated and individual modeling, incorporate new data sources, and conduct empirical validations in an operational environment, in order to improve the understanding of factors influencing tax compliance and refine predictive capacity.
Bibliographic References
Chen, T., Guestrin, C. 2016. XGBoost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD ’16), 2016, California, San Francisco, USA.
Eberhartinger, E., Zieser, M. 2021. The effects of cooperative compliance on firms’ tax risk, tax risk management and compliance costs. Schmalenbach Journal of Business Research 73: 125-178.
Friedman, J. 2001. Greedy function approximation: a gradient boosting machine. The Annals of Statistics 29(6): 1189-1232.
Goiás. 1991. Lei nº 11.651, de 26 de dezembro de 1991. Institui o Código Tributário do Estado de Goiás. Diário Oficial do Estado de Goiás, Goiânia, 26 dez. 1991.
Jamison, J.; Mazar, N.; Sen, I. 2021. Applying behavioral insights to tax compliance: experimental evidence from Latvia. Journal of Tax Administration 6(2): 6-32.
Kleber, J.; Gangl, K.; Kirchler, E.; Florack, A. 2025. Taxpayers do not always follow the crowd: the effects of regulatory focus and social norm on tax compliance. Acta Psychologica 259(105288): 1-7.
Martinez, A. L. 2022. Cooperative compliance: SWOT analysis for the brazilian CONFIA program. Revista Electrónica de Direito 28(2): 127-153.
Nunes, R.V.; Garbaccio, G. 2023. Compliance cooperativo entre o fisco e o contribuinte. Revista Brasileira De Estudos Políticos 126: 173-206.
Sistema Público de Escrituração Digital [SPED]. 2007. Disponível em <http://www.planalto.gov.br/ccivil_03/_ato2007-2010/2007/Decreto/D6022.htm>. Acesso em: 30 dez. 2025
Xu, C.; Kong, Y. 2024. Random forest model in tax risk identification of real estate enterprise income tax. PLoS One 19(3): e0300928.
Yang, L. 2025. Predictive modeling of tax compliance risks: a comparative study of machine learning approaches. PLoS One 20(9): e0331715.
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