**6. Emerging risks, new choices, and modern practices**

In all domains including finance, the major cause that contributes to the risk in a machine learning model is the complexity associated with the model. The machine learning algorithms are intrinsically very complex as they work on voluminous and possibly unstructured data such as texts, images, and speech. As a consequence, training of such algorithms demands sophisticated computing infrastructure and a high level of knowledge and skill on the part of the modelers. However, countering such complexities with overly sophisticated models can be very counterproductive. Instead of adopting a complex approach, the banks and financial institutions should understand the risks associated with their business and operations and manage them with simple model-validation approaches. The issues that will dominate the risk management landscape for machine learning models in the financial industry are – (i) interpretability of the models, (ii) model bias, (iii) extensive feature engineering, (iv) importance of model hyperparameters, (v) production readiness of models, (vi) dynamic calibration of models, and (vii) explainable artificial intelligence. These issues are briefly discussed below.

**Model interpretability:** Since all machine learning models are essentially black boxes, their interpretability requirements have to be determined by the banks and financial institutions based on the risk associated with their use cases [28]. While some use cases may demand a highly granular and transparent interpretation of the model's working, the requirements for some use cases may not be so stringent. For example, in credit granting by banks to its customers, there may be a clear explanation required to be given by a machine learning model in cases where such credits are refused by the banks. However, another use case that involves minimal risk to the bank's operations such as recommendation of a product sent to the mobile app installed on a customer's hand-held device may not demand any understanding of the reason why the model has made such recommendation.

The model validation process should make sure that models comply with their intended objectives and policies. Despite being black-box in nature, machine learning models come with various provisions for their interpretation. Depending on the type of the model, these approaches may be widely different as discussed below.

Models like linear regression which are not only linear but monotonic in their behavior, the coefficients associated with the explanatory variables exhibit their respective influence on the target variable in the model.

Ensemble models such as ada boosting or gradient boosting, are nonlinear but monotonic in their behavior. In these monotonic models, if the explanatory variables are restricted in their values, the restriction will cause either an increase or a decrease in the value of the target variable. This monotone nature of the models simplifies the contributions of the explanatory variables in the predicted values of the target variable by the model.

The complex deep neural network-based models which are not only nonlinear but also non-monotonic have methods like *Shapley additive explanations* (SHAP), and *local interpretable model agnostic explanations* (LIME) for their global and local interpretability.

**Model bias:** Machine learning models are susceptible to four different types of bias. These biases are, (i) sample bias, (ii) bias in measurement, (iii) bias due to algorithms, and (iv) bias towards or against a particular category of people [29]. For example, the algorithm used in building a random forest model has a bias towards input features that have a more distinct set of values. For example, a model built on a random forest algorithm for assessing potential money laundering activities is likely to be biased towards the features with a higher number of levels in its categories (e.g., occupation), while features having a lower number of categorical levels (e.g., country) might be better suited to detect money laundering activities. To counter the issues about algorithmic bias, the validation processes must be equipped with the ability to select the most appropriate algorithm in a given context. Feature engineering and designing challenger models are some of the methods to counter algorithmic biases in models. The bias against or in favor of a particular group of people can be avoided by defining a fair set of policies by the banks and financial institutions. Models should be tested for fairness for various cases, and necessary corrections should be made in case aberrant outputs are produced by the models.

**Extensive feature engineering:** The task of feature engineering involves much more complications in machine learning and deep learning models than classical statistical models. The factors that contribute to the increased complexity in feature engineering in machine learning are as follows: The first and the most obvious reason is the large number of features involved in machine learning models. First, machinelearning models usually involve a very large number of input variables. The second reason is due to the increased use of unstructured data input in machine learning models. Unstructured data like text, images, and speech involve an enormously large number of features after data preprocessing which add to the complexity in modeling. The use of commercial-off-the-shelf frameworks in modeling such as AutoML has also led to an increased number of features as these frameworks automatically generate derived features from the raw data for providing a better fit of the models into the data in the training phase. While such an approach leads to better training, it is very likely to yield overfitted models in most practical use cases. The banks must have a robust feature engineering strategy in place for mitigating their operational and business risks. The feature strategy is likely to be different for a diverse set of applications. In the case of highly critical and risk-intensive applications like the evaluation of credit-worthiness of customers, every single feature in the model needs to be assessed very closely. On the other hand, for routine applications involving low risks, an overall review of the feature engineering process involving a robust data wrangling step may be sufficient.

### *Introductory Chapter: Machine Learning in Finance-Emerging Trends and Challenges DOI: http://dx.doi.org/10.5772/intechopen.101120*

**Model hyperparameters:** In machine learning models, the algorithms have parameters associated with them that are not parameters of the models. For example, the number of levels in the constituent decision trees of a random forest (also known as the depth of the trees), or the number of hidden layers in the architecture of a deep learning model must be decided before the models can be trained. Stated differently, the parameters are not determined from the training data of the models, and these are called hyperparameters of the models. The values of hyperparameters in machine learning models are most often determined by trial-and-error methods or brute force search methods like grid search. The absence of an exact and efficient way of finding the optimum values of the hyperparameters makes designing machine learning and deep learning models a particularly challenging task as a wrong choice of values of the hyperparameters can lead to imprecise models. Of late, banks and other financial institutions are depending more on sophisticated binary classification models built on support vector machines with the additional capability of text analytics for analyzing customer complaints. However, these models will be difficult to generalize for a multitude of applications as they will be sensitive to the kernel used in the training.

**Production readiness of models:** Unlike statistical models which are designed as an aggregation of rules of codes to be executed in a production system, machine learning models are built on algorithms requiring intensive computations most of the time. However, in many situations, financial model developers ignore this important point and tend to build overly complex models only to find later that the production systems of the banks are unable to support such complexity. A very simple example could be a highly complex deep learning model built for detecting frauds in financial transactions that is unable to satisfy the latency constraint in its response. To ensure that the machine learning models are production-ready, the validation step should make a reliable estimation of the volume of data that the model will require to process on the production architecture [30].

**Dynamic calibration of models:** There is an adaptable class of machine learning models that can dynamically modify their parameters based on the patterns in the data [31]. An obvious example is a model built on the reinforcement learning approach. While the autonomous learning of such models is a great boon, there is also a new type of risk associated with such models. In absence of sufficient external control and with too much emphasis on learning from the short-term patterns on the data, the long-term performance of the models may be adversely affected. The consequence is an additional complexity in financial modeling – when to recalibrate the model dynamically? The dynamic recalibration time will also need to be adapted for different applications like algorithmic trading, creditworthiness determination, etc. A comprehensive validation process should now include a set of policies that will guide the modelers in evaluating dynamic recalibration so that the model can adhere to its intended objectives while appropriate controls are in place for ensuring that risks are mitigated when they emerge. This is surely not going to be an easy task as it will involve the complex job of thresholding, identifying the health of the models based on their critical metrics of performance on out-of-sample data.

**Explainable artificial intelligence:** In the explainable artificial intelligence paradigm, an AI program scans through the code of another AI program and attempts to explain the operating steps and the output yielded by the latter program. This approach can be exploited to adjust the values of the explanatory variables in a predictive model so that the desired value of the target variable (i.e., the output of the model) is obtained [32]. In this way, explainable AI provides a very easy and elegant way to record, analyze and interpret the learning method of a complex model and for

repeating the same in the future. Although the computing paradigm is still in research labs, its adoption in a commercial environment especially in the financial industries is not far away.
