Delivered architecture / 03
Online retailer · High-volume e-commerce

Return Fraud Detection at Scale

A custom graph neural network that scores return authorizations in-line, with an LLM second opinion reserved for the ambiguous band, all inside a hard VPC Service Controls perimeter with differential privacy on training.

A high-volume e-commerce retailer was losing approximately $40M annually to return fraud: wardrobing, counterfeit item substitution, and coordinated refund abuse through networks of fake accounts.

Rule-based fraud systems are trivially bypassed by anyone who knows a threshold exists. The real problem is behavioral pattern recognition across thousands of simultaneous dimensions where no individual signal is suspicious on its own. That is a graph problem, and the ambiguous cases on top of it are a reasoning problem.

In productionGoogle CloudVertex AIGraph neural networkGemini ProDifferential privacyVPC Service Controls
Cloud
Google Cloud, fully cloud-native
Primary model
Custom GNN on Vertex AI
Escalation model
Gemini Pro, gray-zone only
Perimeter
VPC Service Controls, no egress
The pipeline / End to end

How the system actually runs.

Each stage below is a real component in the deployed pipeline. Stages outlined in teal are control points: the places where the architecture constrains what the model can receive or emit.

01 · Trigger
Return authorization
Returns microservice, synchronous path
02 · Dispatch
Google Eventarc
Calls GNN inference in-line at authorization
03 · Score
GNN on Vertex AI
Accounts, devices, addresses, payment fingerprints
04 · Route
Confidence band split
High confidence decides without LLM involvement
05 · Pseudonymize
PII stripped before escalation
Model never receives raw customer PII
06 · Review
Gemini Pro, gray zone
Narrative risk assessment on ambiguous cases
07 · Return
Strict JSON decision
No free-form output path
Services / The stack

What it runs on.

Google Vertex AI

Hosts both the custom-trained graph neural network inference endpoint and the secondary Gemini Pro analysis endpoint.

Graph neural network, custom-trained

Models relationships across accounts, devices, shipping addresses, payment fingerprints, and return histories simultaneously.

Vertex AI, Gemini Pro

Secondary reviewer for gray-zone GNN confidence scores. Produces a risk narrative and final recommendation for ambiguous cases.

Google Eventarc

Triggers GNN inference synchronously at the point of return authorization through the returns microservice.

BigQuery

Feature store and historical return pattern warehouse.

Google Cloud Storage

Training data and model artifact storage inside the VPC Service Controls security perimeter.

VPC Service Controls

Security perimeter isolating all Vertex AI, BigQuery, and Cloud Storage resources from public internet egress.

Build-out / Architecture

How it is wired.

  1. Fully cloud-native on Google Cloud with no on-premises footprint.
  2. The GNN endpoint is called synchronously through Eventarc at return authorization. High-confidence decisions complete without any LLM involvement, which keeps latency down.
  3. Gray-zone GNN scores, meaning those inside a defined confidence ambiguity band, route automatically to a secondary Gemini Pro call for narrative risk assessment.
  4. The hybrid design is deliberate: the GNN handles speed-sensitive high-confidence cases, the LLM handles nuanced edge cases that need contextual reasoning.
  5. VPC Service Controls create a hard organizational perimeter. No data exits to the public internet across any service in the pipeline.
  6. The GNN training pipeline applies differential privacy guarantees to prevent model inversion attacks from recovering individual customer records from model weights.
Guardrails / Safety

What keeps it inside its contract.

Guardrails were designed in from the start, not added after the fact. Where the system touches untrusted input, a control sits between that input and the model.

Risks / Open

What we still track.

No production AI system is finished. These are the live risks carried by this architecture, documented for the operating team rather than buried.

Outcomes / Post-deployment

What changed.

On numbers. Client identity and any identifying detail are withheld under NDA. Outcomes are stated as direction and materiality rather than as figures we are not free to publish.

Have a problem that rules cannot solve?

Most engagements start with a short, paid R&D sprint so both sides can decide if it is a fit. If we are not the right call, we will say so early.

Start a conversation