v2 design: independent masks + affinity-aware Wiener demultiplexer

Redesign after the independent-mask dominance finding: the affinity
now parameterizes the receiver (closed-form Wiener) instead of the
mask ensemble. New Theorem 1 (spectral closed form), floors
sqrt(1-b^2)/2 vs 1/2, full-cooperation bound with equality at b=1.
GPU (torch) Monte Carlo backend, decision-directed SIC baseline,
TikZ block diagram source, verification suite V1-V11.
This commit is contained in:
KiHoLee
2026-08-17 02:12:10 +09:00
parent b8b853e62e
commit 358faecc0c
29 changed files with 1777 additions and 1514 deletions
+47 -35
View File
@@ -10,66 +10,78 @@ This repository contains the simulation code, the raw result data, and
the figure files behind every numerical claim in the paper. It is
private during peer review and will be made public upon publication.
The design under test: each user applies an independent Haar
orthogonal mask, and the receiver runs a matched filter followed by
the closed-form affinity-aware Wiener demultiplexer, which harvests
the coherent interference component that the measured pairwise
affinity `beta` predicts. The affinity-blind reference sets `beta = 0`
in the same filter.
## Layout
| Folder | Contents |
|---|---|
| `code/` | Simulation and plotting scripts (Python, CPU only) |
| `code/` | Simulation and plotting scripts (Python) |
| `data/` | Raw results written by the scripts, one CSV per experiment |
| `fig/` | Figure PDFs included in the manuscript |
| `fig/` | Figure PDFs included in the manuscript (`block_diagram_src.tex` is the TikZ source of Fig. 1) |
## Requirements
Python 3.10 or later with `numpy` and `matplotlib`. The Fig. 4
experiment additionally uses `torch` (CPU build is sufficient). No GPU
is required. Every script fixes the seed 2026 and writes its raw output
to `data/`, so plotting is decoupled from simulation.
Python 3.10 or later with `numpy` and `matplotlib`. The Monte Carlo
experiments in `revision_sims_gpu.py`, `fig_real_merged.py`, and
`refine_matched.py` use `torch` (CUDA when available; the scripts fall
back to CPU). All random draws come from the numpy generator with the
fixed seed 2026 — torch only accelerates QR, matrix products, and
linear solves — and every script writes its raw output to `data/`, so
plotting is fully decoupled from simulation.
## Reproducing the figures
Run the scripts from inside `code/`.
Run the scripts from inside `code/`. All plots are rendered from
`data/` only, by `replot_all.py` (Figs. 2, 3, 5, 6, 7) and
`replot_merged.py` (Fig. 4).
| Figure | Content | Script | Data |
| Figure | Content | Simulation | Data |
|---|---|---|---|
| Fig. 2 | Per-user MSE and self-interference floor | `revision_sims.py E1` | `floor_validation.csv` |
| Fig. 1 | System diagram | `latexmk -pdf fig/block_diagram_src.tex` | — |
| Fig. 2 | Per-user MSE, aware vs blind floor | `revision_sims.py E1` | `floor_validation.csv` |
| Fig. 3 | Effective sum rate at the CLIP affinity | `revision_sims.py E7a` | `rate_corrected.csv` |
| Fig. 4 | Cosine recovery on real BERT+ViT pairs | `fig_real_merged.py`, then `refine_matched.py`; replot with `replot_merged.py` | `bertvit_merged.csv` |
| Fig. 5 | Realizable versus genie-aided SIC | `revision_sims.py E2`; replot with `replot_sic.py` | `sic_comparison.csv` |
| Fig. 6 | Affinity sweep and crossover | `revision_sims.py E7a` | `beta_sweep_corrected.csv` |
| Fig. 7 | Multi-user scaling | `revision_sims.py E7c` | `multiuser_corrected.csv` |
Fig. 1 is a system diagram and has no simulation behind it.
| Fig. 4 | Cosine recovery on real BERT+ViT pairs | `fig_real_merged.py`, then `refine_matched.py` | `bertvit_merged.csv` |
| Fig. 5 | Receiver comparison under Rayleigh fading | `revision_sims_gpu.py E2` | `sic_comparison.csv` |
| Fig. 6 | Value of the measured affinity | `revision_sims.py E7a` | `beta_sweep_corrected.csv` |
| Fig. 7 | Multi-user scaling (joint Wiener) | `revision_sims_gpu.py E7c` | `multiuser_corrected.csv` |
Quantities quoted in the text but not plotted come from the same
driver: `revision_sims.py E0` writes `theorem_check.csv` (Theorem 1
constants), `E4` writes `csi_error.csv` (imperfect-CSI robustness), and
`E5` writes `mask_family_rev.csv` (WalshHadamard versus Haar masks).
`revision_sims.py` with no argument runs every experiment.
drivers: `revision_sims.py E0` writes `theorem_check.csv` (Theorem 1
validation across affinities and channel phases),
`revision_sims_gpu.py E3` writes `rayleigh_mse.csv` (unconditional
Rayleigh MSE), `E4` writes `csi_error.csv` (imperfect-CSI
robustness), `E5` writes `mask_family_rev.csv` (WalshHadamard versus
Haar), `E8` writes `mismatch.csv` (affinity mismatch and
quantization), and `E9` writes `cosine_ceiling.csv` (cosine-ceiling
corollary check).
## Verifying the analysis
`verify_math.py` re-derives every closed-form expression in the paper
numerically and prints one PASS/FAIL line per item, covering the
per-realization Gram identity, Theorem 1 and its self-interference
constants, the effective-SINR corollary, the MAC-consistency
proposition, the wideband limit, both crossover conditions, the
affinity-mismatch bound, the CSI-invariance identity, the multi-user
inverse formula, and the WalshHadamard construction. It depends only
on `numpy`.
`verify_math.py` re-derives every closed-form claim numerically and
prints one PASS/FAIL line per item: Theorem 1 at the equal-gain point
and under random channel phases for both users, the aware and blind
error floors and the value-of-affinity ratio, the cosine-ceiling
corollary, the blind-receiver/matched-filter cosine equivalence, the
monotonicity proposition, the full-cooperation bound with its
equality case at `beta = 1`, the finite-SNR MAC-condition boundary,
the exact WalshHadamard closed form, the quadratic mismatch
stationarity, and the dominated floor of the correlated-mask
alternative from the Appendix. It depends only on `numpy`.
## Conventions
The scripts follow the manuscript exactly: unit per-block transmit
energy `E_b = 1` per user, `rho = E_b / sigma_n^2` as the per-block
SNR with per-symbol SNR `rho/d`, complex block-Rayleigh gains unless
the evaluation point `h_u = 1` is stated, real unit-norm embeddings,
and masks drawn fresh from the Haar mixture on every realization.
`fig_real_merged.py` also produces columns for a retrained
attention-based receiver. Those columns are kept in `bertvit_merged.csv`
for completeness but are not used by any figure in the paper.
`revision_sims.py E6` covers a high-affinity combining mode that is
outside the scope of this paper.
the evaluation point `h_u = 1` is stated, real unit-norm embeddings
with the orientation `<e1, e2> = +beta`, and independent Haar masks
drawn fresh on every realization.
## Citation and license