Skip to content

StrikeTwice: Reusable Graph Representations for Path Prediction

Gwenn Guichaoua, Elodie Laine

cs.AI

Abstract

Graph-path learning predicts properties of ordered paths in shared graphs, with applications in network routing and biology. We advocate caching graph representations to amortize encoding costs across path queries. We introduce the Edge-Vertex Transformer (EVT), a graph encoder coupling vertex and pair states through configurable interactions, with direction-aware triangular attention to compose pairwise relations. For graph-path learning, we introduce StrikeTwice, which connects reusable graph encodings to path processors by ordered selection of vertex and pair states, preserving path order and repeated visits. Our main theoretical contribution is relative universality for EVT and for StrikeTwice with EVT at both stages. On compact domains, EVT uniformly approximates exactly the continuous vertex- and pair-level predictions determined by stable bidirectional two-dimensional folklore Weisfeiler-Leman (2-FWL) colors, and StrikeTwice exactly those for path occurrences and their ordered pairs determined by graph size, path length and the ordered table of pair colors along the path. For each target and accuracy, one parameter set serves all admissible graph and path sizes. For stable 2-FWL profiles, jointly reading each vertex's relations to all path positions strictly increases distinguishability over ordered selection, and marking path positions before graph encoding strictly increases it further. We then build a benchmarking suite combining controlled synthetic tasks, ThorAxe-Combo, a curated splicing benchmark, and temporal routing measurements from RIPE Atlas. Through ablations and real-data comparisons, we examine how the graph encoder, path processor and query interface affect predictive performance at finite capacity and training budget. We also measure computational costs and the savings from cache reuse, including the initial encoding cost.

Create a lesson

Metadata

Categories
cs.AI, cs.LG