machine learning and fraud detection
play

Machine Learning and Fraud Detection February 2020 Tamsin Crossland - PowerPoint PPT Presentation

Machine Learning and Fraud Detection February 2020 Tamsin Crossland Senior Architect @CrosslandTamsin World Class Payment and Enterprise Solutions for the global financial sector Two main types of article on AI 2 Machine Learning and


  1. Machine Learning and Fraud Detection February 2020 Tamsin Crossland – Senior Architect @CrosslandTamsin World Class Payment and Enterprise Solutions for the global financial sector

  2. Two main types of article on AI 2

  3. Machine Learning and Fraud Detection • Payments • Demonstration • Thoughts 3

  4. Machine Learning and Fraud Detection • Payments • Demonstration • Thoughts 4

  5. 5

  6. The increasing scale, diversity, and complexity of fraud. • Vulnerabilities in payments services have increased as the shift to digital and mobile customer platforms accelerates. 6

  7. The increasing scale, diversity, and complexity of fraud. • New solutions have also led to payments transactions being executed more quickly, leaving banks and processors with less time to identify, counteract, and recover the underlying funds when necessary. 7

  8. The increasing scale, diversity, and complexity of fraud. • The sophistication of fraud has increased: • greater collaboration among bad actors, including: the exchange of stolen data, new techniques, and expertise on the dark web. 8

  9. The fraud threat facing banks and payments firms has grown dramatically in recent years. Estimates of fraud’s impact on consumers and financial institutions vary significantly but losses to banks alone are conservatively estimated to exceed $31 billion globally by 2018. 9

  10. Instant Payments

  11. Rule Based Systems Example: if a credit card transaction is more than ten times larger than the average for this customer Allow the human experts to apply their subject matter expertise. Difficult and time-consuming to implement well. Includes the painstaking definition of every single rule for anomaly possible If experts make an omission, undetected anomalies will happen and nobody will suspect it. Today, legacy systems apply about 300 different rules on average to approve a transaction 11

  12. Neural Network 12

  13. Weights and Biases 13

  14. Training 14

  15. Training Fraudulent Transaction Fraud Non-Fraudulent Fraud Transaction 15

  16. Use Case 16

  17. Rule Based versus Machine Learning Rule Based Machine Learning Catches obvious fraudulent scenarios Finds hidden correlations in data Large amount of manual work to enumerate all Automatic detection of possible fraud scenarios possible detection rules Easier to explain More difficult to explain 17

  18. Machine Learning and Fraud Detection • Payments • Demonstration • Thoughts 18

  19. Install Tensorflow 19

  20. Install Libraries data mining and data analysis Data Analysis winpty docker exec -i -t 07a24f61e7b6 bash pip install pandas pip install -U scikit-learn 20

  21. Contains two days worth of credit card transactions made in September 2013 by European cardholders. 492 frauds out of 284,807 transactions (0.172%). Contains only numerical input variables which are the result of a Principal Component Analysis transformation (a method of extracting relevant information from confusing data sets). Due to confidentiality issues, cannot provide the original features and more background information about the data. 21

  22. Features V1, V2, ... V28 are the principal components obtained with PCA The feature 'Amount' is the transaction Amount Feature 'Time' contains the seconds elapsed between each transaction and the first transaction in the dataset. The only features which have not been transformed with PCA are 'Time' and 'Amount’ Feature 'Class' is the response variable and it takes value 1 in case of fraud and 0 otherwise. 22

  23. Demonstration 1 23

  24. 24

  25. Balance data 25

  26. 49% 26

  27. Data Loss 284315 -> 492 27

  28. 28

  29. Attempt 3 Janio Martinez Bachmann 29

  30. Libraries a library for making statistical graphics in Python. Toolbox for imbalanced dataset in machine learning. 30

  31. 31

  32. Underfitting and Overfitting 32

  33. Overfitting 33

  34. Outliers 34

  35. Principal Component Analysis 35

  36. Demonstration 2 36

  37. Scale time and amount 37

  38. Random under-sampling 38

  39. 39

  40. Correlation Matrix Used to show which features heavily influence whether a transaction is a fraud 40

  41. 41

  42. Anomaly detection 42

  43. 43

  44. After implementing outlier reduction our accuracy has been improved by over 3% ! Some outliers can distort the accuracy of our models but remember, we have to avoid an extreme amount of information loss or else our model runs the risk of underfitting. 44

  45. Dimensionality Reduction and Clustering 45

  46. Dimensionality Reduction and Clustering t-SNE takes a high-dimensional dataset and reduces it to a low-dimensional graph whilst still retaining a lot of the information. 46

  47. SMOTE Synthetic Minority Over-sampling Technique Solving the Class Imbalance: SMOTE creates synthetic points from the minority class in order to reach an equal balance between the minority and majority class. Location of the synthetic points: SMOTE picks the distance between the closest neighbors of the minority class, in between these distances it creates synthetic points. Final Effect: More information is retained since we didn't have to delete any rows unlike in random undersampling. 47

  48. Compile the model The following example uses accuracy , the fraction of the transactions that are correctly classified. optimizers shape and mold your model into its most accurate possible form by futzing with the weights. The loss function is the guide to the terrain, telling the optimizer when it’s moving in the right or wrong direction. 48

  49. 49

  50. Confusion Matrix Predicted: no Predicted: Yes Actual: no True negative False positive Actual: yes False negative True positive 50

  51. Predicted: no Predicted: Yes Actual: no True negative False positive Actual: yes False negative True positive 51

  52. Using SMOTE 52

  53. 53

  54. 54

  55. Unsupervised Learning

  56. 56

  57. Iris Data Set • 50 samples from each of three species of Iris . • Four features were measured from each sample: • the length and the width of the sepals and petals, in centimeters. • the objective of K-means is simple: • group similar data points together and discover underlying patterns. • To achieve this objective, K-means looks for a fixed number ( k ) of clusters in a dataset. 57

  58. KMeans K -means clustering is a type of unsupervised learning, which is used when you have unlabeled data (i.e., data without defined categories or groups). The goal of this algorithm is to find groups in the data, with the number of groups represented by the variable K . The algorithm works iteratively to assign each data point to one of K groups based on the features that are provided. Data points are clustered based on feature similarity. 58

  59. Demonstration 3 59

  60. 60

  61. 61

  62. Machine Learning and Fraud Detection • Payments • Demonstration • Thoughts 62

  63. Two Questions Every Machine Learning Project Should Ask Is the purpose of the project ethical? Is the implementation of the project ethical? @CrosslandTamsin 63

  64. Two Questions Every Machine Learning Project Should Ask Is the purpose of the project ethical? what are the additional benefits of the project? who does it benefit? 64

  65. Is the purpose of the project ethical? 65

  66. Two Questions Every Machine Learning Project Should Ask Is the implementation of the project ethical? Does it implement unfair bias? Disclose to stakeholders about their interactions with an AI Governance: • secure, • reliable and robust, and • appropriate processes are in place to ensure responsibility and accountability for those AI systems 66

  67. Is the implementation of the project ethical? 67

  68. One last thing Is it Intelligent? 68

  69. Fraudulent Transaction Fraud Non-Fraudulent Transaction @CrosslandTamsin 69

Recommend


More recommend