E3 Progress Summary
This issue reports the first reproducible P0 loop for E3: unified routing observability across real MoE, MoT, and Latent YOLO-Master model forwards.
The current work focuses on a non-invasive observation layer:
- no modification to the core model forward;
- no training-quality or detection-accuracy claim;
- no upstream PR has been opened yet;
- this issue records the first experimental results, mechanism findings, and current progress.
Public work package:
Completed Work
- Locked the tested YOLO-Master runtime to commit
07d330325b5a26b75aabfc75389f9bcbc0d40245.
- Added a versioned routing event schema:
e3.routing/v1.0.0.
- Added leaf-only routed-module discovery to avoid parent/child double counting.
- Added adapters for real MoE, MoT, and Latent modules.
- Added explicit
observed / derived / unavailable field states.
- Added normalized expert load, routing entropy, normalized entropy, load Gini, dominant expert share, mixing-weight state, and auxiliary-loss state.
- Added per-family JSONL logs and static diagnostic plots.
- Added a cross-family summary plot.
- Added environment metadata, input hash, resolved configuration, full log, and SHA-256 manifest evidence.
- Added contract and collector tests covering metric invariants, schema validation, hook transparency, hook cleanup, family discovery, leaf selection, missing-field semantics, and the MoE eval fallback path.
- Added run-id path-safety and reproduction overwrite-protection tests.
- Current regression result: all 11 tests passed.
Experiment Setup
- Dataset: coco8
val[0]
- Input image SHA-256:
4c28394898302bef227834d63498a0fc54e4295f11c590c8a8ebcba51347bc03
- Input size:
64 × 64
- Seed:
0
- Device: CPU
- Models: randomly initialized
- Execution mode:
eval with torch.inference_mode()
The experiment is intentionally small. It validates the observation pipeline and schema, not trained-model routing quality.
First P0 Results
| Family |
Model parameters |
Leaf routed modules |
Captured events |
Normalized entropy range |
Load Gini range |
Main transport |
| MoE |
5,115,336 |
6 |
6 |
0.250–0.500 |
0.500–0.875 |
Nested router forward hook |
| MoT |
2,927,512 |
4 |
4 |
0.000–0.631 |
0.333–0.667 |
Official detached routing snapshot |
| Latent |
5,478,423 |
3 |
3 |
1.000–1.000 |
0.000–0.000 |
Official detached routing snapshot |
A total of 13 routing events were captured. All events passed the e3.routing/v1.0.0 JSON Schema validation.

Mechanism Analysis
1. Leaf-only routed-module discovery
YOLO-Master already provides the common is_routed_module protocol, but both a routed wrapper and its routed child may satisfy the protocol.
Registering hooks on both levels can count the same routing decision twice.
The current collector therefore:
- discovers protocol-compatible candidates;
- matches the requested routing family;
- removes candidates that contain another routed child;
- registers hooks only on leaf routing producers.
A dedicated test constructs a routed parent and routed child and verifies that only the child is selected.
2. MoE eval observability gap
The first real MoE preflight discovered 6 routed modules but captured 0 events.
Source inspection showed that OptimizedMOEImproved still executes its router during eval and obtains routing_weights and routing_indices, but _record_moe_snapshot(...) is only called when:
if self.training and loss_dict:
Switching the model to training mode only for diagnostics was rejected because it can change progressive sparsity, expert dropout, Top-K scheduling, and loss behavior.
The current P0 implementation instead registers a temporary hook on the nested router return point:
routing_indices are counted and normalized into expert load;
routing_weights are averaged across routing positions;
- tensors are immediately detached and moved to CPU;
- the outer module hook converts the cached data into the unified event;
- all hook handles and temporary caches are removed in
finally.
This recovered 6/6 MoE events without modifying the core forward or changing the model from eval mode.
The diagnostic source is explicitly recorded as:
nested_router_forward_hook
3. Missing auxiliary loss is not silently converted to zero
MoE eval does not expose a real training auxiliary loss.
The schema therefore records:
{
"state": "unavailable",
"source": null,
"value": null
}
This avoids treating “not observed in this execution path” as “observed and equal to zero.”
4. Cross-family semantics
The three families expose different routing granularities:
- MoE: module-defined sparse Top-K routing;
- MoT: spatial-token routing;
- Latent: image- or scale-level routing.
The unified schema standardizes the observation fields while preserving granularity, source metadata, and the detached original snapshot.
The current cross-family plot should therefore be interpreted as evidence that one observer can process all three families, not as a claim that their routing mechanisms are directly equivalent.
Difficulties and Findings
- The main MoE difficulty was not routing execution, but the absence of an eval snapshot in the tested
OptimizedMOEImproved path.
- Forcing training mode would make the diagnostic result semantically incorrect, so the collection path must remain external and eval-safe.
- MoE, MoT, and Latent cannot be fully unified without preserving routing granularity and source provenance.
- Latent produced uniform routing in this random-initialization cold-start run. This is pipeline evidence, not a claim that trained Latent routing remains uniform.
- A single coco8 image is sufficient for a CPU Smoke test but not for dataset-level collapse or expert-specialization conclusions.
- The recorded single-forward durations are observations only. A valid observer-overhead benchmark still requires warmup, repeated paired runs, and hook-off/hook-on comparison.
- The current machine has no NVIDIA CUDA device, so no GPU result is claimed.
Current Status
- Admission Smoke: completed.
- P0 unified schema and static three-family diagnostics: completed in the standalone public work package.
- JSON Schema validation: passed for all 13 events.
- Unit and contract tests: all 11 passed.
- Ruff: passed.
- Clean one-command reproduction: fixed and verified.
- Upstream integration PR: not opened yet.
- Realtime dashboard: not yet implemented.
- Paired hook-off/hook-on overhead benchmark: not yet implemented.
- Original-image token-routing overlay: not yet implemented.
Next Steps
- Continue refining the unified schema and the MoE eval diagnostic design.
- Prepare a minimal, reviewable upstream integration design.
- Add a paired hook-off/hook-on benchmark with warmup and repeated measurements.
- Build a realtime view only after the event contract and overhead methodology are stable.
E3 Progress Summary
This issue reports the first reproducible P0 loop for E3: unified routing observability across real MoE, MoT, and Latent YOLO-Master model forwards.
The current work focuses on a non-invasive observation layer:
Public work package:
Completed Work
07d330325b5a26b75aabfc75389f9bcbc0d40245.e3.routing/v1.0.0.observed / derived / unavailablefield states.Experiment Setup
val[0]4c28394898302bef227834d63498a0fc54e4295f11c590c8a8ebcba51347bc0364 × 640evalwithtorch.inference_mode()The experiment is intentionally small. It validates the observation pipeline and schema, not trained-model routing quality.
First P0 Results
A total of 13 routing events were captured. All events passed the
e3.routing/v1.0.0JSON Schema validation.Mechanism Analysis
1. Leaf-only routed-module discovery
YOLO-Master already provides the common
is_routed_moduleprotocol, but both a routed wrapper and its routed child may satisfy the protocol.Registering hooks on both levels can count the same routing decision twice.
The current collector therefore:
A dedicated test constructs a routed parent and routed child and verifies that only the child is selected.
2. MoE eval observability gap
The first real MoE preflight discovered 6 routed modules but captured 0 events.
Source inspection showed that
OptimizedMOEImprovedstill executes its router during eval and obtainsrouting_weightsandrouting_indices, but_record_moe_snapshot(...)is only called when:Switching the model to training mode only for diagnostics was rejected because it can change progressive sparsity, expert dropout, Top-K scheduling, and loss behavior.
The current P0 implementation instead registers a temporary hook on the nested router return point:
routing_indicesare counted and normalized into expert load;routing_weightsare averaged across routing positions;finally.This recovered 6/6 MoE events without modifying the core forward or changing the model from eval mode.
The diagnostic source is explicitly recorded as:
3. Missing auxiliary loss is not silently converted to zero
MoE eval does not expose a real training auxiliary loss.
The schema therefore records:
{ "state": "unavailable", "source": null, "value": null }This avoids treating “not observed in this execution path” as “observed and equal to zero.”
4. Cross-family semantics
The three families expose different routing granularities:
The unified schema standardizes the observation fields while preserving
granularity, source metadata, and the detached original snapshot.The current cross-family plot should therefore be interpreted as evidence that one observer can process all three families, not as a claim that their routing mechanisms are directly equivalent.
Difficulties and Findings
OptimizedMOEImprovedpath.Current Status
Next Steps