You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ASAPPlanner can structurally nest SummaryAgg nodes, but selected post-ASAP plans need machine-readable end-to-end error guarantees. Approximate parents must not consume approximate children unless their composed guarantee satisfies the callers existing AccuracyTarget`.
Accuracy legality and cost ranking are separate responsibilities.
The deployment-extensible AccuracyModel supplies local guarantees, propagates them through a CompositionOperator, and checks the result against AccuracyTarget. Guarantees retain typed metrics rather than reducing every error to an unqualified epsilon:
BoundExpr and ProbabilityExpr are serializable expression vocabularies. Provenance records selected parameters, child guarantees, composition steps, runtime observations, and unavailable statistics. Caller-visible guarantees belong on finalized/readout values; exact outputs have zero error.
Core propagation rules
The default model is conservative and fail-closed:
Exact input contributes zero bound and zero failure probability.
Compatible additive/Lipschitz errors compose bounds additively and probabilities by union bound.
CountSketch uses an L2-frequency theorem and must never reuse CMS`s L1 theorem.
Accuracy-budget allocation
The full root epsilon/delta must not be allocated independently to every approximate layer. An AccuracyBudgetAllocator enumerates finite allocations; each allocation produces parameters through existing sizing, and candidates whose propagated guarantees miss the target are rejected before global selection.
Initial additive allocation may split epsilon and delta evenly across approximate layers. Root QueryRequirements.accuracy and explicitly supplied local AggIntent.accuracy must have documented precedence.
Cost model
Accuracy allocation changes state/update/read costs, but correctness filtering happens first. Recurring costs use explicit units and rates; shared state is counted once. One-shot plus recurring work requires an explicit horizon. Unknown statistics must not become zero.
PR #303 implements the four requested Planner-side guarantees. ASAPPlanner remains a mathematical planner and does not import asap_sketchlib; runtime observations are a separate evidence source that can instantiate symbolic terms later.
Completed in ASAPPlanner
TopK membership-margin certificates: carry widened selected/excluded boundary intervals and their union-bound failure probability; certify only strict separation and reject missing, invalid, or overlapping evidence.
CountSketch L2 sizing and propagation: add L2Frequency, sqrt(3 / width) * ||f||_2, epsilon-derived width, delta-derived odd median depth, and a conservative Hoeffding failure bound. CMS posterior L1 relaxation is not reused.
Hydra shared-grid composition: add inner and outer collision bounds and union-bound their failure probabilities. Deployment/data-dependent leaves stay symbolic and fail closed until instantiated.
KLL/HLL/KMV/Theta confidence: attach conservative 99%-confidence contracts to committed parameters; reject tighter unsupported confidence and targets missed because of parameter caps.
Check parameter-derived guarantees against targets even for exact inputs, before cost ranking.
Add unit/integration coverage and document the contracts.
Remaining evidence/runtime integration
Feed runtime or planning-time TopK boundary intervals into PropagationStats; static candidates remain rejected without evidence.
Instantiate CountSketch stream-L2 and Hydra shared-grid symbolic statistics from a serving implementation when concrete absolute bounds are required.
Add an implementation-specific amplification/confidence model if confidence tighter than the built-in 99% contract is required.
Preserve imported evidence as GuaranteeSource::RuntimeObservation and export it through DAG JSON.
Keep affected candidates fail-closed when required evidence is unavailable.
Non-goals and related follow-up
Do not add a second correctness-policy enum.
Do not assume statistical independence by default.
Do not claim arbitrary cross-sketch or nonlinear composition.
Context
ASAPPlanner can structurally nest
SummaryAggnodes, but selected post-ASAP plans need machine-readable end-to-end error guarantees. Approximate parents must not consume approximate children unless their composed guarantee satisfies the callers existingAccuracyTarget`.Accuracy legality and cost ranking are separate responsibilities.
Required planning pipeline
CostModelmust not override accuracy legality.Accuracy model and typed guarantees
The deployment-extensible
AccuracyModelsupplies local guarantees, propagates them through aCompositionOperator, and checks the result againstAccuracyTarget. Guarantees retain typed metrics rather than reducing every error to an unqualified epsilon:BoundExprandProbabilityExprare serializable expression vocabularies. Provenance records selected parameters, child guarantees, composition steps, runtime observations, and unavailable statistics. Caller-visible guarantees belong on finalized/readout values; exact outputs have zero error.Core propagation rules
The default model is conservative and fail-closed:
e_inner + e_outer + e_inner * e_outer.TopK membership requires widened per-key confidence intervals and is certified only when:
CountSketch uses an L2-frequency theorem and must never reuse CMS`s L1 theorem.
Accuracy-budget allocation
The full root epsilon/delta must not be allocated independently to every approximate layer. An
AccuracyBudgetAllocatorenumerates finite allocations; each allocation produces parameters through existing sizing, and candidates whose propagated guarantees miss the target are rejected before global selection.Initial additive allocation may split epsilon and delta evenly across approximate layers. Root
QueryRequirements.accuracyand explicitly supplied localAggIntent.accuracymust have documented precedence.Cost model
Accuracy allocation changes state/update/read costs, but correctness filtering happens first. Recurring costs use explicit units and rates; shared state is counted once. One-shot plus recurring work requires an explicit horizon. Unknown statistics must not become zero.
Acceptance criteria
AccuracyTargetbefore costing.PR #303 implementation status
PR #303 implements the four requested Planner-side guarantees. ASAPPlanner remains a mathematical planner and does not import
asap_sketchlib; runtime observations are a separate evidence source that can instantiate symbolic terms later.Completed in ASAPPlanner
L2Frequency,sqrt(3 / width) * ||f||_2, epsilon-derived width, delta-derived odd median depth, and a conservative Hoeffding failure bound. CMS posterior L1 relaxation is not reused.Remaining evidence/runtime integration
PropagationStats; static candidates remain rejected without evidence.GuaranteeSource::RuntimeObservationand export it through DAG JSON.Non-goals and related follow-up