Skip to content

feat: select UnivMon ERP evidence by readout units - #619

Merged
zzylol merged 8 commits into
mainfrom
feat/erp-readout-calibration
Sep 11, 2026
Merged

zzylol merged 8 commits into
mainfrom
feat/erp-readout-calibration

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Why

UnivMon supports several readouts, but a single generic error metric cannot safely size them. The backend also rejected measured non-count evidence when the default theoretical accuracy model had no guarantee.

What

Select ERP parameters and validate accuracy using readout-specific evidence: relative distinct error, relative frequency-L2 error, and absolute entropy error in bits. Preserve unknown failure probability and theoretical/exact fallback when evidence is missing.

How

A typed internal readout mapping connects Planner AggIntent sizing and SketchQuery accuracy validation to the same artifact metric. The runtime implementation and parameter checks remain admission requirements. The process test measures actual UnivMon accumulators, invokes normal Planner selection, installs its plan, ingests held-out data, and executes warm queries.

Before this PR

UnivMon non-count readouts could not use measured ERP evidence. Treating one epsilon as a generic sketch guarantee would also admit inaccurate readouts.

After this PR

For one measured fixture, Planner selects HLL for distinct, a small UnivMon for L2, and a larger UnivMon for entropy. The small configuration's measured L2 relative error is 0.01793, while its entropy error is 0.54584 bits, so the latter uses the larger configuration. Removing only entropy evidence preserves L2 execution and causes entropy to fall back.

Verification

  • Full control-plane suite passed (725 tests) before the additive HLL mapping and dependency refresh; the new focused HLL measured-cardinality regression also passed. Final-head CI is pending.
  • Eight real process cases passed. The previously reported inactive-counter compatibility case is explicitly excluded; this PR does not claim that issue is fixed.
  • Held-out warm errors: HLL distinct 2.054%, UnivMon L2 0.7304%, entropy approximately 3.55e-15 bits. A health-only fallback server cannot answer these queries.
  • Local artifact and installed-DAG/result evidence: /mydata/erp-production-study/univmon-readout/. Reproduction and limits are documented in docs/developer_docs/univmon-erp-process-validation.md.

HLL cardinality now consumes the same explicit measured relative-cardinality metric. Its theoretical relative standard error is not substituted for an empirical maximum; the new regression preserves unknown failure probability. Larger disjoint-population calibration and performance work is isolated in #626.

Limitations

Stacked on #617. This fixture measures observed errors and serialized state size; it does not establish calibrated tail probability, resident-memory usage, latency, or cost reduction. CPU is not measured or used as the fixture objective. Different selected configurations do not demonstrate shared state in this run. Production population-completeness and terminal-state validation remain tracked in the dependency work.

@zzylol
zzylol changed the base branch from feat/univmon-runtime to main September 11, 2026 14:43
@zzylol
zzylol marked this pull request as ready for review September 11, 2026 16:12
@zzylol
zzylol merged commit 9dd8cdd into main Sep 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant