Sagemaker Graph Fraud Detection

Use Amazon SageMaker and Deep Graph Library (DGL) for Fraud Detection in Networks
Alternatives To Sagemaker Graph Fraud Detection
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Amazon Sde Preparation961
2 months ago17C++
This repository includes all the interview preparation questions for Amazon SDE role
Geeks For Geeks Solutions424
4 months ago2lgpl-3.0C++
✅ My own Amazon, Microsoft and Google SDE Coding challenge Solutions (offered by GeeksForGeeks).
Amazon Neptune Samples337
3 months ago23mit-0JavaScript
Samples and documentation for using the Amazon Neptune graph database service
10 months ago8Python
Reinforcement Knowledge Graph Reasoning for Explainable Recommendation
3 months ago5mitPython
Web scraper for scraping, tracking and visualizing prices of products on various websites.
a year ago1Java
This repository contains some algorithms and data structures mostly implemented for kicks and learning. Hopefully might help someone in need! Feel free to fork, copy, suggest corrections or ask questions. Happy coding :)
Sagemaker Graph Fraud Detection42
2 years agoapache-2.0Python
Use Amazon SageMaker and Deep Graph Library (DGL) for Fraud Detection in Networks
Aws Admartech Samples34
4 months agomit-0Python
Samples and documentation for various advertising and marketing use cases on AWS.
Faang Interviewprep Frontend27
3 years ago
Front End Engineering resources for FAANG interviews
Graph Benchmarks24
3 years ago2mitPython
Alternatives To Sagemaker Graph Fraud Detection
Select To Compare

Alternative Project Comparisons

Amazon SageMaker and Deep Graph Library for Fraud Detection in Heterogeneous Graphs

Many online businesses lose billions annually to fraud, but machine learning based fraud detection models can help businesses predict what interactions or users are likely fraudulent and save them from incurring those costs.

In this project, we formulate the problem of fraud detection as a classification task on a heterogeneous interaction network. The machine learning model is a Graph Neural Network (GNN) that learns latent representations of users or transactions which can then be easily separated into fraud or legitimate.

This project shows how to use Amazon SageMaker and Deep Graph Library (DGL) to construct a heterogeneous graph from tabular data and train a GNN model to detect fraudulent transactions in the IEEE-CIS dataset.

See the details page to learn more about the techniques used, and the online webinar or tutorial blog post to see step by step explanations and instructions on how to use this solution.

Getting Started

You will need an AWS account to use this solution. Sign up for an account here.

To run this JumpStart 1P Solution and have the infrastructure deploy to your AWS account you will need to create an active SageMaker Studio instance (see Onboard to Amazon SageMaker Studio). When your Studio instance is Ready, use the instructions in SageMaker JumpStart to 1-Click Launch the solution.

The solution artifacts are included in this GitHub repository for reference.

Note: Solutions are available in most regions including us-west-2, and us-east-1.

Caution: Cloning this GitHub repository and running the code manually could lead to unexpected issues! Use the AWS CloudFormation template. You'll get an Amazon SageMaker Notebook instance that's been correctly setup and configured to access the other resources in the solution.


The project architecture deployed by the cloud formation template is shown here.

Project Organization

The project is divided into two main modules.

The first module uses Amazon SageMaker Processing to do feature engineering and extract edgelists from a table of transactions or interactions.

The second module shows how to use DGL to define a GNN model and train the model using Amazon SageMaker training infrastructure.

The jupyter notebook shows how to run the full project on an example dataset.

The project also contains a cloud formation template that deploys the code in this repo and all AWS resources needed to run the project in an end-to-end manner in the AWS account it's launched in.


  • deployment/
    • sagemaker-graph-fraud-detection.yaml: Creates AWS CloudFormation Stack for solution
  • source/
    • lambda/
      • data-preprocessing/
        • Lambda function script for invoking SageMaker processing
      • graph-modelling/
        • Lambda function script for invoking SageMaker training
    • sagemaker/
      • baselines/
        • mlp-fraud-baseline.ipynb: Jupyter notebook for feature based MLP baseline method using SageMaker and MXNet
        • python entry point used by the MLP baseline notebook for MXNet training/deployment
        • utility functions for baseline notebooks
        • xgboost-fraud-entry-point.ipynb: Jupyter notebook for feature based XGBoost baseline method using SageMaker
      • data-preprocessing/
        • container/
          • Dockerfile: Describes custom Docker image hosted on Amazon ECR for SageMaker Processing
          • Script to build Docker image and push to Amazon ECR
        • Custom script used by SageMaker Processing for data processing/feature engineering
      • sagemaker_graph_fraud_detection/
        • dgl_fraud_detection/
          • model
            • Implements the various graph neural network models used in the project with the mxnet backend
          • Contains functions for reading node features and labels
          • Contains functions for parsing input from SageMaker estimator objects
          • Contains functions for constructing DGL Graphs with node features and edge lists
          • requirements.txt: Describes Python package requirements of the Amazon SageMaker training instance
          • Contains functions for graph sampling for mini-batch training
          • python entry point used by the notebook for GNN training with DGL mxnet backend
          • python script with utility functions for computing metrics and plots
        • python file to load stack configurations and pass to sagemaker notebook
        • requirements.txt: Describes Python package requirements of the SageMaker notebook instance
        • setup sagemaker-graph-fraud-detection as a python package
      • dgl-fraud-detection.ipynb: Orchestrates the solution. Triggers preprocessing and model training
      • prepare notebook environment with necessary pre-reqs


This project is licensed under the Apache-2.0 License.

Popular Graph Projects
Popular Amazon Projects
Popular Computer Science Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.