Di-Cayley two-stream spectral layer
Implementation & benchmark of arXiv:2608.27231 — On di-Cayley graphs and their spectrum
Source paper: On di-Cayley graphs and their spectrum arXiv:2608.27231 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Represent tokens or nodes as two feature streams indexed by a finite group G, and replace dense pairwise mixing by a learned di-Cayley operator with within-stream and cross-stream connections. In the Fourier or irreducible-representation basis, each group frequency is processed independently by a small block matrix, giving exact translation or group equivariance and O(|G| log |G|) mixing for cyclic groups.
Formulas
Mathematical statement
A Cayley graph on a group G with connection set S has an arc from u to v when vu^{-1} is in S; its adjacency operator is group convolution by the indicator of S. The paper computes spectra using irreducible representations ρ of G. For a two-part graph with within-part connection set S and cross-part connection set T, the local spectral block is M_ρ = [[ρ(S), ρ(T)], [ρ(T)*, ρ(S)]], where ρ(S) = sum over s in S of ρ(s), ρ(T) = sum over t in T of ρ(t), and * denotes conjugate transpose. Each eigenvalue of M_ρ is repeated according to the representation dimension d_ρ. For an abelian group such as G = Z_n, every irreducible representation is the scalar character χ_k(g) = exp(2π i k g/n), so M_k is a 2 by 2 matrix. The neural adaptation replaces fixed connection sums by learned channel matrices L_k, R_k, and T_k, using the two-stream block update [H_L'_k; H_R'_k] = σ([[L_k,T_k],[T_k*,R_k]][H_L_k;H_R_k]). Because group convolution diagonalizes into these representation blocks, the resulting linear layer commutes with simultaneous group shifts.
Implementation notes
(1) Integration point: insert this layer where a model performs spatial token mixing, graph message passing, or attention over positions arranged on a cycle, torus, periodic grid, or another known finite-group orbit. Maintain two tensors H_L and H_R with shape [batch, |G|, channels], representing two node types, parity classes, orientations, or alternating token streams. The MVP uses G = Z_n and replaces an n by n attention or graph-mixing matrix.
(2) Pseudocode:
input HL, HR: [batch, n, d]
ZL = FFT(HL, axis=position)
ZR = FFT(HR, axis=position)
for k in 0,...,n-1:
qL = L[k] @ ZL[:, k, :] + T[k] @ ZR[:, k, :]
qR = conj(T[k]).T @ ZL[:, k, :] + R[k] @ ZR[:, k, :]
ZL[:, k, :], ZR[:, k, :] = activation(qL), activation(qR)
HL2 = real(IFFT(ZL, axis=position))
HR2 = real(IFFT(ZR, axis=position))
return (HL, HR) + alpha * (HL2, HR2)
Initialize L[k] and R[k] near identity and T[k] near zero. To guarantee real outputs, tie conjugate frequencies: L[n-k] = conjugate(L[k]), R[n-k] = conjugate(R[k]), and T[n-k] = conjugate(T[k]).
(3) Computed directly from the paper's mathematics: the two-stream block form, the Fourier character basis, and independent processing of representation modes. Learned empirically: L[k], R[k], T[k], the retained frequency set, and residual scale alpha. A fixed-connection baseline can use L[k] = sum over s in S_l of χ_k(s), R[k] = sum over s in S_r of χ_k(s), and T[k] = sum over t in S_m of χ_k(t), before allowing these coefficients to become channel matrices. For nonabelian groups, replace FFT by a group Fourier transform and use one block per irreducible representation.
(4) First cheap experiment: train a small sequence model on length-128 cyclic classification tasks, such as deciding whether two marked symbols have a specified modular separation. Compare a standard Transformer encoder, a dense graph-convolution baseline, and this spectral layer at matched parameter count. Measure validation accuracy, loss versus wall-clock time, peak memory, and equivariance error E = ||f(shift_a H) - shift_a f(H)||_2 / ||f(H)||_2. Then test a periodic-grid image or molecular-ring benchmark. The expected signal is equivariance error near numerical precision, O(n log n) position mixing instead of O(n^2), lower memory, and equal or better accuracy on tasks respecting cyclic structure. On unstructured data, the method should not beat attention and may underfit.
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.