docs(meridian): iteration 3 plan + GPU pre-train wiring stub (#68)

Closes the prototype's "iter 3 = plan + wiring documented" item (ADR-027 §2.0):

  - scripts/pretrain-mae-gcloud.sh — GCloud GPU driver for the MAE pre-train: a
    thin, reviewable mirror of scripts/gcloud-train.sh that provisions a VM in
    cognitum-20260110, builds wifi-densepose-train --features tch-backend,cuda,
    runs the `pretrain-mae` binary, downloads the .ot variable store, tears the
    VM down. Currently drives SyntheticCsiDataset (the smoke path); the one TODO
    is the --data-dir/--datasets plumbing for the real heterogeneous corpus.
    NOT run as part of this prototype. Also supports --dry-run (local synthetic
    pre-train, needs LibTorch).
  - ADR-027 §2.0 — added the "Iteration 3 plan" subsection: heterogeneous-CSI
    ingest (own recordings + MM-Fi + Wi-Pose + multi-band virtual sub-carriers,
    normalised to 56 sub-carriers), the GPU run, lifting the v0 limits
    (per-sample masking, transformer blocks, circular phase loss), the fine-tune
    handoff (load the CsiMae encoder into WiFiDensePoseModel via a
    `--init-encoder <mae.ot>` flag, then train the §2.x heads as regularisers),
    cross-domain eval (§4.6 protocol), and shipping the encoder as an RVF segment.
  - wifi-densepose-train/README.md — new "MERIDIAN-MAE" section pointing at the
    csi_mae module, the pretrain-mae binary, the gcloud script, and ADR-027 §2.0.
  - csi_mae.rs module doc — updated the iteration-status block.

cargo test -p wifi-densepose-train --no-default-features → 121 lib tests pass.

This completes the MERIDIAN CSI-MAE *prototype* (iter 1 masking pipeline +
iter 2 tch model/pretrain loop/bin + iter 3 plan/wiring). Real cross-domain
results need the heterogeneous ingest + a GPU pre-train run (iter 3 execution),
out of scope for the prototype.

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
ruv
2026-05-11 13:09:49 -04:00
parent dcfa922518
commit 13f43004c8
4 changed files with 206 additions and 4 deletions
+18
View File
@@ -82,6 +82,24 @@ wifi-densepose-train/src/
trainer.rs -- (tch) Training loop orchestrator [feature-gated]
```
## MERIDIAN-MAE — masked-autoencoder pre-training (ADR-027 §2.0)
The `csi_mae` module implements a CIG-MAE-style **dual-stream (amplitude + phase)** masked
autoencoder for cross-domain CSI pre-training. The thesis (2026-Q2 SOTA survey, arXiv:2511.18792):
cross-room generalisation is a *data-breadth* problem — pre-train one CSI encoder on heterogeneous
capture, attach a small task head — not a bigger-pose-net problem.
* Pure-Rust (always built): `MaeConfig`, `MaskStrategy` (`Random` / `InfoGuided` — the latter
variance-weights token selection so high-information tokens are masked), `TokenLayout`,
`mask_csi_window`, `reassemble_tokens`. Dependency-free deterministic masking.
* `csi_mae::model` (feature `tch-backend`): `CsiMae` (encoder over visible tokens → latent →
decoder reconstructs masked amplitude+phase), `reconstruction_loss`, `MaeBatch`, `pretrain_step`.
* Driver: `cargo run -p wifi-densepose-train --features tch-backend --bin pretrain-mae -- --epochs 5`
(synthetic data). GPU run: `bash scripts/pretrain-mae-gcloud.sh` (prototype wiring stub).
See `docs/adr/ADR-027-cross-environment-domain-generalization.md` §2.0 for the full plan
(heterogeneous-CSI ingest, GPU pre-train, fine-tune handoff, cross-domain eval).
## Related Crates
| Crate | Role |
@@ -32,10 +32,15 @@
//!
//! # Status
//!
//! Prototype, iteration 1: masking pipeline + config + tests + ADR §2.0. The
//! `model` submodule is a v0 skeleton (MLP encoder/decoder, batch-level masking)
//! — transformer blocks, per-sample masking, information-guided masking, and a
//! `pretrain-mae` binary land in subsequent iterations.
//! Prototype. **iter 1**: masking pipeline + config + tests + ADR §2.0.
//! **iter 2a**: information-guided masking ([`MaskStrategy::InfoGuided`]).
//! **iter 2b**: the [`model`] submodule — `CsiMae` (MLP-based v0 dual-stream
//! encoder/decoder, batch-shared masking), `reconstruction_loss`, `MaeBatch`,
//! `pretrain_step`, plus the `pretrain-mae` binary (`bin/pretrain_mae.rs`,
//! `--features tch-backend`). **iter 3+** (see ADR-027 §2.0 "Iteration 3 plan"
//! and `scripts/pretrain-mae-gcloud.sh`): heterogeneous-CSI ingest, the real
//! GPU pre-train run, per-sample masking + self-attention transformer blocks
//! (lifting the v0 limits), and the fine-tune handoff into the §2.x heads.
//!
//! [CIG-MAE]: https://arxiv.org/html/2512.04723v1