Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- run: python -m unittest discover -s tests -v
- run: python -m mnel demo --workspace build/demo
- run: python -m mnel ledger verify build/demo/evidence.jsonl
- run: python -m mnel provider-study-reference --workspace build/provider-study-reference
- run: python -m mnel ledger verify build/provider-study-reference/provider-portfolio-evidence.jsonl
- run: git diff --check

rust-provider-runtime:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
learned-provider artifact with deterministic serialization, reload, OOD abstention, and
diagnostic-only observations.
- Add the no-network `mnel distill-reference` study and distillation record schema.
- Add a structurally distinct tabular nearest-centroid learned provider with bounded
feature scaling, explicit calibration data, artifact identity, deterministic reload,
OOD detection, and diagnostic-only observations.
- Add `mnel provider-study-reference`: a no-network heterogeneous portfolio study with
random/heuristic/single/diversity routing, baseline comparisons, disagreement and
OOD/abstention metrics, cold/warm/resource measurements, optional energy reporting,
hidden-transfer visibility checks, and evidence-bound provider lifecycle records for
admission, quarantine, retirement, and rollback.

## 0.3.0a0 — unreleased

Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ copy their authority or silently create substitute implementations.
- `mnel distill-reference`, a no-network held-out study that writes an evidence ledger
and exercises controls, hidden-transfer access, strategy transfer, and a tiny
reloadable transition-frequency learned provider. Its observations remain diagnostic.
- `mnel provider-study-reference`, a no-network heterogeneous portfolio study that trains
a transition-frequency provider and a structurally different tabular nearest-centroid
provider, calibrates and reloads both, compares seeded-random and heuristic controls,
measures disagreement/OOD/abstention/cold-warm resource behavior, and records explicit
admission, quarantine, retirement, and rollback evidence. It does not issue a verdict.

## Install

Expand Down Expand Up @@ -211,6 +216,19 @@ or future-final records, freezes the transfer prediction before held-out evaluat
and reports measurements rather than a success verdict. Its reference feature grouping
is an explicit bounded baseline, not semantic understanding.

Run the deterministic heterogeneous learned-provider portfolio study:

```bash
mnel provider-study-reference --workspace build/provider-study-reference
mnel ledger verify build/provider-study-reference/provider-portfolio-evidence.jsonl
```

The transition-frequency and tabular nearest-centroid artifacts use separate snapshot
families and feature/objective identities. Routing preserves each observation; agreement,
disagreement, calibration, and transfer measurements are evidence, not consensus or
evaluator authority. The reference HMM is not silently applied to incompatible tabular
inputs.

Verify and summarize the resulting ledger:

```bash
Expand Down
16 changes: 16 additions & 0 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ and inconclusive experience. Records are content-identified and chained in order
Learned observations retain declaration, weight, feature, query, snapshot, calibration,
and limitation identities before they are eligible for later study.

The 0.4 provider-study plane adds a small explicit portfolio contract on top of that
ledger. `mnel.provider_study` binds provider artifacts to training/calibration dataset
identities, supported snapshot families, artifact/model identities, and diagnostic-only
metadata. It runs a transition-frequency provider beside a structurally distinct tabular
nearest-centroid provider and explicit random/heuristic controls. Routing is recorded,
not learned authority; every observation remains separate. Cold load, first inference,
warm samples, artifact/model bytes, bounded Python allocation, calibration, disagreement,
OOD, abstention, and optional energy availability are measurements.

### Verified distillation and study plane

The 0.4 data plane makes reuse explicit without replacing evidence:
Expand All @@ -138,6 +147,13 @@ Study arms and ablations carry equal-budget declarations and deterministic ident
The `distill-reference` command is a synthetic, no-network study surface, not an
evaluator or a substitute for Forge, Fabric, MNCS, MNCDS, or RAVEL.

Provider lifecycle records separately capture candidate, development admission,
transfer-pending, transfer admission, quarantine, retirement, and rollback. Admission
criteria identify artifact/calibration/resource/OOD/authority checks; a provider cannot
transition on its own score, and quarantine preserves its artifact and evidence. The
portfolio reference command is a bounded local study, not a production provider
orchestrator and not a native ABI export.

### Distillation plane

VED proposes compact principles and strategies while preserving source lineage,
Expand Down
12 changes: 12 additions & 0 deletions docs/LEARNED_PROVIDER_RUNTIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ diagnostic provider. It is not a verifier and is not exported through ABI v1; na
export remains a later task once the artifact contract has a measured compatible runtime
boundary.

The companion `mnel.provider_study` module adds a second, structurally different
CPU reference provider: a bounded tabular nearest-centroid artifact with explicit
normalization parameters, calibration dataset identity, OOD threshold, deterministic
serialization, and reload equivalence. The portfolio harness compares both providers
with seeded-random and explicit heuristic controls, while preserving separate provider
observations and recording cold-load, first-inference, warm, model-size, artifact-size,
allocation, calibration, disagreement, and OOD measurements. Its admission, quarantine,
retirement, and rollback records are control-plane evidence; they do not change the
stable C ABI or create evaluator authority. The existing ABI v1 query has no portable
model-artifact initialization field, so this iteration deliberately does not smuggle a
Python artifact path through global state or claim native export.

## Native-language exceptions

A non-Rust provider may enter `native-trusted` only when its manifest includes:
Expand Down
12 changes: 12 additions & 0 deletions docs/LEARNING_MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,15 @@ equal-budget, and hidden-transfer controls. It computes retrieval and calibratio
measurements and trains a tiny transition-frequency diagnostic provider that serializes
and reloads deterministically. These are measurements from a bounded synthetic fixture,
not evidence of general learning improvement or evaluator authority.

The companion `mnel provider-study-reference` path extends this into a small controlled
portfolio: a transition-frequency provider and a structurally different tabular
nearest-centroid provider are trained from development-visible records, calibrated from
separate identified examples, serialized/reloaded, and evaluated on a held-out fixture
through random, heuristic, single-provider, and diversity routing policies. It records
pairwise disagreement, bounded error correlation, abstention/OOD behavior, cold-load,
first-inference, warm-latency, model/artifact size, and optional energy measurements.
Provider admission, quarantine, retirement, and rollback are explicit diagnostic
lifecycle records. The synthetic labels and transfer policy are study evidence, not
MNEL/MNCS verdicts; the Rust HMM is retained as a separate native baseline because it is
not input-compatible with the mixed compact fixture.
10 changes: 10 additions & 0 deletions docs/RESEARCH_PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ The current 0.4 reference study is deliberately synthetic and deterministic. Its
transition-frequency provider is a diagnostic observation source with explicit artifact,
training dataset, feature extractor, calibration, and reload identities. It is not a
verifier, evaluator, or promotion mechanism.

The provider portfolio control surface is also deterministic and equal-budget by
construction. `provider-study-reference` trains separate transition and tabular provider
families, keeps calibration distinct from training, and applies seeded random, explicit
heuristic, single-provider, and architecture/objective diversity routing. It preserves
per-provider observations and reports disagreement, joint/overlapping failure only when
reference labels exist, abstention, OOD, latency, memory scope, and energy availability.
Admission and rollback are evidence-bound records, not automatic promotion. The fixture
does not claim that two providers are independent evaluators or that a successful
synthetic transfer generalizes.
21 changes: 16 additions & 5 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,26 @@
precision/recall/hit-rate/reuse/diversity metrics plus bounded calibration metrics;
- **Implemented:** deterministic `mnel distill-reference` study and a tiny reloadable CPU
transition-frequency learned provider with OOD abstention and diagnostic-only output;
- **Started:** heterogeneous learned-provider portfolio training and calibration;
- **Implemented:** a deterministic heterogeneous reference portfolio with a structurally
distinct tabular nearest-centroid provider, explicit calibration records, deterministic
serialization/reload, routing controls, disagreement/correlation/OOD/abstention/resource
measurements, and diagnostic-only evidence ledgers;
- **Implemented:** provider candidate/admission, transfer-pending, quarantine, retirement,
and rollback records with explicit evidence checklists;
- **Started:** broader provider portfolios and native export of Python-trained artifacts;
- export Python-trained providers into the versioned native runtime boundary;
- **Started:** compare learned providers against deterministic and classical baselines;
- **Implemented:** compare the reference providers against seeded-random and explicit
heuristic controls; the Rust HMM remains a separate not-applicable native baseline for
this compact mixed snapshot fixture;
the reference transition study records deterministic and heuristic controls; the
existing Rust HMM baseline is not input-compatible with this compact fixture and is
retained as a separate native runtime baseline;
- random, heuristic, single-provider, and diversity-routed controls;
- correlated-error, disagreement, abstention, and out-of-distribution studies;
- useful confirmed probes per operation, latency, memory, energy, and cold-start metrics;
- **Implemented:** random, heuristic, single-provider, and diversity-routed controls;
- **Implemented:** correlated-error, disagreement, abstention, and out-of-distribution
measurements, plus cold-load/first-inference/warm-latency and bounded Python allocation
measurements;
- **Started:** energy measurements; an optional reader records trusted joules when supplied,
otherwise the study records unavailable rather than estimating;
- non-Rust native exception studies with benchmark and threat-review identities;
- hidden-transfer admission, quarantine, retirement, and rollback workflows;
- optional small proposer-model distillation from verified traces.
Expand Down
10 changes: 10 additions & 0 deletions docs/THREAT_MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ heuristic limitation, so it cannot masquerade as semantic understanding. Distill
retrieval, calibration, and learned-provider observations remain proposal or diagnostic
records; none includes evaluator verdict authority.

The provider portfolio adds further guards: provider training and calibration accept only
explicit development views; the held-out transfer fixture is exposed through a separate
transfer-evaluator identity after prediction freeze; provider artifacts are hash-bound and
reload-tested; and lifecycle transitions require evidence identities and a policy identity.
Random and diversity routing cannot expand snapshot compatibility, and pairwise
disagreement is not treated as error without an identified reference outcome. Optional
energy readings are recorded as unavailable when no trusted source exists rather than
estimated from latency. A small tabular provider is intentionally bounded and CPU-only;
native export remains outside this iteration rather than weakening the ABI boundary.

### Apparent independence

Multiple local machines run the same operator-controlled stack. This is replication,
Expand Down
27 changes: 27 additions & 0 deletions schemas/mnel-calibration.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/epi13/Machine-Native-Experimental-Learning/schemas/mnel-calibration.schema.json",
"title": "MNEL identified calibration records",
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"snapshot_identity",
"source_record_identity",
"expected_label",
"visibility",
"record_identity",
"authority",
"semantics"
],
"properties": {
"schema": {"const": "mnel-calibration-record/0.4"},
"snapshot_identity": {"type": "string", "minLength": 1},
"source_record_identity": {"type": "string", "minLength": 1},
"expected_label": {"type": ["integer", "null"], "enum": [0, 1, null]},
"visibility": {"enum": ["development-visible", "selection-observed-not-repairable"]},
"record_identity": {"type": "string", "minLength": 1},
"authority": {"const": "diagnostic-only"},
"semantics": {"const": "calibration-example; not-a-verdict"}
}
}
Loading
Loading