Bridging Expert Rules and Graph Data for Financial Anomaly Detection

Bridging Expert Rules and Graph Data for Financial Anomaly Detection

The scarcity and high cost of expert-verified ground-truth annotations create a significant barrier for supervised machine learning in blockchain forensics. As of 2026, the rapid expansion of decentralized financial architectures and the increasing sophistication of cyber-enabled financial crimes have forced a paradigm shift in how institutions approach risk management. Traditionally, fraud detection relied on static, rule-based systems that, while interpretable, were easily bypassed by adaptive adversaries who understood the specific thresholds used for flagging transactions. Graph Neural Networks (GNNs) emerged as a potential solution due to their ability to model the complex web of interactions within blockchain ledgers, yet their dependence on massive, labeled datasets remains a bottleneck. The high cost of forensic experts, coupled with the volume of daily transactions, makes it impossible to annotate every suspicious node. This environmental reality necessitates a hybrid approach that can leverage the existing logic of expert-crafted heuristics while utilizing the powerful feature extraction capabilities of neural architectures to detect anomalies that traditional rules would miss.

Architectural Framework

Modeling Expert Logic via the Rule Branch

The dual-branch architecture begins its process by formalizing the often-intuitive knowledge of financial investigators through a dedicated rule branch. Rather than treating expert rules as simple filters, the system uses them to construct a logical foundation that informs the neural network. This is achieved by training adaptive-depth decision trees on small subsets of available data to capture the most discriminative heuristic patterns. When a transaction is processed, it follows a specific root-to-leaf path through the tree based on its features, such as transaction volume, frequency, or the historical risk profile of the participating wallets. By grouping transactions that follow identical logical paths into cliques, the model transforms discrete human logic into a structured “rule graph.” This graph acts as a high-level map of expert reasoning, where nodes are connected not by their direct financial interactions, but by the fact that they satisfy the same set of forensic criteria. This structural approach ensures that the model respects the nuanced “if-then” conditions established by compliance officers.

Once the rule graph is established, the framework employs graph convolution techniques to refine these logical groupings. Each clique of transactions that shares a decision path is treated as a community, and the model performs group-mean aggregation to distill these clusters into representative embeddings. These embeddings are then used to define class prototypes for both licit and illicit behaviors. By creating these structural anchors, the rule branch provides a clear, rule-derived target for the rest of the learning process. This method moves beyond simple pseudo-labeling, which often ignores the hierarchy of decision-making, and instead preserves the relational context of why a certain transaction was flagged. The resulting prototypes serve as “idealized” versions of legal and fraudulent behavior according to current regulations, providing a stable reference point that remains interpretable to human auditors. This ensures that the system’s eventual predictions are not just accurate but are also grounded in the actual logic used by the institution’s forensic department.

Feature Encoding through the Data Branch

Operating in parallel with the rule-based logic, the data branch focuses on the raw, high-dimensional attributes of the transactions and their immediate topological neighborhood. This branch utilizes a Multi-Layer Perceptron (MLP) to project raw transaction data—such as timestamps, gas prices, and output values—into a dense, continuous embedding space. Unlike traditional graph-based methods that might immediately mix these features through message-passing over transaction edges, this framework deliberately keeps the initial encoding separate. By doing so, it prevents the data-driven features from being prematurely influenced by the connectivity of the graph, which can often be misleading in the early stages of training. This “data-first” approach allows the model to capture the intrinsic characteristics of a transaction before it is influenced by its neighbors or the expert rules. It provides a clean, unbiased representation of the network’s activity, which is essential for identifying novel types of fraud that have not yet been codified into rules.

The separation of the data branch is a strategic design choice intended to preserve the unique “signal” present in the raw data. While the rule branch captures known patterns, the data branch is designed to be sensitive to the subtle statistical anomalies that often precede the formal definition of new fraud types. To enhance this sensitivity, the branch incorporates structural vectors that describe the local neighborhood of each node, such as the degree of the wallet or its proximity to known exchanges. These vectors are fused with the transaction attributes to create a comprehensive profile for every node in the network. By maintaining this distinction between the expert-defined rule space and the raw feature space, the framework creates a productive tension between what is known to be fraudulent and what appears to be anomalous. This balance is critical for 2026-era financial systems, where the speed of innovation in decentralized finance often outpaces the ability of regulators to write new rules, requiring a system that can learn from data while still being guided by established expertise.

Alignment and Refinement

Bridging Representations with Optimal Transport

The most significant technical challenge in this dual-branch system is the semantic gap between the discrete, logical structures of the rule branch and the continuous, high-dimensional embeddings of the data branch. To bridge this gap, the framework utilizes the mathematical principles of Optimal Transport (OT), a method traditionally used to find the most efficient way to transform one probability distribution into another. In this context, OT is used to align the empirical distribution of the continuous transaction embeddings with the discrete distribution of the rule-based prototypes. By applying the Kantorovich formulation and the Sinkhorn algorithm, the model calculates a transport plan that minimizes the total cost of mapping data points to their most logical class prototypes. This cost is determined by the distance between the two representation spaces, ensuring that transactions with features most similar to expert-defined fraud patterns are mapped to the illicit prototype with high probability. This global optimization strategy is far more robust than simple local similarity measures, as it considers the entire structure of the dataset.

The result of this alignment process is the generation of highly reliable, probabilistic pseudo-labels for unlabeled transactions. Because the Optimal Transport mechanism accounts for the global distribution of the data, it effectively transfers the structured knowledge from the rule branch into the data branch without requiring a massive labeled training set. This creates a supervised learning environment where the “teacher” is a combination of expert rules and mathematical optimization rather than a human annotator. This alignment serves as a bridge that allows the neural network to understand the context of the rules it is following. For example, a transaction that looks suspicious based on its raw data but does not perfectly fit a predefined rule can still be correctly categorized if the OT plan determines that its global distribution is closer to the illicit prototype. This synergy allows the model to maintain the high precision of expert rules while gaining the broad generalization capabilities of deep learning, creating a system that is both grounded in law and flexible in its execution.

Mitigating Noise with Contrastive Learning

Weak supervision is fundamentally sensitive to the quality of the rules used to guide the learning process; if a heuristic rule is too broad or outdated, it can introduce noise that misleads the neural network. To prevent this, the framework incorporates a dynamic noise-reduction mechanism centered on median-based confidence filtering. During the training phase, the system evaluates the assignment confidence for every unlabeled transaction generated by the Optimal Transport plan. It then calculates a dynamic threshold based on the median confidence scores within the current batch. Transactions that fall below this threshold are considered uncertain and are excluded from the refinement process, ensuring that the model does not learn from ambiguous or potentially incorrect labels. This selective learning strategy is vital for maintaining high accuracy in the noisy, high-volume environment of modern electronic banking, where legitimate transactions can often mimic fraudulent patterns at a surface level.

For the transactions that pass this confidence filter, the framework applies a cross-branch contrastive learning objective to further sharpen the decision boundaries. Contrastive learning works by forcing the embeddings of transactions assigned to the same class to move closer together in the representation space, while simultaneously pushing the embeddings of transactions from opposing classes further apart. This process increases intra-class compactness and inter-class separation, making the final classification task significantly easier and more accurate. By applying this loss only to the most reliable assignments, the system effectively cleans the signals it receives from the rule branch. This refinement stage is where the model truly moves beyond the limitations of its initial rules, learning to recognize the core essence of what constitutes an anomaly. This results in a classifier that is not only robust against the errors inherent in heuristic rules but is also capable of identifying near-miss frauds that a human expert might have overlooked, thereby significantly reducing the frequency of both false positives and false negatives.

Empirical Results and Performance

Benchmarking against Financial Datasets

The efficacy of the rule-graph alignment framework was demonstrated through extensive testing on several high-stakes datasets, most notably the Elliptic Bitcoin dataset and the Libra Bank dataset. In the Elliptic dataset, which involves hundreds of thousands of nodes representing real-world cryptocurrency transactions, the model achieved an Area Under the Precision-Recall (AUPR) curve of 0.687. This performance represented a substantial improvement over standard Graph Neural Network baselines, which often struggled with extreme class imbalance where less than 10% of transactions are actually illicit. The model’s success in these environments proved that the integration of expert rules provides a necessary prior that helps the network focus on the most relevant features. Furthermore, the framework’s ability to maintain high precision even in the face of missing labels confirmed its value for organizations that lack the resources for exhaustive manual data annotation. The results indicated that the model is particularly adept at identifying the subtle layering techniques used in blockchain-based money laundering.

Beyond traditional financial transfers, the model was also validated on non-financial graph data, such as the Amazon e-commerce interaction graph. In this scenario, the task was to identify fraudulent reviewers and suspicious account behavior. The framework reached an AUPR of 0.905, outperforming specialized anomaly detection models that do not utilize the dual-branch rule alignment strategy. This versatility is a key finding, suggesting that the logic of aligning expert rules with graph data is a universal principle that can be applied to any relational dataset governed by heuristic constraints. Whether detecting capital flight in a private banking network or identifying bot accounts on a social media platform, the ability to ground a data-driven model in structured domain knowledge consistently led to superior results. These empirical benchmarks provided the necessary evidence to support the wider adoption of weakly supervised alignment models in industrial settings where data privacy and label scarcity are constant challenges.

Future Outlook: Scalability and Real-Time Systems

The framework demonstrated not only high accuracy but also impressive computational efficiency, which is a prerequisite for deployment in 2026’s high-speed financial markets. With an inference latency measured at approximately 8.14 milliseconds on standard commercial-grade hardware, the system proved capable of handling the transaction throughput required by global exchanges and central banks. This speed ensures that suspicious activity can be flagged and potentially blocked before illicit funds are moved out of reach, a critical capability for effective law enforcement. However, researchers also identified areas for continued development, particularly regarding the scalability of the Optimal Transport mechanism. While the Sinkhorn algorithm is efficient, the construction of massive cost matrices for graphs with billions of nodes remains a hardware-intensive task. Future technical directions will likely explore the use of low-rank transport solvers and distributed computing architectures to further reduce the overhead of the alignment phase.

The synthesis of this research pointed toward a future where financial forensics is a collaborative effort between human intuition and machine intelligence. By moving away from the paradigm of flat, independent pseudo-labels and toward a model of structured rule-graph alignment, the framework provided a more transparent and resilient solution for detecting financial crime. Practical next steps for institutions involve the integration of multi-modal data—such as connecting transaction graphs with natural language processing of communication logs—to provide even deeper context for the rule branch. Furthermore, the development of cross-institutional learning protocols could allow banks to share the structural logic of fraud detection without exposing the underlying sensitive data of their clients. This research successfully laid the groundwork for a new generation of anomaly detection systems that are more than just black boxes; they are logical extensions of human expertise, capable of operating at the scale and speed of the modern digital economy.

Subscribe to our weekly news digest.

Join now and become a part of our fast-growing community.

Invalid Email Address
Thanks for Subscribing!
We'll be sending you our best soon!
Something went wrong, please try again later