Directed Graph Transformer With Dual Attention for Edge Directionality

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional graph transformers fail to effectively capture edge directionality in directed graphs, leading to inconsistencies and performance issues in tasks requiring sophisticated relationship understanding.

Innovation Solution

The Directed Graph Transformer (DiGT) model learns dual encodings for each graph node, capturing its role as a source or target in directed edges, and computes distinct global attention coefficient matrices, integrating edge directionality and graph structure into the transformer architecture.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional graph transformers are used, then the model structure is simple, but the model fails to capture edge directionality leading to poor performance in directed graph classification

Engineering Contradiction:
Improveperformance in directed graph classificationVSAvoidmodel structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the node representation into two distinct vectors: a source vector encoding the node's role as a source and a target vector encoding its role as a target. This segmentation allows the model to separately capture directional information for each role, resolving the contradiction by improving directional capture capability without requiring a completely new architectural framework

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces asymmetric attention mechanisms where source nodes and target nodes have different query and key matrices (Qs, Ks for sources; Qt, Kg for targets). This asymmetry enables the model to differentiate between source and target roles in directed edges, capturing directionality that symmetric models miss while maintaining reasonable structural complexity through targeted modifications

Inventive Principle:
Principle #4Asymmetry

2Measurement precision

If dual encodings and distinct attention matrices are introduced, then edge directionality is captured accurately, but computational complexity increases

Engineering Contradiction:
Improveaccuracy in capturing edge directionalityVSAvoidcomputational complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent uses a universal transformer framework where the same basic transformer components (self-attention, feed-forward networks, residual connections) are applied to both source and target encodings. This multi-functionality approach allows accurate directional capture through dual encodings and distinct attention matrices while avoiding the need to design separate specialized systems, thereby controlling computational complexity growth

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Adaptability or versatility

If the model processes both source and target relationships simultaneously, then comprehensive graph understanding is achieved, but processing time increases

Engineering Contradiction:
Improvecomprehensive relationship understandingVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent computes source and target encodings in parallel during the transformer processing, with both encoding types being updated simultaneously across layers. This preliminary parallel computation of both directional relationships avoids sequential processing delays while achieving comprehensive graph understanding, as the dual encodings are prepared concurrently rather than sequentially

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12572658B2Directed graph transformers
Publication Date: 2026.03.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12572658B2 patent drawing
  • US12572658B2 patent drawing
  • US12572658B2 patent drawing

AI summary

Source and target vectors encode roles of a node in a directed graph as a source and a target role respectively. Source and target query matrices and source and target key matrices are learned based on the directed graph. The source query matrix and the target key matrix are projected and scaled to create a source-target attention matrix and the target query matrix and the source key matrix are projected and scaled to create a target-source attention matrix. The attention matrices are combined to generate a source-target vector-edge encoding and a target-source vector-edge encoding, and are also biased and gated to generate a modified source-target attention matrix and a modified target-source attention matrix, respectively. Source encodings and target encodings are generated using the modified attention matrices. A classification task is performed with respect to the obtained directed graph based on the generated source encodings and the generated target encodings.