Steering Reflections Toward Integers: Fair Compute-and-Forward with Reconfigurable Surfaces

When two radios transmit at once to a relay, their signals add in the air. Physical-layer network coding uses that sum. The relay does not decode either message. It decodes a combination of them, such as their XOR, and broadcasts it back, so a two-way exchange that normally takes four time slots takes two. The general version is compute-and-forward: a relay decodes an integer-weighted sum of lattice codewords, where lattice codes are structured codes in which the sum of two codewords is again a codeword. Its weak point is well known. The decoding rate depends on how close the real, complex-valued channel gains are to some integer vector, and in practice they rarely are. A reconfigurable intelligent surface (RIS) is a panel of passive elements, each of which applies a chosen phase shift to the wave it reflects. Such a surface physically adds a tunable term to every channel. So the surface could be used to push the channels toward integer ratios before the signals reach the relay, rather than only to boost received power.

This note proposes that design, under two constraints that the existing RIS work leaves out. First, a surface tuned for total throughput will favor whichever user pairs already have good channels, which starves the others. The objective must therefore trade throughput against fairness across pairs. Second, a surface applies one phase per element across the whole frequency band, while real wideband channels vary across subcarriers. The alignment must therefore hold on standardized frequency-selective channel models, not only on flat Rayleigh fading. The surface optimization is the core mechanism. Multi-pair two-way relaying is the application. Fairness and realistic channels are the constraints under which the claim has to survive.

Core Claim

In multi-pair two-way relaying, the relay has $M$ antennas and must decode $M$ independent integer combinations of the users' messages. In that setting, choosing RIS phases to directly maximize an α-fair utility of the computation rates gives a better sum-rate versus worst-pair-rate tradeoff than choosing them for received power or mean-squared error (MSE) and then finding integers by lattice reduction. The advantage should persist on 3GPP frequency-selective channels.

The computation rate of Nazer's compute-and-forward (Compute-and-Forward: Harnessing Interference through Structured Codes) for integer vector $\mathbf{a}$ and effective channel $\mathbf{h}(\boldsymbol{\Phi})$ at transmit signal-to-noise ratio $\mathrm{SNR}$ is

$$R(\mathbf{h},\mathbf{a}) = \log_2^{+}\!\left(\frac{1}{\|\mathbf{a}\|^2 - \dfrac{\mathrm{SNR}\,|\mathbf{h}^H\mathbf{a}|^2}{1+\mathrm{SNR}\,\|\mathbf{h}\|^2}}\right),$$

where $\boldsymbol{\Phi}$ is the diagonal matrix of unit-modulus surface phases, and $\mathbf{h}(\boldsymbol{\Phi}) = \mathbf{h}_d + \mathbf{G}\boldsymbol{\Phi}\mathbf{f}$ adds the direct channels $\mathbf{h}_d$ to the surface-reflected cascade ($\mathbf{f}$ is the user-to-surface channel and $\mathbf{G}$ the surface-to-relay channel). The rate grows as $\mathbf{h}$ becomes parallel to $\mathbf{a}$. The surface changes $\mathbf{h}$, so it changes the integer mismatch directly.

Each user's exchange rate is the minimum rate over the equations that involve its message. We maximize $\sum_k U_\alpha(r_k)$ over pairs $k$, where $U_\alpha$ is the standard α-fair utility. Setting α=0 gives sum-rate, α→∞ gives max-min, and sweeping α traces the tradeoff.

Why this is not already done, and where it is honestly limited

The closest work is Wireless Network Coding with Intelligent Reflecting Surfaces. It optimizes surface phases in a butterfly network to minimize relay MSE and derives bit error rates (BER) under flat Rayleigh fading. It does not use integer combinations, fairness, or wideband channels. On the coding side, Compute-Compress-and-Forward handles asymmetric relay networks with lattice quantization and LLL reduction, an algorithm that searches for short integer bases. It takes the channel as given and only adapts the integers after reception. PNC Enabled IIoT handles unequal links with asymmetric lattice levels, also without reshaping the channel. Two papers optimize surfaces for multi-user rates without network coding: Max-Min Fairness for IRS-Assisted Secure Two-Way Communications for full-duplex user pairs, and Weighted Sum-Rate Maximization for Multi-Hop RIS-Aided Multi-User Communications for multi-hop routing. They supply the optimization machinery we reuse, but their objectives contain no integer structure.

There is one honest limitation. With a single-antenna relay and channel knowledge at the transmitters, each user can pre-rotate and scale its own signal so that the two channels arrive as $[1,1]$. In that case the surface adds only received power. The proposal therefore targets the regime where transmitter pre-compensation cannot do the job: one user's signal must match integer vectors at several relay antennas at once, and one lattice codeword spans many subcarriers with different channels. The single-antenna case is kept as a control in which we predict no gain over MSE-tuned surfaces.

Research Program

The system model has $K$ user pairs (we use $K\in\{2,3,4\}$). Each user has one antenna and a per-subcarrier power budget. The relay has $M=K$ antennas, and an $N$-element surface ($N$ from 16 to 64) sits near the weaker users, since Beamforming Design with Fast Convergence for IRS-Aided Full-Duplex Communication reports that placing the surface mid-link suffers severe double path loss. In each multiple-access slot the relay applies a receive filter and decodes $M$ integer equations over the Gaussian integers. In the broadcast slot it forwards them, and users solve for their partners' messages. We study two coding regimes. In the per-subcarrier regime, the integer vectors may differ across subcarriers. In the wideband-codeword regime, one integer matrix must serve all subcarriers. The second regime is where frequency selectivity really bites.

The optimizer alternates over three blocks. The first block holds the surface phases and transmit powers fixed and chooses the integer matrix by LLL reduction followed by a small sphere search, reusing the integer-selection step of compute-compress-and-forward. The second block holds the integers fixed and updates the surface phases by Riemannian gradient ascent on the unit circle. This ascent runs on a smoothed α-fair objective, with a soft-minimum in place of the hard minimum over equations. It is warm-started from the MSE-optimal phases. We also report a variant that uses the closed-form affine-bound update of the fast-convergence full-duplex paper, which brings per-iteration cost down to roughly $O(N^2)$. The third block updates transmit powers by fractional programming, as in the max-min two-way secure paper. When a minimum-rate requirement is imposed, we add an adaptive slack variable in the style of Wireless Power Control via Counterfactual Optimization of Graph Neural Networks, so that infeasible requirements relax rather than starve users. Discrete 1- and 2-bit phases are handled by projection after convergence, following the quantization comparison in Exploiting Intelligent Reflecting Surfaces in NOMA Networks.

Channels are generated in NVIDIA Sionna, using 3GPP TDL-A/B/C profiles at link level, as in Distribution-Free Adaptive Modulation and Coding, and the Urban Micro (UMi) geometry used in PyJama. Sionna's differentiability lets the surface gradients flow through the actual wideband channel tensors. The file does not tell us whether Sionna models surfaces natively. We will therefore build the user-to-surface-to-relay cascade from per-hop geometric channels, as a product of two frequency-selective responses with a frequency-flat phase in between, and state this modeling choice explicitly.

Beyond the information-theoretic rate, we run a practical check. We use QPSK with Gaussian-integer network coding, which works because QPSK is the simplest lattice constellation over $\mathbb{Z}[j]$. We add LDPC coding and measure relay BER and end-to-end goodput. This confirms that rate gains carry over to decoded bits.

Baselines

Random phases (naive reference). The naive reference is a surface with random phases, plus compute-and-forward with LLL integer selection at the relay. Wireless Network Coding with Intelligent Reflecting Surfaces reports that its optimized surface gives an 18 dB gain over random phases at a relay BER of $10^{-2}$, and a three-order-of-magnitude BER reduction with 32 elements. We expect any optimized scheme to clear this floor easily. It serves to calibrate our simulator against that paper's flat-Rayleigh setup before moving to TDL and UMi channels.

MSE/power-tuned surface plus lattice reduction (strongest competitor). The strongest competitor runs the MSE-minimizing phase design of Kafizov et al. (or, equivalently for our purposes, a phase design that maximizes total received SNR). It then selects integers by the LLL procedure of compute-compress-and-forward and allocates power by fractional programming under the same α-fair objective. This is strongest because it already combines a well-optimized surface, the best post-reception integer search, and fairness-aware power control. The only thing it lacks is integer awareness in the surface design. It gets the same channels, the same α, the same number of outer iterations, and the same warm starts. Compute-compress-and-forward reports up to 5 dB sum-rate gain over conventional compute-and-forward. We found no reported result on Lacuna for RIS-aided compute-and-forward computation rate under any fairness criterion, so this baseline's numbers will be produced here. To count as a win, our method must, at matched sum-rate, raise the 5th-percentile pair exchange rate by a margin outside the 95% confidence interval over 500 independent channel drops in the multi-antenna, wideband-codeword regime.

Sum-rate-only joint design. This is our own optimizer at α=0. It represents the greedy design that Naderializadeh et al. show starves edge users: their slack-based method reports a 2740% gain in 5th-percentile rate over WMMSE in dense scenarios.

Orthogonal four-slot relaying with the same surface. Each user is served in its own slot, with the surface tuned per user. This measures what simultaneous transmission is worth once realistic channels are included.

Transmitter pre-compensation without a surface. Users rotate and scale per subcarrier to align at relay antenna 1. This is described below as a direct threat.

Ablation isolating integer awareness. The key ablation swaps only the surface objective, from MSE to computation rate, keeping everything else identical. A second ablation fixes the integer matrix during the surface updates to test whether alternating with the integer search matters.

Why not just…?

Why not just tune the surface for received power or MSE and let lattice reduction pick the integers? This is the main threat, and it may be nearly as good when channels are strong and the relay has one antenna. In that regime, higher SNR shrinks the integer mismatch penalty anyway. The proposal's prediction is narrower. With $M\geq 2$ equations, or one integer matrix across many subcarriers, a power-tuned surface leaves the channel matrix far from any well-conditioned integer matrix, and lattice reduction cannot fix that after reception. The single-objective ablation settles this directly. If the gap in 5th-percentile rate is within noise in the multi-antenna wideband regime, the core claim fails and we will report that.

Why not just let each transmitter pre-rotate and scale its signal so channels arrive as integers? With one relay antenna this works, and we expect it to match the surface-based method there; that is why the case is a control. With several relay antennas, each user controls one complex scalar per subcarrier but must match $M$ entries, so pre-compensation aligns at most one equation. Inverting weak subcarriers also spends power, which hurts the weakest pairs most. The pre-compensation baseline, run at $M=1$ and $M=2,3$, shows where this crossover lies.

Why not just avoid collisions with orthogonal relaying, or use multiuser decoding? Physical-layer network coding halves the slot count (Theory and Applications in Multiuser/Multiterminal Communications). On a software radio testbed, Network-Coded Multiple Access with High-Order Modulations reports QPSK MIMO-NCMA reaching double the throughput of QPSK multiuser decoding at 10 dB SNR. Those gains were measured without frequency-selective multipath and without a surface. The orthogonal baseline on TDL and UMi channels tests whether they survive realistic channels.

Why not just use asymmetric lattice coding for unequal pairs instead of reshaping channels? PNC Enabled IIoT reports 15% throughput over symmetric coding at $K_B=639$ bits for one pair. Asymmetric coding and surface reshaping are complementary, not exclusive. We include asymmetric power levels in the competitor so the comparison does not credit the surface with gains that coding alone provides.

Proposed Experiments

The first decisive check sweeps α from 0 to large values and plots sum-rate against 5th-percentile pair rate. The sweep covers $K\in\{2,3,4\}$, $N\in\{16,32,64\}$, TDL-A/B/C at 3 and 30 km/h, and UMi drops. Each configuration uses 500 independent drops, with surface placement varied between near-user and mid-link. The proposal succeeds if its frontier dominates the MSE-plus-LLL baseline in the multi-antenna wideband-codeword regime, and if it ties that baseline in the single-antenna control. A gain in the control would suggest a bug or an unfair baseline rather than a real effect.

The second check measures how much the frequency-flat surface loses across delay-spread profiles. We compare the shared-integer-matrix and per-subcarrier-integer regimes from TDL-A to TDL-C. The expectation is that integer-aware surface design matters more as delay spread grows, because that is where a single integer matrix fits the subcarriers worst.

The third check confirms rate gains with coded QPSK relay BER and goodput. It also reports 1- and 2-bit phase quantization, and wall-clock convergence relative to channel coherence time. The convergence numbers are compared against the 4 to 10 outer iterations of the max-min two-way secure paper and the roughly 14 accelerated iterations of the fast-convergence full-duplex paper. We will state plainly at which mobility the optimized configuration goes stale before it can be applied.