{"id":7219,"date":"2025-10-01T03:09:04","date_gmt":"2025-10-01T03:09:04","guid":{"rendered":"https:\/\/techtrendfeed.com\/?p=7219"},"modified":"2025-10-01T03:09:05","modified_gmt":"2025-10-01T03:09:05","slug":"modernize-fraud-prevention-graphstorm-v0-5-for-real-time-inference","status":"publish","type":"post","link":"https:\/\/techtrendfeed.com\/?p=7219","title":{"rendered":"Modernize fraud prevention: GraphStorm v0.5 for real-time inference"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"\">\n<p>Fraud continues to\u00a0trigger important monetary injury globally, with U.S. shoppers alone shedding $12.5 billion in 2024\u2014a 25% improve from the earlier yr in response to the Federal Commerce Fee. This surge stems not from extra frequent assaults, however from fraudsters\u2019 rising sophistication. As fraudulent actions change into extra advanced and interconnected, typical machine studying approaches fall quick by analyzing transactions in isolation, unable to seize the networks of coordinated actions that characterize trendy fraud schemes.<\/p>\n<p>Graph neural networks (GNNs) successfully deal with this problem by modeling relationships between entities\u2014equivalent to customers sharing units, areas, or fee strategies. By analyzing each community constructions and entity attributes, GNNs\u00a0are efficient at figuring out refined fraud schemes the place perpetrators masks particular person suspicious actions however go away traces of their relationship networks. Nonetheless, implementing GNN-based on-line fraud prevention in manufacturing environments presents distinctive challenges: attaining sub-second inference responses, scaling to billions of nodes and edges, and sustaining operational effectivity for mannequin updates.\u00a0On this publish, we present you easy methods to overcome these challenges utilizing GraphStorm, notably the brand new real-time inference capabilities of GraphStorm v0.5.<\/p>\n<p>Earlier options required tradeoffs between functionality and ease. <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/blogs\/machine-learning\/build-a-gnn-based-real-time-fraud-detection-solution-using-amazon-sagemaker-amazon-neptune-and-the-deep-graph-library\/\" target=\"_blank\" rel=\"noopener noreferrer\">Our preliminary DGL method<\/a> offered complete real-time capabilities however demanded intricate service orchestration\u2014together with manually updating endpoint configurations and payload codecs after retraining with new hyperparameters. This method additionally lacked mannequin flexibility, requiring customization of GNN fashions and configurations when utilizing architectures past relational graph convolutional networks (RGCN). Subsequent <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/blogs\/machine-learning\/build-a-gnn-based-real-time-fraud-detection-solution-using-the-deep-graph-library-without-using-external-graph-storage\/\" target=\"_blank\" rel=\"noopener noreferrer\">in-memory DGL implementations<\/a> lowered complexity however\u00a0encountered scalability limitations with enterprise information volumes. We constructed GraphStorm to bridge this hole, by introducing distributed coaching and high-level APIs that assist simplify GNN growth at enterprise scale.<\/p>\n<p>In <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/blogs\/database\/use-graph-machine-learning-to-detect-fraud-with-amazon-neptune-analytics-and-graphstorm\/\" target=\"_blank\" rel=\"noopener noreferrer\">a latest weblog publish<\/a>, we illustrated GraphStorm\u2019s enterprise-scale GNN mannequin coaching and offline inference functionality and ease. Whereas offline GNN fraud detection can determine fraudulent transactions after they happen\u2014stopping monetary loss requires stopping fraud earlier than it occurs. GraphStorm v0.5\u00a0makes this doable via native real-time inference assist via <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/sagemaker\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon SageMaker AI<\/a>. GraphStorm v0.5\u00a0delivers two improvements: streamlined endpoint deployment that reduces weeks of customized engineering\u2014coding SageMaker entry level recordsdata, packaging mannequin artifacts, and calling SageMaker deployment APIs\u2014to a single-command operation, and standardized payload specification that helps simplify consumer integration with real-time inference companies. These capabilities allow sub-second node classification duties like fraud prevention, empowering organizations to proactively counter fraud risk with scalable, operationally simple GNN options.<\/p>\n<p>To showcase these capabilities, this publish presents a fraud prevention resolution. By this resolution, we present how an information scientist can transition a skilled GNN mannequin to production-ready inference endpoints with minimal operational overhead. In case you\u2019re fascinated about implementing GNN-based fashions for real-time fraud prevention or related enterprise circumstances, you&#8217;ll be able to adapt the approaches introduced right here to create your individual options.<\/p>\n<h2>Answer overview<\/h2>\n<p>Our proposed resolution is a 4-step pipeline as proven within the following determine. The pipeline begins at step 1 with transaction graph export from an internet transaction processing (OLTP) graph database to scalable storage (<a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/s3\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Easy Storage Service (Amazon S3)<\/a> or <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/efs\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon EFS<\/a>), adopted by distributed mannequin coaching in step 2. Step 3 is GraphStorm v0.5\u2019s simplified deployment course of that creates SageMaker\u00a0real-time inference endpoints with one command. After SageMaker AI has deployed the endpoint efficiently, a consumer software integrates with the OLTP graph database that processes stay transaction streams in step 4. By querying the graph database, the consumer prepares subgraphs round to-be predicted transactions, convert the subgraph into standardized payload format, and invoke deployed endpoint for real-time prediction.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-117050 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2025\/09\/25\/ML-19181-Arch.png\" alt=\"Solution Architecture Overview\" width=\"1433\" height=\"830\"\/><\/p>\n<p>To supply concrete implementation particulars for every step within the real-time inference resolution, we exhibit the entire workflow utilizing the publicly obtainable <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.kaggle.com\/competitions\/ieee-fraud-detection\/data\" target=\"_blank\" rel=\"noopener noreferrer\">IEEE-CIS<\/a> fraud detection process.<\/p>\n<p><strong>Notice<\/strong>: This instance makes use of a Jupyter pocket book because the controller of the general four-step pipeline for simplicity. For extra production-ready design, see the structure described in <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/blogs\/machine-learning\/build-a-gnn-based-real-time-fraud-detection-solution-using-amazon-sagemaker-amazon-neptune-and-the-deep-graph-library\/\" target=\"_blank\" rel=\"noopener noreferrer\">Construct a GNN-based real-time fraud detection resolution<\/a>.<\/p>\n<h2>Stipulations<\/h2>\n<p>To run this instance, you want an <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/signin.aws.amazon.com\/signup?request_type=register\" target=\"_blank\" rel=\"noopener noreferrer\">AWS account<\/a>\u00a0that\u00a0the instance\u2019s <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/cdk\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Cloud Improvement Package (AWS CDK)<\/a> code makes use of to create required assets, together with <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/vpc\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Digital Non-public Cloud (Amazon VPC)<\/a>, an <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/neptune\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Neptune database<\/a>, Amazon SageMaker AI,\u00a0<a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/ecr\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Elastic Container Registry (Amazon ECR)<\/a>, Amazon S3, and associated roles and permission.<\/p>\n<p><strong>Notice<\/strong>: These assets incur prices throughout execution (roughly $6 per hour with default settings). Monitor utilization rigorously and evaluate pricing pages for these companies earlier than continuing. Comply with cleanup directions on the finish to keep away from ongoing costs.<\/p>\n<h2>Palms-on instance: Actual-time fraud prevention with IEEE-CIS dataset<\/h2>\n<p>All implementation code for this instance, together with Jupyter notebooks and supporting Python scripts, is accessible in our <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/tree\/master\/neptune-database-graphstorm-online-inference\" target=\"_blank\" rel=\"noopener noreferrer\">public repository<\/a>. The repository offers an entire end-to-end implementation you can instantly execute and adapt in your personal fraud prevention use circumstances.<\/p>\n<h3>Dataset and process overview<\/h3>\n<p>This instance makes use of the IEEE-CIS fraud detection dataset, containing 500,000 anonymized transactions with roughly 3.5% fraudulent circumstances. The dataset contains 392 categorical and numerical options, with key attributes like card varieties, product varieties, addresses, and e-mail domains forming the graph construction proven within the following determine. Every transaction (with an <code>isFraud<\/code>\u00a0label) connects to <em>Card Sort<\/em>, <em>Location<\/em>, <em>Product Sort<\/em>, and <em>Purchaser<\/em> and <em>Recipient<\/em> e-mail area entities, making a heterogeneous graph that allows GNN fashions to detect fraud patterns via entity relationships.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-117052 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2025\/09\/25\/ML-19181-GraphSchema.jpeg\" alt=\"The IEEE transaction graph schema\" width=\"546\" height=\"388\"\/><\/p>\n<p>In contrast to our earlier publish that demonstrated GraphStorm plus <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/neptune\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Neptune Analytics<\/a> for offline evaluation workflows, this instance makes use of\u00a0a Neptune database because the OLTP graph retailer, optimized for the short subgraph extraction required throughout real-time inference. Following the graph design, the tabular IEEE-CIS information is transformed to a set CSV recordsdata appropriate with Neptune database format, permitting direct loading into each the Neptune database and GraphStorm\u2019s GNN mannequin coaching pipeline with a single set of recordsdata.<\/p>\n<h3>Step 0: Setting setup<\/h3>\n<p>Step 0 establishes the working surroundings required for the four-step fraud prevention pipeline. Full setup directions can be found within the implementation repository.<\/p>\n<p>To run the instance resolution, that you must deploy an <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/cloudformation\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS CloudFormation<\/a> stack via the AWS CDK. This stack creates the Neptune DB occasion, the VPC to put it in, and applicable roles and safety teams. It moreover creates a SageMaker AI pocket book occasion, from which you run the instance notebooks\u00a0that include the repository.<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-bash\">git clone https:\/\/github.com\/aws-samples\/amazon-neptune-samples.git\ncd neptune-database-graphstorm-online-inference\/neptune-db-cdk\n# Guarantee you will have CDK put in and have applicable credentials arrange\ncdk deploy<\/code><\/pre>\n<\/p><\/div>\n<p>When deployment is completed (it takes roughly 10 minutes for required assets to be prepared), the AWS CDK prints a couple of outputs, considered one of which is the title of the SageMaker pocket book occasion you utilize to run via the notebooks:<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-code\"># Instance output\nNeptuneInfraStack.NotebookInstanceName = arn:aws:sagemaker:us-east-1:012345678912:notebook-instance\/NeptuneNotebook-9KgSB9XXXXXX<\/code><\/pre>\n<\/p><\/div>\n<p>You may navigate to the SageMaker AI pocket book UI, discover the corresponding pocket book occasion, and choose its <strong>Open Jupyterlab<\/strong> hyperlink to entry the pocket book.<\/p>\n<p>Alternatively, you should use the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/cli\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Command Line Interface (AWS CLI)<\/a> to get a pre-signed URL to entry the pocket book. You will want to switch the <code><notebook-instance-name\/><\/code> with the precise pocket book occasion title.<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-code\">aws sagemaker create-presigned-notebook-instance-url --notebook-instance-name <notebook-instance-name\/><\/code><\/pre>\n<\/p><\/div>\n<p>If you\u2019re within the pocket book occasion internet console, open the primary pocket book, <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/blob\/master\/neptune-database-graphstorm-online-inference\/notebooks\/0-Data-Preparation.ipynb\" target=\"_blank\" rel=\"noopener\">0-Information-Preparation.ipynb<\/a>, to start out going via the instance.<\/p>\n<h3>Step 1: Graph building<\/h3>\n<p>Within the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/blob\/master\/neptune-database-graphstorm-online-inference\/notebooks\/0-Data-Preparation.ipynb\" target=\"_blank\" rel=\"noopener\">Pocket book 0-Information-Preparation<\/a>, you remodel the tabular IEEE-CIS dataset into the heterogeneous graph construction proven within the determine firstly of this part. The offered Jupyter Pocket book extracts entities from transaction options, creating <em>Card Sort<\/em> nodes from card1\u2013card6 options, <em>Purchaser<\/em> and <em>Recipient<\/em> nodes from e-mail domains, <em>Product Sort<\/em> nodes from product codes, and <em>Location<\/em> nodes from geographic info. The transformation establishes relationships between transactions and these entities, producing graph information in Neptune import format for direct ingestion into the OLTP graph retailer. The <code>create_neptune_db_data()<\/code> operate orchestrates this entity extraction and relationship creation course of throughout all node varieties (which takes roughly 30 seconds).<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-python\">GRAPH_NAME\u00a0= \"ieee-cis-fraud-detection\"\nPROCESSED_PREFIX\u00a0= f\".\/{GRAPH_NAME}\"\nID_COLS\u00a0= \"card1,card2,card3,card4,card5,card6,ProductCD,addr1,addr2,P_emaildomain,R_emaildomain\"\nCAT_COLS\u00a0= \"M1,M2,M3,M4,M5,M6,M7,M8,M9\"\n# Lists of columns to maintain from every file\nCOLS_TO_KEEP\u00a0= {\n\u00a0\u00a0 \u00a0\"transaction.csv\": (\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0ID_COLS.break up(\",\")\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0+ CAT_COLS.break up(\",\")\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0+\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0# Numerical options with out lacking values\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0[f\"C{idx}\"\u00a0for\u00a0idx\u00a0in\u00a0range(1, 15)]\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0+ [\"TransactionID\", \"TransactionAmt\", \"TransactionDT\", \"isFraud\"]\n\u00a0\u00a0 \u00a0),\n\u00a0\u00a0 \u00a0\"identification.csv\": [\"TransactionID\", \"DeviceType\"],\n}\n\ncreate_neptune_db_data(\n\u00a0\u00a0 \u00a0data_prefix=\".\/input-data\/\",\n\u00a0\u00a0 \u00a0output_prefix=PROCESSED_PREFIX,\n\u00a0\u00a0 \u00a0id_cols=ID_COLS,\n\u00a0\u00a0 \u00a0cat_cols=CAT_COLS,\n\u00a0\u00a0 \u00a0cols_to_keep=COLS_TO_KEEP,\n\u00a0\u00a0 \u00a0num_chunks=1,\n)<\/code><\/pre>\n<\/p><\/div>\n<p>This pocket book additionally generates the JSON configuration file required by GraphStorm\u2019s <code>GConstruct<\/code> command and executes the graph building course of. This <code>GConstruct<\/code> command transforms the Neptune-formatted information right into a distributed binary graph format optimized for GraphStorm\u2019s coaching pipeline, which partitions the heterogeneous graph construction throughout compute nodes to allow scalable mannequin coaching on industry-scale graphs (measured in billions of nodes and edges). For the IEEE-CIS information, the <code>GConstruct<\/code> command takes 90 seconds to finish.<\/p>\n<p>Within the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/blob\/master\/neptune-database-graphstorm-online-inference\/notebooks\/1-Load-Data-Into-Neptune-DB.ipynb\" target=\"_blank\" rel=\"noopener\">Pocket book\u00a01-Load-Information-Into-Neptune-DB<\/a>, you load the CSV information into the Neptune database occasion (takes roughly 9 minutes), which makes them obtainable for on-line inference. Throughout on-line inference, after choosing a transaction node, you question the Neptune database to get the graph neighborhood of the goal node, retrieving the options of each node within the neighborhood and the subgraph construction across the goal.<\/p>\n<h3>Step 2: Mannequin coaching<\/h3>\n<p>After you will have transformed the info into the distributed binary graph format, it\u2019s time to coach a GNN mannequin. GraphStorm offers command-line scripts to coach a mannequin with out writing code. Within the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/blob\/master\/neptune-database-graphstorm-online-inference\/notebooks\/2-Model-Training.ipynb\" target=\"_blank\" rel=\"noopener\">Pocket book 2-Mannequin-Coaching<\/a>, you\u00a0practice a GNN mannequin utilizing GraphStorm\u2019s node classification command with configuration managed via YAML recordsdata. The baseline configuration defines a two-layer RGCN mannequin with 128-dimensional hidden layers, coaching for 4 epochs with a 0.001 studying charge and 1024 batch measurement, which takes roughly 100 seconds for 1 epoch of mannequin coaching and analysis in an ml.m5.4xlarge occasion. To enhance fraud detection accuracy, the pocket book offers extra superior mannequin configurations just like the command under.<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-code\">!python -m\u00a0graphstorm.run.gs_node_classification \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 --workspace .\/\u00a0\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 --part-config ieee_gs\/ieee-cis.json \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 --num-trainers 1\u00a0\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 --cf ieee_nc.yaml \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 --eval-metric roc_auc \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 --save-model-path .\/model-simple\/\u00a0\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 --topk-model-to-save 1\u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0--imbalance-class-weights 0.1,1.0<\/code><\/pre>\n<\/p><\/div>\n<p>Arguments on this command deal with the dataset\u2019s label imbalance problem the place solely 3.5% of transactions are fraudulent through the use of AUC-ROC because the analysis metric and utilizing class weights. The command additionally saves the best-performing mannequin together with important configuration recordsdata required for endpoint deployment. Superior configurations can additional improve mannequin efficiency via methods like HGT encoders, multi-head consideration, and class-weighted cross entropy loss operate, although these optimizations improve computational necessities. GraphStorm allows these modifications via <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/graphstorm.readthedocs.io\/en\/latest\/cli\/model-training-inference\/configuration-run.html\" target=\"_blank\" rel=\"noopener noreferrer\">run time arguments and YAML configurations<\/a>, lowering the necessity for code modifications.<\/p>\n<h3>Step 3: Actual-time endpoint deployment<\/h3>\n<p>Within the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/blob\/master\/neptune-database-graphstorm-online-inference\/notebooks\/3-GraphStorm-Endpoint-Deployment.ipynb\" target=\"_blank\" rel=\"noopener\">Pocket book 3-GraphStorm-Endpoint-Deployment<\/a>, you deploy the real-time endpoint via GraphStorm v0.5\u2019s simple launch script. The deployment requires three mannequin artifacts generated throughout coaching: the saved mannequin file that incorporates weights, the up to date graph building JSON file with characteristic transformation metadata, and the runtime-updated coaching configuration YAML file. These artifacts allow GraphStorm to recreate the precise coaching configurations and mannequin for constant inference habits. Notably, the up to date graph building JSON and coaching configuration YAML file incorporates essential configurations which can be important for restoring the skilled mannequin on the endpoint and processing incoming request payloads. It&#8217;s essential to make use of the up to date JSON and YAML recordsdata for endpoint deployment.GraphStorm makes use of SageMaker AI convey your individual container (BYOC) to deploy a constant inference surroundings. That you must construct and push the GraphStorm real-time Docker picture to Amazon ECR utilizing the offered shell scripts. This containerized method offers constant runtime environments appropriate with the SageMaker AI managed infrastructure. The Docker picture incorporates the mandatory dependencies for GraphStorm\u2019s real-time inference capabilities on the deployment surroundings.<\/p>\n<p>To deploy the endpoint, you should use the GraphStorm-provided <code>launch_realtime_endpoint.py<\/code> script that helps you collect required artifacts and creates the mandatory SageMaker AI assets to deploy an endpoint. The script accepts the Amazon ECR picture URI, IAM position, mannequin artifact paths, and S3 bucket configuration, mechanically dealing with endpoint provisioning and configuration. By default, the script waits for endpoint deployment to be full earlier than exiting. When accomplished, it prints the title and AWS Area of the deployed endpoint for subsequent inference requests. You will want to switch the fields enclosed by <code>&lt;&gt;<\/code> with the precise values of your surroundings.<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-ruby\">!python ~\/graphstorm\/sagemaker\/launch\/launch_realtime_endpoint.py \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--image-uri <account_id>.dkr.ecr.<aws_region>.amazonaws.com\/graphstorm:sagemaker-endpoint-cpu \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--role arn:aws:iam::<account_id>:position\/<your_role> \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--region <aws_region> \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--restore-model-path <restore-model-path>\/fashions\/epoch-1\/ \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--model-yaml-config-file <restore-model-path>\/fashions\/GRAPHSTORM_RUNTIME_UPDATED_TRAINING_CONFIG.yaml \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--graph-json-config-file <restore-model-path>\/fashions\/data_transform_new.json \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--infer-task-type\u00a0node_classification \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--upload-tarfile-s3 s3:\/\/<cdk-created-bucket> \n\u00a0\u00a0 \u00a0 \u00a0 \u00a0--model-name ieee-fraud-detect<\/cdk-created-bucket><\/restore-model-path><\/restore-model-path><\/restore-model-path><\/aws_region><\/your_role><\/account_id><\/aws_region><\/account_id><\/code><\/pre>\n<\/p><\/div>\n<h3>Step 4: Actual-time inference<\/h3>\n<p>Within the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/blob\/master\/neptune-database-graphstorm-online-inference\/notebooks\/4-Sample-graph-and-invoke-endpoint.ipynb\" target=\"_blank\" rel=\"noopener\">Pocket book 4-Pattern-Graph-and-Invoke-Endpoint<\/a>, you construct a fundamental consumer software that integrates with the deployed GraphStorm endpoint to carry out real-time fraud prevention on incoming transactions. The inference course of accepts transaction information via standardized JSON payloads, executes node classification predictions in a couple of a whole lot of milliseconds, and returns fraud likelihood scores that allow fast decision-making.<\/p>\n<p>An end-to-end inference name for a node that already exists within the graph has three distinct levels:<\/p>\n<ol>\n<li><strong>Graph sampling from the Neptune database<\/strong>. For a given goal node that already exists within the graph, retrieve its k-hop neighborhood with a fanout restrict, that&#8217;s, limiting the variety of neighbors retrieved at every hop by a threshold.<\/li>\n<li><strong>Payload preparation for inference<\/strong>. Neptune returns graphs utilizing <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/tinkerpop.apache.org\/docs\/3.7.4\/dev\/io\/#graphson\" target=\"_blank\" rel=\"noopener noreferrer\">GraphSON<\/a>, a specialised JSON-like information format used to explain graph information. At this step, that you must convert the returned GraphSON to <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/graphstorm.readthedocs.io\/en\/latest\/cli\/model-training-inference\/real-time-inference-spec.html\" target=\"_blank\" rel=\"noopener noreferrer\">GraphStorm\u2019s personal JSON specification<\/a>. This step is carried out on the inference consumer, on this case a SageMaker pocket book occasion.<\/li>\n<li><strong>Mannequin inference utilizing a SageMaker endpoint<\/strong>. After the payload is ready, you ship an inference request to a SageMaker endpoint that has loaded a beforehand skilled mannequin snapshot. The endpoint receives the request, performs any characteristic transformations wanted (equivalent to changing categorical options to one-hot encoding), creates the binary graph illustration in reminiscence, and makes a prediction for the goal node utilizing the graph neighborhood and skilled mannequin weights. The response is encoded to JSON and despatched again to the consumer.<\/li>\n<\/ol>\n<p>An instance response from the endpoint would appear to be:<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-css\">{'status_code': 200,\n\u00a0'request_uid': '877042dbc361fc33',\n\u00a0'message': 'Request\u00a0processed\u00a0efficiently.',\n\u00a0'error': '',\n\u00a0'information': {\n\u00a0\u00a0 \u00a0'outcomes': [\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0{\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0'node_type': 'Transaction',\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0'node_id': '2991260',\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0'prediction': [0.995966911315918, 0.004033133387565613]\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0}\n\u00a0\u00a0 \u00a0 \u00a0 \u00a0]\n\u00a0\u00a0 \u00a0}\n}<\/code><\/pre>\n<\/p><\/div>\n<p>The info of curiosity for the one transaction you made a prediction for are within the <code>prediction<\/code> key and corresponding <code>node_id<\/code>. The prediction offers you the uncooked scores the mannequin produces for sophistication 0 (reliable) and sophistication 1 (fraudulent) on the corresponding 0 and 1 indexes of the <code>predictions<\/code> listing. On this instance, the mannequin marks the transaction as most probably reliable. You will discover the total GraphStorm response specification within the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/graphstorm.readthedocs.io\/en\/latest\/cli\/model-training-inference\/real-time-inference-spec.html#specification-of-response-body-contents\" target=\"_blank\" rel=\"noopener noreferrer\">GraphStorm documentation<\/a>.<\/p>\n<p>Full implementation examples, together with consumer code and payload specs, are offered within the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/tree\/master\/neptune-database-graphstorm-online-inference\" target=\"_blank\" rel=\"noopener noreferrer\">repository<\/a> to information integration with manufacturing programs.<\/p>\n<h2>Clear up<\/h2>\n<p>To cease accruing prices in your account, that you must delete the AWS assets that you simply created with the AWS CDK on the Setting Setup step.<\/p>\n<p>You <em>should<\/em> first delete the SageMaker endpoint created through the Step 3 for <code>cdk destroy<\/code> to finish.\u00a0See the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/realtime-endpoints-delete-resources.html\" target=\"_blank\" rel=\"noopener noreferrer\">Delete Endpoints and Assets<\/a> for extra choices to delete an endpoint. When accomplished, you&#8217;ll be able to run the next from the repository\u2019s root:<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-code\">cd\u00a0neptune-database-graphstorm-online-inference\/neptune-db-cdk\ncdk destroy<\/code><\/pre>\n<\/p><\/div>\n<p>See the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/ref-cli-cmd-destroy.html\" target=\"_blank\" rel=\"noopener noreferrer\">AWS CDK docs<\/a> for extra details about easy methods to use <code>cdk destroy<\/code>, or see the CloudFormation docs for easy methods to <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/docs.aws.amazon.com\/AWSCloudFormation\/latest\/UserGuide\/cfn-console-delete-stack.html\" target=\"_blank\" rel=\"noopener noreferrer\">delete a stack from the console UI<\/a>.\u00a0By default, the <code>cdk destroy<\/code> command doesn&#8217;t delete the mannequin artifacts and processed graph information saved within the S3 bucket through the coaching and deployment course of. You could take away them manually. See <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/delete-bucket.html\" target=\"_blank\" rel=\"noopener noreferrer\">Deleting a common function bucket<\/a> for details about easy methods to empty and delete an S3 bucket the AWS CDK has created.<\/p>\n<h2>Conclusion<\/h2>\n<p>Graph neural networks deal with advanced fraud prevention challenges by modeling relationships between entities that conventional machine studying approaches miss when analyzing transactions in isolation. GraphStorm v0.5\u00a0helps simplify deployment of GNN real-time inference with one command for endpoint creation that beforehand required coordination of a number of companies and a standardized payload specification that helps simplify consumer integration with real-time inference companies. Organizations can now deploy enterprise-scale fraud prevention endpoints via streamlined instructions that cut back customized engineering from weeks to single-command operations.<\/p>\n<p>To implement GNN-based fraud prevention with your individual information:<\/p>\n<ul>\n<li>Overview the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/graphstorm.readthedocs.io\/en\/latest\/\" target=\"_blank\" rel=\"noopener noreferrer\">GraphStorm documentation<\/a> for mannequin configuration choices and deployment specs.<\/li>\n<li>Adapt this IEEE-CIS instance to your fraud prevention dataset by modifying the graph building and have engineering steps utilizing the entire supply code and tutorials obtainable in our <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/github.com\/aws-samples\/amazon-neptune-samples\/tree\/master\/neptune-database-graphstorm-online-inference\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub repository<\/a>.<\/li>\n<li>Entry step-by-step implementation steering to construct production-ready fraud prevention options with GraphStorm v0.5\u2019s enhanced capabilities utilizing your enterprise information.<\/li>\n<\/ul>\n<hr\/>\n<h3>In regards to the authors<\/h3>\n<p style=\"clear: both\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-4649 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2025\/09\/25\/ML-19181-Jian.png\" alt=\"\" width=\"100\" height=\"125\"\/><strong>Jian Zhang<\/strong>\u00a0is a Senior Utilized Scientist who has been utilizing machine studying methods to assist clients resolve numerous issues, equivalent to fraud detection, ornament picture technology, and extra. He has efficiently developed graph-based machine studying, notably graph neural community, options for purchasers in China, the US, and Singapore. As an enlightener of AWS graph capabilities, Zhang has given many public displays about GraphStorm, the GNN, the Deep Graph Library (DGL), Amazon Neptune, and different AWS companies.<\/p>\n<p style=\"clear: both\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-4649 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2025\/09\/25\/ML-19181-Theo.jpeg\" alt=\"\" width=\"100\" height=\"125\"\/><strong>Theodore Vasiloudis<\/strong>\u00a0is a Senior Utilized Scientist at AWS, the place he works on distributed machine studying programs and algorithms. He led the event of GraphStorm Processing, the distributed graph processing library for GraphStorm and is a core developer for GraphStorm. He acquired his PhD in Laptop Science from KTH Royal Institute of Know-how, Stockholm, in 2019.<\/p>\n<p style=\"clear: both\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-4649 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2025\/09\/25\/ML-19181-Xiang.jpeg\" alt=\"\" width=\"100\" height=\"125\"\/><strong>Xiang Music<\/strong>\u00a0is a Senior Utilized Scientist at AWS AI Analysis and Training (AIRE), the place he develops deep studying frameworks together with GraphStorm, DGL, and DGL-KE. He led the event of Amazon Neptune ML, a brand new functionality of Neptune that makes use of graph neural networks for graphs saved in graph database. He&#8217;s now main the event of GraphStorm, an open supply graph machine studying framework for enterprise use circumstances. He acquired his PhD in laptop programs and structure on the Fudan College, Shanghai, in 2014.<\/p>\n<p style=\"clear: both\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-4649 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2025\/09\/25\/ML-19181-Florain.jpeg\" alt=\"\" width=\"100\" height=\"125\"\/><strong>Florian Saupe<\/strong>\u00a0is a Principal Technical Product Supervisor at AWS AI\/ML analysis supporting science groups just like the graph machine studying group, and ML Techniques groups engaged on massive scale distributed coaching, inference, and fault resilience. Earlier than becoming a member of AWS, Florian lead technical product administration for automated driving at Bosch, was a method guide at McKinsey &amp; Firm, and labored as a management programs and robotics scientist\u2014a area by which he holds a PhD.<\/p>\n<p style=\"clear: both\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-117054 size-thumbnail alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2025\/09\/25\/ML-19181-Ozan-100x133.jpeg\" alt=\"\" width=\"100\" height=\"133\"\/><strong>Ozan Eken<\/strong>\u00a0is a Product Supervisor at AWS, keen about constructing cutting-edge Generative AI and Graph Analytics merchandise. With a give attention to simplifying advanced information challenges, Ozan helps clients unlock deeper insights and speed up innovation. Exterior of labor, he enjoys making an attempt new meals, exploring totally different nations, and watching soccer.<\/p>\n<p>       \n      <\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Fraud continues to\u00a0trigger important monetary injury globally, with U.S. shoppers alone shedding $12.5 billion in 2024\u2014a 25% improve from the earlier yr in response to the Federal Commerce Fee. This surge stems not from extra frequent assaults, however from fraudsters\u2019 rising sophistication. As fraudulent actions change into extra advanced and interconnected, typical machine studying approaches [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":7221,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[968,5647,1028,1547,1764,1730,5648],"class_list":["post-7219","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-fraud","tag-graphstorm","tag-inference","tag-modernize","tag-prevention","tag-realtime","tag-v0-5"],"_links":{"self":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/7219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7219"}],"version-history":[{"count":1,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/7219\/revisions"}],"predecessor-version":[{"id":7220,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/7219\/revisions\/7220"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/media\/7221"}],"wp:attachment":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- This website is optimized by Airlift. Learn more: https://airlift.net. Template:. Learn more: https://airlift.net. Template: 69d9690a190636c2e0989534. Config Timestamp: 2026-04-10 21:18:02 UTC, Cached Timestamp: 2026-05-06 16:44:49 UTC -->