Unverified 2026

Proper binary edge positional encoding for tree GNNs

Implementation & benchmark of arXiv:2608.08438 — Proper $\{a,b\}$-edge-weightings of trees

Usefulness5/10
Difficulty4/10
Novelty7/10

Source paper: Proper $\{a,b\}$-edge-weightings of trees arXiv:2608.08438 ⓘ · analyzed Sep 1, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Precompute a two-valued edge labeling of every input tree so that adjacent vertices have different weighted incident-edge sums. Feed the edge labels and resulting vertex signatures into message passing as deterministic symmetry breakers. This can distinguish branches that otherwise produce identical initial representations without adding trainable parameters or random node identifiers.

Formulas

$$s_\omega(v)=\sum_{e\ni v}\omega(e),\qquad \omega(e)\in\{a,b\},\qquad s_\omega(u)\neq s_\omega(v)\ \text{for every }uv\in E(T).$$
$$S_j=\omega(uv)+(k-j)a+jb.$$
$$S_{j+1}-S_j=b-a\neq 0.$$
$$S_j\neq s_\omega(u),\qquad S_j\neq a\ \text{for }j<k,\qquad S_j\neq b\ \text{for }j>0.$$

Mathematical statement

For a tree T=(V,E), choose distinct real edge weights a,b with ab(a+b) not equal to zero, and assign every edge e a weight omega(e) in {a,b}. Define the weighted degree of vertex v by s_omega(v)=sum over edges e incident to v of omega(e). The assignment is proper when s_omega(u) is not equal to s_omega(v) for every edge uv in E. The paper proves that every tree except K2 admits such an assignment. In the leaf-extension construction, let L be a set of k leaves adjacent to v, let u be the remaining neighbor of v, and suppose omega already labels T-L. If exactly j leaf edges receive b, then the new weighted degree of v is S_j=omega(uv)+(k-j)a+jb. Since S_(j+1)-S_j=b-a is not zero, all candidates are distinct. A candidate is valid when S_j is not equal to s_omega(u), S_j is not equal to a for j less than k, and S_j is not equal to b for j greater than zero. These conditions separate v from its old neighbor and from its new leaf neighbors. For k at least 3, at most three candidates are forbidden, so at least one value of j works. In the neural encoding, use a=1 and b=2, the binary edge bit z_e=omega(e)-1, the incident-edge count q(v)=sum over e incident to v of z_e, and optionally s_omega(v)=d(v)+q(v), where d(v) is the degree of v.

Implementation notes

First, integrate the construction during graph preprocessing, before batching. For every tree, root it arbitrarily and repeatedly identify the current leaves. Store one binary feature z_e on each edge and append d(v), q(v), and optionally s(v) to the initial node feature. Concatenate z_uv to each directed message in the first one or two GNN layers. Use a 3-layer GIN, GraphSAGE, or TreeLSTM so the comparison isolates the positional encoding. Second, construct the labels as follows. For each current leaf batch L adjacent to a surviving vertex v, let u be the other neighbor of v and enumerate j=0,1,...,k. Assign weight 2 to j leaf edges and weight 1 to the other k-j edges. Compute S_j=omega(uv)+(k-j)+2j. Accept the first assignment satisfying S_j != s_omega(u), S_j != 1 when j<k, and S_j != 2 when j>0. Remove the leaves and continue. For k=1 or k=2, try every binary assignment and directly verify all affected adjacent pairs; if a residual conflict remains, backtrack one leaf batch and retry. Finally verify s(u) != s(v) for every edge. The paper supplies the candidate-spacing guarantee and local forbidden-equality test. The implementation estimates no spectral or statistical quantities; it only computes degrees, incident binary counts, and weighted sums. The first experiment should generate random trees with 8 to 64 vertices and targets depending on depth, a distinguished branch, or subtree parity. Train the same GIN with no positional encoding, random fixed edge bits, Laplacian positional features, and the proposed proper labeling, using identical hidden size, optimizer, and parameter count. Evaluate ordinary test accuracy, accuracy after adversarially permuting symmetric branches, and accuracy with 1%, 10%, and 100% of the training data. The expected signal is improved discrimination of locally symmetric branches and higher low-data accuracy than unlabelled and random-edge baselines, with linear-time preprocessing and negligible inference overhead.

Verification

This idea has not been verified yet.

Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.

Artifacts

Artifacts unavailable.