Transform-Domain Quantized Edge Attention
Implementation & benchmark of arXiv:2607.14834 — Lossy compression of weighted graph adjacency matrices by transform coding
Source paper: Lossy compression of weighted graph adjacency matrices by transform coding arXiv:2607.14834 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Compress a trained graph-attention model's edge-dependent logits or gates in the line-graph Fourier domain. Smooth edge values become concentrated in low-frequency coefficients, allowing low-frequency coefficients to retain more precision while high-frequency residuals use fewer bits or are discarded.
Formulas
Mathematical statement
For a graph with \(N\) vertices and \(M\) edges, use the incidence matrix \(\tilde{\mathbf B}\) with \([\tilde{\mathbf B}]_{i\alpha}=1\) when edge \(\alpha\) touches vertex \(i\). The line-graph adjacency is \(\mathbf A_L=\tilde{\mathbf B}^{\top}\tilde{\mathbf B}-2\mathbf I_M\), and its Laplacian is \(\mathbf L_L=\mathbf D_L-\mathbf A_L\), with \(\mathbf D_L=\operatorname{diag}(\mathbf A_L\mathbf 1_M)\). Spectral decomposition gives \(\mathbf L_L=\mathbf U_L\boldsymbol\Lambda_L\mathbf U_L^{\top}\). For an edge-logit vector \(a\in\mathbb R^M\), define transform coefficients \(\hat a=\mathbf U_L^{\top}a\) and reconstruction \(a=\mathbf U_L\hat a\). Its line-graph smoothness is \(a^{\top}\mathbf L_La=\sum_{k=0}^{M-1}\lambda_k\hat a_k^2\), so smooth edge logits should have most energy at small eigenvalues. Quantize coefficient \(k\) with step \(\Delta_k\): \(q_k=\operatorname{round}(\hat a_k/\Delta_k)\), then reconstruct \(\tilde a=\mathbf U_L(q\odot\boldsymbol\Delta)\). A frequency-dependent schedule such as \(\Delta_k=\Delta_0(1+\rho\lambda_k/\lambda_{\max})\) allocates fewer bits to high-frequency modes.
Implementation notes
1. Integration point: apply this offline to the edge-attention bias, scalar gate, or relation-dependent logit vector produced by a trained GNN or GAT. For each graph, collect the vector \(a\) whose entry \(a_\alpha\) is used in the attention score for edge \(\alpha\). Keep sparse topology lossless, but replace the raw FP16 or FP32 edge vector with quantized transform coefficients. 2. Pseudocode: construct B and sparse \(L_L\); compute the first \(r\) low-frequency eigenvectors with Lanczos; calculate \(\hat a=U_r^Ta\); set \(\Delta_k=\Delta_0(1+\rho\lambda_k/\lambda_{\max})\); encode \(q_k=\operatorname{round}(\hat a_k/\Delta_k)\) using arithmetic or Huffman coding; decode and reconstruct \(\tilde a=U_r(q\odot\Delta)\); insert \(\tilde a_\alpha\) into the unchanged attention softmax. 3. Compute the line graph, spectrum, and smoothness from the paper's mathematics. Estimate \(\Delta_0\) from calibration data as the 99th percentile of low-frequency coefficient magnitudes divided by the desired integer range, and select \(\rho\) using a small rate-distortion grid search. Include the storage cost of \(U_r\) in bitrate measurements. 4. First experiment: use a 2-4 layer GAT on OGB-Arxiv, Reddit, and a synthetic clustered graph. Compare raw FP16 storage, per-edge int8 quantization, and transform coding at equal accuracy. Measure bits per edge, peak memory, attention KL divergence, accuracy, and latency. Success means at least 2x lower edge-logit storage with no more than 0.5 percentage point accuracy loss.
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.