Bridging Graph Position Encodings for Transformers with Weighted Graph-Walking Automata