Structured key family as the main configuration
Unconstrained key training converged to disjoint sparse supports: 99 percent of each users key energy sat on three or four of the sixteen entries, with pairwise disjoint supports and one numerically dead codebook column. That is an orthogonal slot allocation, so the superposition collapsed into OMA and the key space was far smaller than the dense direction the brute-force study assumes. The main configuration is now the structured Walsh-Hadamard family, which is dense, exactly orthogonal, unit modulus, and already the best family in the key-family table. base_keys generalizes to any key length by truncating the next power-of-two Sylvester order, and the key-length sweep keeps only lengths where the truncated rows stay exactly orthogonal, verified numerically. Also fixes the M-PAM energy normalization in oma_ser_keylen, which used sqrt(6g/(M^2-1)) where unit average symbol energy gives A^2=3/(M^2-1); the closed form was 3 dB optimistic and now reproduces a direct Monte Carlo to 1e-5. Results move accordingly: the proposal now stays below OMA at every SNR and reaches 1.52x at key length 64, while the jamming margin falls to 5.5-6.3 dB and the brute-force curve to 0.59 at a million guesses.
This commit is contained in:
+11
-5
@@ -24,7 +24,7 @@ import numpy as np
|
||||
import torch
|
||||
|
||||
from sse_lib import write_csv, set_seed, DATA, DEVICE
|
||||
from exp_full import get_model, eval_scheme_permuted_eve, rayleigh_gain
|
||||
from exp_full import main_model, eval_scheme_permuted_eve, rayleigh_gain
|
||||
|
||||
try:
|
||||
from scipy.optimize import linear_sum_assignment
|
||||
@@ -44,12 +44,18 @@ except ImportError: # greedy fallback
|
||||
|
||||
COLLECT_DB = 20.0
|
||||
DECODE_DB = 10.0
|
||||
TRIALS = 20
|
||||
EVAL_FRAMES = 100_000
|
||||
# The curve's variance is dominated by WHICH positions the recovered
|
||||
# permutation gets wrong, not by the SER estimate inside one trial: the
|
||||
# within-trial standard deviation at 50k frames is 2e-3 while the
|
||||
# trial-to-trial spread is ~1.6e-2. Averaging over many independent
|
||||
# collections is therefore what smooths the curve, so trials are raised
|
||||
# and per-trial frames lowered at roughly constant total cost.
|
||||
TRIALS = 120
|
||||
EVAL_FRAMES = 50_000
|
||||
|
||||
|
||||
def main():
|
||||
m = get_model(iters=4000) # training needs grad
|
||||
m = main_model() # training needs grad
|
||||
m.eval()
|
||||
_run(m)
|
||||
|
||||
@@ -68,7 +74,7 @@ def _run(m):
|
||||
print(f"[P] permutation known-plaintext, collect {COLLECT_DB:.0f} dB, "
|
||||
f"decode {DECODE_DB:.0f} dB ...")
|
||||
rows = []
|
||||
for nf in [1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 24, 32, 48, 64]:
|
||||
for nf in [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 20, 24, 32, 48, 64]:
|
||||
fr, sr = [], []
|
||||
for t in range(TRIALS):
|
||||
g = torch.Generator().manual_seed(909 + 1000 * t + nf)
|
||||
|
||||
Reference in New Issue
Block a user