Payment card fraud is a significant problem for financial institutions. The European Central Bank estimated that, in 2019, €1.87 billion of fraudulent transactions were made in the Single Euro Payments Area1 2. Although this represents a huge monetary cost, fraud involves only a small number of transactions: the same report estimates that for every €100 of legitimate transactions, only 3.6 cents are lost to fraud. Fraudsters are inventive and adaptive in circumventing security systems, which makes it extremely hard for financial institutions to uncover and prevent fraud in real-time.

Financial institutions adopt machine learning models to help detect fraud. By learning from past transactions, such models can classify outgoing transactions as fraudulent or not based on characteristics such as location or time of day. While classification is a standard task in machine learning, with a plethora of available techniques, classifying financial transactions presents specific challenges. Imagine that a bank develops a classification model for detecting transaction fraud, yielding the following predictions for a new set of transactions:

Based on the transaction's time, place and client's age, the classifier predicts whether a transaction is fraudulent or not. In this example, the classifier only makes one classification error.

Did the bank develop a good model? One common way of assessing the quality of a model is to evaluate its accuracy, i.e., the percentage of correct predictions. This model only made one error, resulting in an accuracy of 5/6≈83%. From a business point of view, however, it is important to also take into account the monetary amounts of these transactions and to evaluate the costs that result from fraud:

When also considering the transaction's amount, we see that the classifier's only error incurs a significant cost to the bank. In terms of costs, the model does not perform well.

Although the model only made one incorrect prediction, it allowed a fraudulent transaction of €1000 to pass. Failing to detect this fraudulent transaction results in a substantial cost to the bank as it will have to pay back the customer. In summary, this model has good performance in terms of classification accuracy, but it performs bad in terms of cost-savings, which is the actual objective of the bank in developing such models.

Cost-sensitive machine learning

Cost-sensitive learning is a class of machine learning methods that aim to minimize the monetary cost that is associated with the use of a classification model, instead of maximizing its accuracy. A financial institution can use these methods to minimize the cost resulting from fraud in financial payments. Note, here, that fraud is an application where the relevant costs are different for each instance in the data, i.e., for each transaction. In cost-sensitive learning, such costs are referred to as instance-dependent costs.

In our recent work3, we compare a variety of existing cost-sensitive learning methodologies that deal with instance-dependent costs. We differentiate between two types of approaches. The first type incorporates misclassification costs in the learning stage of the machine learning model, by customizing the model’s objective function so as to penalize costly mistakes more strongly. The second type of approaches consider the model’s predicted probabilities as well as the misclassification costs in order to make decisions – e.g., to block a transaction or not – so as to minimize the expected cost. This is done by optimizing the decision-making threshold that is used to classify instances. For example, for a very costly transaction of €10,000, the predicted fraud probability needs to be very low (e.g., below 5%) in order not to be blocked. In our work, we find that incorporating costs in decision-making is the more effective strategy. Moreover, this approach is conceptually simple and can be combined with any type of classifier, which makes it also easy to implement.

Dealing with limited investigation capacity

When a financial institution would decide to use a cost-sensitive approach, there remains an important challenge: it needs to process millions of transactions every day. The European Central Bank estimates that 23.1 billion non-cash payments were made in 20204, which corresponds to more than 63 million transactions per day. Moreover, for some types of fraud, banks cannot automatically block transactions in real-time, but must assign them to their fraud investigations team for review. Given the enormous quantity of transactions, it is impossible for the fraud investigations team to analyze all suspicious transactions.

This means the bank somehow needs to prioritize certain transactions for investigation. Assume the bank uses the predicted fraud probability to prioritize transactions, giving the following investigation priority:

Given limited investigation capacity, transactions need to be prioritized for investigation. In this case, this ranking is based on the predicted fraud probability.

The model assigns the highest probabilities to fraudulent transactions. However, if the bank only has an investigation capacity for two transactions, it would not investigate the third fraudulent case and hence this third fraudulent transaction of €1,000 will not be blocked. Again, the model seemed to perform well, but is still suboptimal from a business perspective since it does not take into account resource constraints. Therefore, the investigation capacity of the fraud team should be included in the decision making process. Ideally, the investigation priority should be based on both the fraud probabilities and transaction amounts.

Optimal resource allocation using learning to rank

To incorporate the available capacity in the machine learning model, we frame the problem as learning to rank transactions in terms of their importance5:

Given limited capacity, the problem can be reframed as a problem of ranking transactions in terms of investigation priority.

In the ranking framework, the machine learning model assigns each transaction a position in a ranking, denoting its priority for investigation relative to other transactions. This makes learning to rank different from classification, where each transaction’s probability of being fraudulent is predicted.

By using learning to rank, the available investigation capacity can be directly taken into account in developing the model. This is achieved by considering the probability that a transaction at position i in the priority ranking will be investigated, given the available capacity of the fraud investigations team (see Figure 5). Using learning to rank, these probabilities can be used as weights during the optimization of the model. This means that the model will focus more on correctly ranking transactions near the top of the ranking – those that will be investigated when capacity is limited.

We assume the available capacity is uncertain, but follows a probability distribution. In practice, the available capacity can be based on historical data. Given this distribution, we know the probability of investigating a transaction at a certain position in the ranking. This probability corresponds to the position’s importance during the model’s optimization.

Considering these probabilities and, consequently, the available capacity during optimization is important when the model cannot be perfect, which is often the case in real-world applications. Compare this to classification models, which will focus equally on predicting whether a transaction is 90% or 95% fraudulent, or 10% or 5%. When capacity is limited, however, we do not care about transactions with a low probability of being fraudulent – these will not be investigated anyway. In that case, we want our model to focus on correctly ordering the most suspicious and expensive transactions. This is exactly what our ranking methodology aims to do: predict a ranking of the outgoing transactions in terms of their predicted fraud cost.

In fact, we show that our method minimizes the expected losses incurred by the ranking given the available capacity for investigation. In other words, it optimally allocates the available resources to the transactions to be processed.

Our novel learning to rank methodology considers both the costs of transactions and the limited investigation capacity. The model model does not predict fraud probabilities, but a ranking of transactions in terms of investigation priority. Ideally, this ranking prioritizes both fraudulent transactions and costly transactions.

This means that the bank can optimally use the limited capacity of the fraud investigations team to uncover as much fraud as possible! We are currently in the process of implementing this ranking methodology at Belgium’s largest bank, BNP Paribas Fortis, to help them tackle fraud. More specifically, we use it to prioritize transactions for specific types of fraud that require time-consuming investigations, such as Microsoft scams or boiler room fraud, where the bank’s client often unknowingly participates in a fraudulent transaction. Uncovering these transactions takes specialized analysts. Our methodology helps these employees to spend their time in the most effective way.

The same challenge of optimally allocating limited resources to tasks with an uncertain outcome is encountered in a variety of other business applications. For example, marketeers might use a machine learning model to discover that 100 customers will churn, but only have the means to contact 50 customers. The question then becomes: who are the highest value customers they need to prioritize? Our methodology can help to optimally allocate the marketeers’ available resources and prioritize the most valuable customers. Similarly, in credit scoring, a bank will only have a limited amount of money to spend on loans or, in portfolio optimization, we can only invest in a subset of predicted “winning” stocks.


  1. ECB report shows card fraud declined in 2019 ↩︎

  2. The Single Euro Payments Area (SEPA) includes the EU member states, Switzerland, Iceland, Liechtenstein and Norway. ↩︎

  3. Vanderschueren, T., Verdonck, T., Baesens, B., & Verbeke, W. (2022). Predict-then-optimize or predict-and-optimize? An empirical evaluation of cost-sensitive learning strategies. Information Sciences. ↩︎

  4. Payments statistics: 2020 ↩︎

  5. Vanderschueren, T., Baesens, B., Verdonck, T., & Verbeke, W. (2022). A new perspective on classification: optimally allocating limited resources to uncertain tasks. arXiv preprint arXiv:2202.04369. ↩︎