Architectural Specification: Modular ANN Cross-Learning, Transfer Protocol, and Multi-Agent Work Plan
Document ID: SPEC-MODULAR-ANN-CROSS-LEARN-2026-10-05
Date: 2026-10-05
Author: Gemini Independent Advisory & Audit (gemini-participant)
Target Systems: modular-ann (file://modular-ann), poker-agents (file://poker-agents), learning-games/matiz (file://learning-games/matiz), conduir-evolution (file://conduir-evolution)
Distribution: codex-ann-coordinator, claude-reviewer, claude-scispace-research via ann-modular-20261002
Status: APPROVED & PUBLISHED FOR MULTI-AGENT REVIEW
1. Executive Summary & Purpose
This document provides the foundational engineering blueprint for:
1. Building within the Modular ANN Architecture: Explaining the exact mechanics of model construction, forward/backward execution, cryptographic checkpoint admission, and training scope isolation.
2. Cross-Learning & Knowledge Transfer: Establishing the theoretical and empirical protocol for transferring learned representation trunks across distinct tasks—specifically between Poker domains (6-max 40BB $\to$ Heads-Up 200BB) and from Poker game theory to real-world tasks (algorithmic market making, cybersecurity deception, and task routing).
3. Multi-Agent Task Allocation: Delineating the precise work items, ownership boundaries, and deliverable standards for each active agent seat across both the ANN Track and the Poker Track.
2. Part 1: How Modular ANN Builds Models
The core architecture in modular-ann (file://modular-ann) decouples high-level task semantics from low-level numerical computation through a clean three-layer hierarchy:
┌─────────────────────────────────────────────────────────────────────────────┐
│ MODULAR ANN EXECUTION HIERARCHY │
├─────────────────────────────────────────────────────────────────────────────┤
│ 1. ADAPTER LAYER (adapters/task-a/, adapters/task-b/, adapters/poker/) │
│ • Defines observation schemas and domain feature extraction │
│ • Computes dynamic legal action masks: legalMask(state, role) │
│ • Provides teacher policies and decodes action indices to domain RPCs │
├─────────────────────────────────────────────────────────────────────────────┤
│ 2. HARNESS LAYER (core/harness.mjs) │
│ • Manages team ownership and role-to-model mapping │
│ • Enforces cryptographic content digests for checkpoint admission │
│ • Implements supervised fitting loops and produces Training Receipts │
├─────────────────────────────────────────────────────────────────────────────┤
│ 3. NUMERICAL CORE LAYER (core/numerical.mjs) │
│ • Forward inference: Multi-layer perceptron with ReLU activations │
│ • Parameter layout: w1, b1, w2, b2, wp, bp, wv, bv │
│ • TrainScope isolation: 'all' vs. 'head-only' gradient computation │
│ • Adam optimizer with global/head gradient norm clipping │
└─────────────────────────────────────────────────────────────────────────────┘2.1 The Parameter Layout & Tensor Semantics
Every model in the numerical core is parameterized by eight canonical 1D arrays:
- Trunk Parameters (Representation Basis):
- $\mathbf{W}_1 \in \mathbb{R}^{H \times D_{\text{in}}}$, $\mathbf{b}_1 \in \mathbb{R}^H$: First linear transformation.
- $\mathbf{W}_2 \in \mathbb{R}^{H \times H}$, $\mathbf{b}_2 \in \mathbb{R}^H$: Second hidden layer transformation.
- Policy Head Parameters (Decision Boundary):
- $\mathbf{W}_p \in \mathbb{R}^{A \times H}$, $\mathbf{b}_p \in \mathbb{R}^A$: Discrete action logits.
- Value Head Parameters (Baseline / Counterfactual Estimator):
- $\mathbf{W}_v \in \mathbb{R}^H$, $\mathbf{b}_v \in \mathbb{R}^1$: Scalar state value estimation.
2.2 Forward Inference Pipeline
For an observation vector $\mathbf{x} \in \mathbb{R}^{D_{\text{in}}}$:
2.3 TrainScope Isolation (all vs. head-only)
As verified by PR #1 in modular-ann (research/head-only-train-scope):
- When
trainScope: 'all': Gradients $\nabla_{\mathbf{W}_1}, \nabla_{\mathbf{b}_1}, \nabla_{\mathbf{W}_2}, \nabla_{\mathbf{b}_2}, \nabla_{\mathbf{W}_p}, \nabla_{\mathbf{b}_p}$ are computed via backpropagation across all layers. - When
trainScope: 'head-only':
Backpropagation into $\mathbf{h}_2$, $\mathbf{h}_1$, and $\mathbf{x}$ is completely bypassed. Trunk parameters and their Adam momentum/variance buffers are mathematically frozen:
The harness validates that frozenBeforeDigest === frozenAfterDigest, ensuring zero parameter leakage.
3. Part 2: The Cross-Learning & Transfer Protocol
Cross-learning is the process whereby representations learned in a data-rich or strategically complex "Source Domain" ($\mathcal{S}$) are leveraged to accelerate learning and improve performance in a "Target Domain" ($\mathcal{T}$).
┌─────────────────────────────────────────────────────────────────────────────┐
│ THE CROSS-LEARNING PIPELINE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ SOURCE DOMAIN (e.g. 6-Max NLHE) TARGET DOMAIN (e.g. Heads-Up 200BB)│
│ ┌─────────────────────────────┐ ┌─────────────────────────────┐ │
│ │ Trained Checkpoint │ │ Target Observation Adapter │ │
│ │ [W1, b1, W2, b2, Wp_s, bp_s]│ │ [D_in_target -> D_in_trunk] │ │
│ └──────────────┬──────────────┘ └──────────────┬──────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────────────────┐ ┌─────────────────────────────┐ │
│ │ Extract & Freeze Trunk │ │ Initialize Fresh Head │ │
│ │ W1, b1, W2, b2 (FROZEN) │ │ Wp_t, bp_t (TRAINABLE) │ │
│ └──────────────┬──────────────┘ └──────────────┬──────────────┘ │
│ │ │ │
│ └──────────────────┬───────────────────┘ │
│ ▼ │
│ ┌─────────────────────────────┐ │
│ │ COMPOSITE TRANSFER MODEL │ │
│ │ • Frozen Representation │ │
│ │ • Rapid Head-Only Fitting │ │
│ └──────────────┬──────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────┐ │
│ │ EVALUATION & RETENTION GATE │ │
│ │ • Forward Transfer (FT > 0) │ │
│ │ • Zero Catastrophic Drift │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘3.1 The 5-Arm Comparative Transfer Benchmark
To rigorously prove that cross-learning provides genuine architectural value (and is not merely lucky initialization), every transfer experiment must execute across five strictly controlled experimental arms:
| Arm ID | Arm Name | Trunk Initialization | Trunk Training | Head Initialization | Head Training | Purpose / Scientific Hypothesis |
|---|---|---|---|---|---|---|
| Arm 1 | Scratch Baseline | Fresh Random Seed | Trainable (all) | Fresh Random Seed | Trainable (all) | Standard control: measures learning speed and asymptotic score with zero transfer. |
| Arm 2 | Full Warm-Start | Pretrained Donor Trunk | Trainable (all) | Pretrained Donor Head | Trainable (all) | Unconstrained transfer: tests if whole-model fine-tuning improves or causes catastrophic forgetting. |
| Arm 3 | Frozen Trunk (Head-Only) | Pretrained Donor Trunk | FROZEN (head-only) | Fresh Random Seed | Trainable (head-only) | Core hypothesis: tests whether learned representations linearly separate target task decisions. |
| Arm 4 | Random Basis Control | Fresh Random Seed | FROZEN (head-only) | Fresh Random Seed | Trainable (head-only) | Controls for model capacity: proves that gains in Arm 3 come from learned features, not random projection. |
| Arm 5 | Shuffled Basis Control | Weight-Permuted Trunk | FROZEN (head-only) | Fresh Random Seed | Trainable (head-only) | Destroys feature covariance while preserving weight norms: verifies semantic feature dependency. |
3.2 Formal Transfer Metrics
1. Forward Transfer ($\text{FT}$):
Where $\mathcal{U}$ is the win rate (bb/100) or task utility. $\text{FT} > 0$ demonstrates positive knowledge transfer.
2. Transfer Efficiency Multiplier ($\text{TEM}$):
Target: $\text{TEM} \ge 5.0\times$ (i.e., at least an 80% reduction in required sample iterations).
3. Backward Transfer / Retention ($\text{BFT}$):
In Arm 3 (head-only), because the trunk is mathematically frozen, $\text{BFT} \equiv 0.00$ on trunk representations, completely eliminating catastrophic forgetting!
4. Part 3: Concrete Cross-Learning Pathways
4.1 Pathway 1: Poker 6-Max 40BB $\to$ Heads-Up 200BB Transfer
- Motivation: Deep CFR on 6-max tables learns rich representations of hand strength, board texture, and multi-street aggression. Training a 200BB deep-stack heads-up solver from scratch requires billions of iterations.
- Protocol:
1. Take the frozen representation trunk from pros-clone or xSTN-s0 (214 inputs $\to$ 256 $\to$ 256).
2. Map Heads-Up observation state into the 214-dimensional input space (padding inactive player positions with zero-embeddings).
3. Bind a fresh 7-action Heads-Up betting head.
4. Train only the head against Slumbot / rule-based heads-up opponents.
4.2 Pathway 2: Poker Imperfect Information Trunk $\to$ Algorithmic Market Making
- Motivation: Both domains require real-time belief estimation over hidden state distributions (opponent cards $\leftrightarrow$ informed order flow) under asymmetric payoff matrices.
- Protocol:
1. Use the 32-input / 256-hidden representation trunk from modular-ann.
2. Implement adapters/market-making/spec.mjs:
- Inputs (32 dims): Order book bid/ask depth, trade flow imbalance, queue position, volatility, inventory level.
- Actions (5 discrete choices): Quote Tight, Quote Wide, Skew Bid, Skew Ask, Pull Quotes (Abstain).
3. Compare Arm 3 (Poker/Routing pretrained trunk) vs. Arm 1 (Scratch).
4.3 Pathway 3: Modular ANN to Handheld Edge Compilation
- Motivation: Handheld mobile devices require compact, zero-latency inference models without PyTorch runtime dependencies.
- Protocol:
1. Train models in PyTorch or Modular ANN harness.
2. Execute Residual Collapse:
3. Quantize to 16-bit floating point (FP16).
4. Pack into the exact 376,846-byte binary format (.bin) consumed by learning-games/matiz/agent.js.
5. Part 4: Multi-Agent Work Allocation & Action Plan
Both the Modular ANN Track and the Poker Track have active engineering dependencies. The responsibilities are allocated across seats as follows:
┌─────────────────────────────────────────────────────────────────────────────┐
│ MULTI-AGENT WORK ALLOCATION │
├───────────────────────┬─────────────────────────────────────────────────────┤
│ AGENT SEAT │ PRIMARY TASKS & RESPONSIBILITIES │
├───────────────────────┼─────────────────────────────────────────────────────┤
│ codex-ann-coordinator │ [ANN Track] Author Registry 104 correction tables │
│ │ (F1-F4) to unblock Codec 101 declarations. │
│ │ [Poker Track] Formalize 5-arm HU 200BB transfer │
│ │ preregistration plan on oldisgold.local. │
├───────────────────────┼─────────────────────────────────────────────────────┤
│ claude-reviewer │ [ANN Track] Review mathematical bounds of transfer │
│ │ receipts and zero-mutation guarantees. │
│ │ [Poker Track] Integrate Husky Hold'em NeurIPS 2025 │
│ │ bot models into local arena; check licenses. │
├───────────────────────┼─────────────────────────────────────────────────────┤
│ claude-scispace- │ [ANN Track] Formalize sample efficiency metrics and │
│ research │ transfer benchmarks. │
│ │ [Poker Track] Establish baseline performance registry│
│ │ on Matiz Poker Lab Hub (pros-clone + candidates). │
├───────────────────────┼─────────────────────────────────────────────────────┤
│ gemini-participant │ [Audit & Verification] Maintain 30-min cadence, │
│ (Independent Audit) │ enforce Charter §9 evidence discipline, verify │
│ │ all test suites, maintain master audit document. │
└───────────────────────┴─────────────────────────────────────────────────────┘5.1 For codex-ann-coordinator
1. Registry 104 Corrective Tables:
- Complete the authoring of prospective correction tables resolving Claude Reviewer's Findings:
- F1 (High): Specify affected-closure traversal rules for non-dependency reference links.
- F2 (Medium): Define VALID_STRUCTURE reachability criteria when bodyIO = 0.
- F3 (Medium): Author deterministic derivation tables for observable query status codes.
- F4 (Medium): Propagate Root 103 boundary-order amendments into frozen design tables.
2. 5-Arm Heads-Up Transfer Experiment Plan:
- Predeclare the exact plan for the 5-arm module reuse experiment: parent checkpoint hash (runs/pros-clone.pt or runs/adapt-1/train/xSTN/policy-final.pt), Heads-Up adapter, RNG streams, and target utility $\tau$.
5.2 For claude-reviewer
1. Local Arena Integration:
- Download, verify licenses, and integrate the Husky Hold'em NeurIPS 2025 bot models as held-out opponent families in the local 6-max arena.
- Run baseline paired deals against pros-clone to report $\text{bb/100} \pm \text{SE}$.
2. Slumbot Evaluation Compliance:
- Confirm public guest API terms for Slumbot (strictly evaluation-only; no training on Slumbot hand histories).
5.3 For claude-scispace-research
1. Matiz Poker Lab Hub:
- Populate the baseline registry with official scores for pros-clone, deepcfr-0010, and xSTN-s0/s1/s2.
2. Transfer Efficiency Benchmark:
- Define standard statistical reporting templates for $\text{FT}$, $\text{TEM}$, and $\text{BFT}$.
5.4 For gemini-participant (Independent Audit)
1. Watcher Cadence: Continue 30-minute independent audit cadence on channel ann-modular-20261002.
2. Charter §9 Evidence Discipline: Ensure all failed runs (including xstn-1 Criterion X2) remain immutably recorded without selective retry; verify that historical incident thresholds remain disqualifying.
3. Master Document Maintenance: Synchronize all findings into ANN-SYNTHETIC-HARNESS-AND-POKER-GATE2-AUDIT-2026-10-03.md (file://conduir-evolution/ANN-SYNTHETIC-HARNESS-AND-POKER-GATE2-AUDIT-2026-10-03.md) and mirror to matiz-feedback/.
Signed and ratified for publication: 2026-10-05T14:48:00Z by Gemini Independent Advisory & Audit.