Bank Soundness Level Prediction: ANFIS vs Deep Learning

Financial systems depend on financial institution stability. This study used an ANFIS-ANN model to forecast bank insolvency probability. ANFIS, an adaptive network that combines fuzzy logic with ANN, is a promising bankruptcy prediction tool. This study compared the predictive performance of ANFIS against Long Short-Term Memory (LSTM) and Convolutional Neural Network (CNN) using financial statements data from 42 banking issuers listed on the Indonesia Stock Exchange (IDX) from 2010 to 2021. This work aimed to build a robust bankruptcy prediction model, compared ANFIS to LSTM and CNN, and assessed each method's accuracy and applicability. MAPE and RMSE metrics were used for a thorough review. The study collected, preprocessed, and trained ANFIS, LSTM, and CNN models. ANFIS had 243 rules with triangular membership functions for input variables and constant output membership. Random search optimized LSTM and CNN hyperparameters. This study's novelty lies in its innovative comparison of ANFIS and deep learning for bank bankruptcy prediction used real-world financial data. ANFIS beat LSTM and CNN in MAPE, showing its predictive model capability. ANFIS has the lowest MAPE of 0.140335507 when trained and tested on 80%:20% data. In conclusion, ANFIS outperformed deep learning in bank soundness prediction. It provided vital insights into the banking sector's early warning and risk assessment. The results showed that ANFIS can help financial decision-makers to improve risk management.


Introduction
The systemic character of bank bankruptcy is one of the critical issues in maintaining the existence and stability of domestic and global finance [1].Establishing an early warning system to prevent and quickly identify the risk of bank bankruptcy is a significant effort.Several types of bankruptcy risk are as follows: credit risk, market risk, liquidity risk, operational risk, and capital risk [2].One significant effort that can be made is to evaluate and analyze through a bankruptcy estimation model whose main ingredient is financial statements [3].There are at least two methods for estimating bankruptcy risk: using statistics such as univariate data analysis [4], multivariate discrimination [5], and regression.Second, artificial intelligence constructs such as Artificial Neural Networks (ANN) [6] [7][8] [9], Genetic Algorithms (GA) [10], Support Vector Machines (SVM) [11], and case-based logic analysis [12], a notable gap emerges in the exploration of more advanced Artificial Intelligence (AI) techniques that can provide superior accuracy and adaptability.
One significant limitation of statistical methods is their assumption of linearity and normality when establishing systematic relationships [10].This shortcoming can profoundly impact the accuracy of bankruptcy predictions.In contrast, ANN and fuzzy set theory have demonstrated enhanced accuracy, adaptability, and robustness in predicting complex financial phenomena [10] [11][13] [14].Fuzzy logic, mainly, effectively constructs predictive models by mapping input variables to output predictions with relative precision, utilizing IF-THEN rules.
Despite the potential of ANN and fuzzy logic approaches, there remains a dearth of research in leveraging their full capabilities for bankruptcy prediction as an early warning mechanism.Furthermore, the hybrid model known as the Adaptive-Network-Based Fuzzy Inference System (ANFIS), which synergistically combines the strengths of ANN

2.1.Theoretical Foundations
Bankruptcy prediction and early warning systems are grounded in financial theory and artificial intelligence methodologies.Financial theories, such as the Altman Z-score and Merton structural models, have laid the groundwork for predicting corporate distress and insolvency risk by analyzing various financial ratios and indicators [19] [20].These traditional statistical methods have offered valuable insights into bankruptcy prediction, but they often assume linear relationships and normality, limiting their applicability to complex and dynamic financial environments [21].To address these limitations, AI techniques, particularly ANN and Fuzzy Logic, have gained prominence in capturing nonlinear and intricate patterns within financial data [22] [23].The fusion of fuzzy logic and ANN, exemplified by the ANFIS, has emerged as a powerful tool for bankruptcy prediction by combining the strengths of both paradigms [24].ANFIS's ability to accommodate linguistic parameters and learn from data offers a unique approach to modeling bankruptcy risk [25].

2.2.Previous Research
The domain of bankruptcy prediction has seen extensive research efforts utilizing various techniques.Traditional statistical methods, including discriminant analysis and logistic regression, were early contributors to the field [26].These methods primarily focused on identifying critical financial ratios and generating classification rules for bankruptcy prediction [27].Subsequent advancements incorporated AI techniques, such as ANN and SVM, to enhance predictive accuracy [28].ANN, in particular, demonstrated its ability to capture complex nonlinear relationships in financial data [29].Notably, the application of ANFIS in bankruptcy prediction remains relatively underexplored, with existing studies primarily focused on other domains [30].While ANFIS has shown promise in applications such as fraud detection and stock price estimation, its potential for bankruptcy prediction in the banking sector has yet to be fully explored [31].Recent studies have also delved into deep learning approaches, including LSTM and CNN, showcasing their capabilities in handling sequential and image-based financial data [32] [33].
Despite recent advancements, there are still unresolved debates in bankruptcy prediction, notably concerning the interpretability of AI-based models like ANN and deep learning architectures.While excelling in predictive accuracy, these models' "black-box" nature hinders understanding underlying prediction factors, posing challenges for crucial insights into bankruptcy risk variables and effective financial decision-making.The ongoing dispute between expert-driven feature selection and data-driven feature extraction methods persists.Expert-driven approaches offer interpretability through domain-specific ratios, whereas data-driven techniques like deep learning uncover intricate patterns within raw data, emphasizing the need for a balanced approach that amalgamates domain knowledge and 177 data-driven insights to enhance model accuracy and interpretability.As bankruptcy prediction evolves with AI integration, the study's comparison of ANFIS and deep learning models contribute to this field by elucidating their strengths and limitations in bank soundness prediction.However, the comparative analysis between ANFIS and deep learning models, specifically LSTM and CNN, in the context of bank soundness prediction remains a novel and pertinent area of investigation, which this study aims to address.

Method
This study implements ANFIS for estimating the soundness of a bank as a source of bank bankruptcy information.The estimation process has several steps in the research stages presented in Figure 1.The first step is to collect a dataset of bank issuers on the Indonesia Stock Exchange.Furthermore, the dataset is processed using the ANFIS method by applying several different data utilization patterns and compared with deep learning.In the final process, the performance of the estimation results is tested using the MAPE and RMSE approaches.All of these stages are comprehensively described in the following sub-subjects.Expense to Earning Assets (IEEA), Capital Adequacy Ratio (CAR), Net Open Position (NOP), Credit, Time Deposit, Investment, Foreign Debt (Debt), and TKB (PK).The target attribute is the TKB attribute.The TKB attribute is essential because this attribute has a value that can be used to estimate the soundness of a bank.The list of 42 issuers of the Bank used can be seen in Table 1.The data obtained is vital because it is input in this prediction process.During the next step, the dataset is analyzed and tested through the stages of the testing process.Two schemes will be tried to distribute training and testing data in this study.The scheme is 70%:30% and 80%:20%.The purpose of this scheme is to find out which performance is better to use for training and testing data on the prediction process that will be carried out.

Preprocessing
Preprocessing aims to improve the quality of input data to get results with a high level of performance.Preprocessing used in this research consists of attribute selection and data normalization, as shown in   The following preprocessing stage is data normalization.The data is normalized so that the network output follows the activation function used.Data normalization is used to reduce error or error by changing the actual value to a value range of 0 to 1.The data normalization technique used is min-max normalization [34].The min-max normalization equation is in (1). (1) is the result of normalization, is the data to be normalized, is the minimum value of all data, is the  '      maximum value of the entire data.

Prediction Process
The TKB prediction process uses ANFIS and deep learning (DL).ANFIS is a combination of fuzzy logic and ANN.Meanwhile, DL is the development of machine learning (ML) with more layers.A more detailed explanation of each method used is described as follows.

1) ANFIS
ANFIS combines two intelligent system models, ANN and Fuzzy Inference Systems (FIS) [35].FIS is based on Fuzzy ratiocinate (with a continuous range of truths with a value range of 0 to 1), fuzzy IF-THEN rules, and fuzzy logic (equivalent to human thought processes using linguistic parameters such as small, medium, and large).The IF component of the rule is called the antecedent, while the THEN component is the consequence or conclusion.In addition, the fuzzy logic parameters are updated through some data on ANN learning [5].The ANFIS modeling system uses a self-learning mechanism from neural networks to match each fuzzy membership system into an adaptive form automatically. [3] The advantage of fuzzy logic in applying the rule base [6] is to simulate the qualitative aspects of human knowledge and decision-making as a model.ANN also has advantages in identifying shapes, learning, and practicing problem-solving without mathematical modeling.In addition, ANN can work based on past data sources that are input to the model to estimate future events based on these data.So ANFIS has both capabilities.ANFIS structure, in general, can be seen in Figure 4. From Figure 3, it is known that ANFIS generally has five layers.The five layers consist of product data sets, normalization data sets, defuzzy data sets, and all output layers.Below is a description of each layer of the ANFIS structure as follows [7].

Layer 1 (Fuzzy Layer)
This layer is a fuzzification.In this layer, each neuron is adaptive to the parameters of an activation.The output of each neuron is the degree of membership given by the membership function input, like the triangular membership function used in this study, as shown in (2).

Layer 2 (Product Layer)
Every node in this layer is a non-adaptive node.This layer is a fixed neuron and is marked as .The π output is the product of all inputs that enter this layer, as in (3).The AND operator is usually used.The result of this calculation is called the firing strength of a rule.Each output represents the strength of each rule .
The above formula shows which reflects the strength of the -th function on all elements of the second    layer, while is a group function of the fuzzy data set.µ

Layer 3 (Normalized Layer)
Each neuron in the third layer is fixed and assigned the symbol N. The i-th neuron calculates the ratio of the -th order power to the total firing power of all functions in the second layer.The result of the  calculation is called the normalization power.Next, calculate the normalized value using the fourth equation formula.This layer is in the form of adaptive neurons to an output.The output of this step can be calculated using equation (5)

Layer 5 (Total output layers)
This layer is a single neuron marked with the sum of all outputs in the fourth layer, considered the input signal.The equation of this output layer is as in (6).
In this study, the architecture of the ANFIS model used can be seen in Figure 5. Figure 5 explains that the input reflects each fuzzy layer, the MF-input is a description of the product layer, the rules are the normalized layer, the MF-output is a description of the defuzzy layer, and the output is representative of the total output layer.2) Deep Learning (DL) DL is one of the developments of ML whose algorithm design idea is inspired by the configuration of the human brain.In prediction, the implementation of DL is used for anomaly detection [36].Anomaly detection is a step to identify irregular patterns or not following the predicted behavior.Anomalies can be interpreted as behavior or patterns that are not reasonable and can be a sign of an error in the system.Two kinds of DL used in this study are LSTM and CNN.
1. Long Short-Term Memory (LSTM) LSTM is one of the ANN developments that can be used for time-series data modeling.LSTM can overcome long-term dependencies on its input [9].
One of the Recurrent Neural Network (RNN) developments is LSTM, and its function is to solve various problems in the learning process through information connections.The database built on RNN allows old information to be useless when it has been overwritten by new information [10].The LSTM was designed and constructed to solve the case of the missing gradient of the RNN since the vanishing and exploding gradients face each other [11].
LSTM can also manage the memory of each input inserted with the cells and units in the memory portal.The LSTM design comprises memory cells and three gates, namely input, forget, and output [12], as shown in Figure 6.From Figure 6, the input gate regulates how much information must be stored in a cell state.This prevents the cell from storing useless data.Forget gate is responsible for setting a fixed value in the memory cell.
The output gate regulates how many values in the memory cell will be used for output.There are several computational stages in the LSTM method which can be seen in ( 7)-( 12) [12][12].CNN is included in the DL field, which is included in the sub-field of ML, which applies the basic concepts of the ANN algorithm with more layers [37].CNN is a feedforward network because the information flow occurs only in one direction, from input to output.
In computer vision and image management, CNN is well-known and has a good performance display [16].CNN has a convolution layer and a fully connected layer, each with a different function.The convolution layer resolves various spatial information in images, while the fully connected layer has information storage capacity in time-series data [17].The difference between computer vision and time series is the input of the input to the model, the matrix that describes and visualizes images for computer vision, and the estimation of time series resulting from the 1D array input [38].It can be explained that the type of 1D CNN is an estimation tool used on CNNs in which there are several layers, namely input, convolution, pooling, fully connected, and output layers [15], presented in Figure 7. Next, when the data is wholly inputted, the convolution is performed using a 1D filter.As explained in the previous section, the 1D filter is in the convolutional layer, which functions to convolve data [18].Convolution is a way to combine two series of numbers to produce a third series of numbers.Convolution is used to concoct features contained in the input data.This occurs by shifting the 1D filter along the input data to run the dot product operational system with an effective receptive field, and the results will be processed into the input feature map [39].The stride value dramatically influences the extent of the shift of the filter.The smaller the stride value, the more detailed and feature information is obtained so that the computation time will be longer.The constructed input filter map will proceed to the next stage, the activation process, to create a map of output neuron features produced by convolution neurons [40].Furthermore, the sigmoid function and Rectified Linear Unit (ReLU) are used as markers in CNN to perform activation.Mathematically, the two elements are built in mathematical equations ( 13) and ( 14) [41].
In order to reduce the number of parameters and control overfitting, a pooling layer function is needed to eliminate the outer dimensions of the feature map or what is known as the convolutional layer [40].The computing network system's complexity can also be reduced through the pooling layer [42].The most popular types of pooling are average pooling and max pooling, where average pooling functions extract a single maximum value from a set of neurons while the fully-connected layer functions process data that utilizes MLP to obtain the desired results [43].These layers have many neurons that are fully connected to other layers [44] and obtain input and output from the feature extraction layer (convolutional layer and pooling layer) [45].Thus, through this layer, the input can be changed to obtain the final result [46], where the output from the fully-connected layer moves to the output layer that is functioning and responsible for displaying estimates [47].
The parameter design for the CNN architecture applies random search to produce hyperparameter tuning.
The CNN indicator uses a 1D convolution layer through 64 filter kernels with a kernel size responsible for activating the Rectified Linear Unit (ReLU).Meanwhile, layer pooling applies 1D max pooling with one barometer pool.The fully-connected layer applies two hidden layers through 32 neurons.While the dropout has a parameter value of 0.2, the loss function is of the mean squared error (MSE) type, and the optimizer applies Adam with 64 and 500 epoch parameters.It is hoped that the CNN parameter settings will be more accurate.

Evaluation
All experiments in this study were evaluated using error detection.Mean Absolute Percentage Error (MAPE) and Root Mean Square Error (RMSE) is the error detection used.MAPE is used for error detection, which represents accuracy [48], while RMSE is used for error detection based on outliers [49].MAPE and RMSE values getting smaller and closer to 0 indicate a more accurate prediction result.The MAPE and RMSE equations can be seen in ( 15) and ( 16).

Results and Discussion
The present section delves into an in-depth analysis of the research findings, offering comprehensive insights into the discovered trends and outcomes.The discussion thoroughly examines the prediction results, implications, and potential practical implementations.

Prediction Results and Performance Evaluation
From the ANFIS process that has been carried out, prediction results are then evaluated using MAPE and RMSE.The results of the evaluation of ANFIS predictions can be seen in Table 2.This study was also compared with the DL method to determine the performance of the existing ANFIS method.The DL method used as a comparison for predicting bank soundness is LSTM and CNN.The results of the evaluation comparison between ANFIS and DL can be seen in Table 3.  From the overall results, ANFIS has a better accuracy performance when compared to DL for predicting bank soundness in the data used in this study.In addition, the best results are also obtained from the consistency of the use of training and testing data, 80%: 20%.According to the theory, this can happen because the more training data used, the ANFIS or DL will have to learn knowledge based on existing patterns to provide predictive results close to their original values.It is important to note that while ANFIS shows better accuracy compared to DL methods in predicting bankruptcy risks, the presence of outliers in the predictions suggests the need for further investigation and model refinement.

Interpretation of Findings
Analyzing the characteristics of these outliers can help identify potential biases or errors in the ANFIS model and guide improvements to enhance its overall performance.
Overall, the evaluation results of ANFIS in predicting the five existing bankruptcy risks demonstrate its potential as an accurate risk predictor in the banking sector [25][30].However, careful consideration of outliers, further analysis, and refinement of the model are necessary to ensure its robustness and reliability in real-world applications.
When a large percentage of businesses fail, it can have a negative impact not just on the company's owner and partners but also on society and the economy as a whole [31].Because of this, the enormous amount of work invested into building Bankruptcy Prediction Models (BPM) for corporate insolvency is justifiable.The success of such models depends on a variety of factors, one of the most important of which is the approach used to build them.However, most BPM studies choose their tools based on variables such as popularity or the researchers' skill level rather than carefully considering the capabilities of the tools they employ to perform the research.This is because there are not enough evaluation resources now on the market that can present and evaluate the relative performance of the critical tools in light of the several fundamental requirements that a BPM should fulfill.If the appropriate variable is employed, businesses, researchers, and investors may all stand to gain significantly from the construction and development of bankruptcy prediction models that are specifically adapted to the circumstances of a particular nation. Maharani

Practical Implementations and Implications
The practical implications of these findings extend far beyond the confines of this study.Financial institutions can leverage the ANFIS model's accuracy in predicting bankruptcy risk to enhance risk assessment strategies.The model can be an invaluable tool for proactive decision-making, enabling banks to allocate resources more efficiently and adopt preemptive measures to avert potential insolvencies.
Additionally, regulatory bodies and policymakers can capitalize on the ANFIS model's capabilities to fortify their oversight mechanisms.By incorporating ANFIS-derived predictions into their surveillance systems, these entities can gain early insights into the stability of banking institutions, facilitating timely interventions and safeguarding the broader financial ecosystem.

Conclusion
Based on the findings obtained from evaluating the bank soundness level prediction system, it can be inferred that the ANFIS outperforms deep learning specifically the LSTM and CNN models.Employing five input variables categorized into three groups using triangle membership functions, ANFIS generated 243 rules with constant output membership.The MAPE achieved was 0.140335507 with an 80% to 20% training and testing data split.While the study successfully fulfilled its research objectives, it acknowledges limitations and suggests future directions.The research primarily aimed to explore fundamental applications of ANFIS and deep learning for prediction purposes.As a result, forthcoming investigations could examine the integration of optimization techniques such as Particle Swarm Optimization (PSO) and Genetic Algorithms (GA) to enhance the approach's performance.Additionally, future research endeavors may involve incorporating more diverse issuer data to further enrich the predictive capabilities of the models.

Figure 2 .
Attribute selection is the selection of attributes based on indicators that affect the bank's soundness level assessment.The selection of attributes is determined by eliminating unnecessary attributes to get valuable/essential attributes.

Figure 2 .
Figure 2. Preprocessing Six important indicator attributes used to assess the soundness of a bank are NPL Net, LDR, ROA, NIM, CAR, and TKB, with the amount of data after processing is 465 instances.The visualization of the data input used can be seen in Figure 3.

Figure 5 .
Figure 5. Structure of ANFIS Bank Soundness Level PredictionFor training the ANFIS algorithm, FIS was compiled using the Sugeno type.There are five input variables, namely NPL Net, LDR, ROA, NIM, and CAR, each of which has three memberships of Low, Middle, and High

Table 1 . 42 Issuers Banks used
. Whereas is the normalized power of each firing parameter in the third layer, ANFIS   output is , and , , and reflect neuron parameters.All of these parameters are called consequent

Table 2
shows the ANFIS settings with training and testing data of 80%:20% and 70%:30%.The most optimal MAPE at 80%:20% is 0.140335507, while the best MAPE at 70%:30% is 0.165920833.Meanwhile, the RMSE on training and testing data at 80%:20% is 0.089967158, with the most significant difference compared to the RMSE on training and testing at 70%:30%.

Table 3 .
Comparison of Prediction Evaluation Results with Deep Learning

Table 3
4ccording to the findings of this research, the typical bank between 2010 and 2021 has a high chance of having loans that are not functioning as expected, as well as other risks.Despite this, several financial institutions are nevertheless Maharani et al. / JADS Vol.4No.3 2023  Vol. 4, No. 3, September 2023, pp.175-189The health of financial institutions needs to improve immediately if there are no more bankruptcies.Based on the findings, it is clear that the ANFIS model has the potential to be an accurate risk predictor.The results of the ANFIS prediction evaluation provide valuable insights into the model's accuracy in predicting bankruptcy risks in the banking sector.Discussing the implications of these results about the five existing bankruptcy risks is essential.First, ANFIS shows promising performance in predicting credit risk, as indicated by the low MAPE values.A lower MAPE suggests the model's predictions are closer to credit risk values.However, the presence of outliers in ANFIS predictions should be considered, as they can impact the accuracy of credit risk assessments.Second, the evaluation results indicate that ANFIS has the potential to predict market risk accurately.The lower MAPE values compared to DL methods demonstrate ANFIS's superior performance in this area.Nevertheless, analyzing the outliers in ANFIS predictions is essential to identify any potential errors or biases in the model's market risk assessment.Third, ANFIS exhibits promising accuracy in predicting liquidity risk, as evidenced by the low MAPE values.The model's ability to provide accurate predictions in this area is crucial for financial institutions to manage their liquidity positions effectively.However, the presence of outliers in ANFIS predictions should be carefully examined to ensure the reliability of liquidity risk assessments.Fourth, operational risk prediction is a complex task, and the results show that ANFIS performs well in this area.The lower MAPE values compared to DL methods suggest that ANFIS is more accurate in predicting operational risk.However, the higher RMSE values indicate more significant variability in the prediction errors, emphasizing the need to address potential outliers and refine the model further.Fifth, the evaluation results indicate that ANFIS has the potential to predict systemic risk, although it may exhibit some limitations.The model's lower MAPE values compared to DL methods imply that ANFIS predictions are closer to the actual values of systemic risk.However, the presence of outliers in ANFIS predictions could indicate areas where the model's performance can be further improved to enhance its ability to capture systemic risk dynamics effectively.