liveBook · Manning

Cost-sensitive learning

As explained in Financial AI in Practice

Cost-sensitive learning incorporates differing costs of prediction errors into model training or decision-making.

Suppose fraud accounts for 1% of transactions. A model that approves everything can reach 99% accuracy while catching no fraud. Cost-sensitive learning addresses this imbalance by making a missed fraud case more costly to the learning algorithm than a mistaken classification of a legitimate transaction. The goal is to improve detection without treating every error as equally consequential. section 8.1.1

Place the technique in a fraud-modeling workflow:

  • Start with labeled fraud and legitimate transactions. Use cost-sensitive learning when the rarity of fraud would otherwise bias training toward the legitimate class. section 8.1.1
  • Change the learning penalty rather than rebalancing the dataset. Oversampling, undersampling and SMOTE are alternative approaches to the same imbalance problem. section 8.1.1
  • Check precision, recall and AUC-PR rather than relying on accuracy. Precision reflects false alarms and customer friction; recall reflects missed fraud and financial loss. section 8.1.1

Cost-sensitive learning in a transaction graph

A graph neural network can apply the same principle by changing its loss function so that misclassifying a fraud node incurs a heavier penalty. This addresses imbalance at the graph-model level; it does not remove the separate need to consider scalability or explain why a transaction was flagged. section 9.4.1

How Financial AI in Practice covers it

How deep it goes
Defines the penalty change and identifies its use in GNN losses, but gives no weighting formula or implementation procedure.
Examples
Uses an approve-everything fraud classifier with 99% accuracy and fraud-node misclassification in a GNN.
What it assumes
Assumes labeled fraud outcomes while explaining from first principles why rare fraud creates majority-class bias.
What you can do after
Evaluate/understand it as a training choice and assess fraud detection using precision, recall and AUC-PR instead of accuracy alone.
How it connects
Links class imbalance and supervised learning to resampling, SMOTE, graph neural networks, precision, recall and AUC-PR.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Financial AI in Practice. The section links point to the parts of the book it draws on.