HomeDocs-Technical WhitePaper14-EFT.WP.Methods.Inference v1.0

Chapter 6: Online/Offline Consistency


I. Scope & Objectives

  1. Define and operationalize the consistency goals, metrology, and pass gates between offline batch inference and online real-time inference, covering time-base alignment, window replay, feature parity, model numeric conventions, and shielding strategies for runtime differences.
  2. Target outputs
    • Consistency metric and thresholds: delta_offon, R_infer = 1 - delta_offon, tau_offon.
    • Feature parity and window replay conventions: delta_feat, window = {context, history, lookahead=0}.
    • Time-base alignment parameters: alpha, beta with the fitting report fit.
    • Operational playbooks and acceptance flow: executable steps and rollback conditions for Mx-54 → Mx-58.
  3. Intended readers: data & feature engineering, model development, inference & scheduling platforms, SRE, and compliance teams.

II. Terms & Symbols

  1. Outputs & consistency
    • y_hat_off (offline output), y_hat_on (online output),
      delta_offon = ( norm( y_hat_off - y_hat_on ) / norm( y_hat_off ) ), R_infer = 1 - delta_offon.
    • Decision consistency: err_decision = ( 1 / N ) * Σ 1[ argmax( y_hat_off ) != argmax( y_hat_on ) ].
  2. Time base & windows
    • tau_mono (monotonic internal time), ts (published wall time), ts = alpha + beta * tau_mono.
    • Event vs. processing time: t_ev, t_proc; watermark; lateness threshold lateness_max.
    • Window replay window = {context, history, lookahead=0}; replay anchor anchor.
  3. Features & lineage
    • Feature vector phi(x,t); feature parity
      delta_feat = ( norm( phi_off - phi_on ) / norm( phi_off ) ).
    • Versions & signatures: hash(•), fingerprint, EnvLock, ModelCard, PipelineCard.
  4. Spectral & time-domain checks
    S_xx(f) (power spectral density), spectral discrepancy delta_psd, window function U_w and ENBW.
  5. Concurrency & observability
    TS.latency, TS.thrpt, TS.error, hb (happens-before).

III. Postulates & Minimal Equations


IV. Data & Manifest Conventions


V. Algorithms & Implementation Bindings

  1. Recommended prototypes & responsibilities
    • I40-8 align_timebase(trace:any, reference:any) -> {alpha:float, beta:float, fit:dict}: fit and validate the ts ↔ tau_mono mapping.
    • I40-10 compare_offline_online(off:any, on:any, policy:dict) -> ConsistencyReport: align windows and time base; compute delta_feat, delta_offon, err_decision, delta_psd and the pass verdict.
    • I40-7 monitor_drift(stream:any, spec:dict) -> DriftReport: pause consistency conclusions and enter rollback path if a drift alert fires.
    • I40-4 score_predictions(y_true:any, y_pred:any, metrics:dict) -> ScoreReport: joint reporting of consistency and accuracy.
    • I40-23 rebuild_feature_window(log:any, window:dict) -> batch: replay offline windows based on anchor and window.
    • I40-24 reconcile_dedup(stream:any, policy:dict) -> stream: unify dedup and lateness handling.
  2. ConsistencyReport minimal fields
    delta_feat, delta_offon, R_infer, err_decision, delta_psd, alpha,beta,fit, coverage (valid sample ratio), policy (thresholds), pass (bool), notes.

VI. Metrology Flows & Run Diagram


VII. Verification & Test Matrix

  1. Minimum required cases
    • Time-base alignment regression: fit alpha,beta on multi-segment traces, require fit.R2 >= r2_min.
    • Window replay correctness: construct data with lateness and duplicates; validate the unified conventions of I40-23 and I40-24.
    • Feature parity: set gates for delta_feat across four canonical feature types—standardization, discretization, temporal smoothing, and missing imputation.
    • Output parity: validate delta_offon (regression) and err_decision (classification).
    • Spectral parity: compute delta_psd for time-series outputs and publish U_w and ENBW.
    • Masking nondeterministic sources: verify that disabling rng and atomic* reduces delta_offon into the gate.
    • Exception propagation: unify handling for nan/inf, extremes, and empty windows.
  2. Boundary & extreme scenarios
    Heavy lateness lateness >> lateness_max, reordering and bulk backfills; peak-time resource jitter causing TS.latency spikes; abrupt changes from quantization or kernel-algorithm switches.

VIII. Cross-References & Dependencies

Align with Chapter 3 P41-2 and S42-16 on spectral and time-base conventions; with Chapter 4 on feature interfaces and lineage fields; with Chapter 5 on numerics, quantization conventions, and determinism; with Chapter 8 on TS.* and SLO joint acceptance. For reproducibility, depend on EFT.WP.Methods.Repro Chapters 6 and 9 for time and run audits.

IX. Risks, Limitations & Open Questions


X. Deliverables & Versioning

  1. Deliverables
    • ConsistencyReport.json (containing delta_feat, delta_offon, R_infer, err_decision, delta_psd, alpha, beta, fit, coverage, pass),
    • AlignTimebaseReport.md,
    • WindowRebuildLog and DedupPolicy.yaml,
    • Snapshot fingerprints for the corresponding ModelCard, PipelineCard, and EnvLock.
  2. Versioning policy
    Any change to window, dedup policy, lateness thresholds, dtype_policy, quant_scheme, kernel versions, or operator-fusion rules must bump the minor version, re-run Mx-54 → Mx-58, and register in Appendix C with
    fingerprint = hash( policy || window || kernels || quant ).

Copyright & License (CC BY 4.0)

Copyright: Unless otherwise noted, the copyright of “Energy Filament Theory” (text, charts, illustrations, symbols, and formulas) belongs to the author “Guanglin Tu”.
License: This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, redistribute, excerpt, adapt, and share for commercial or non‑commercial purposes with proper attribution.
Suggested attribution: Author: “Guanglin Tu”; Work: “Energy Filament Theory”; Source: energyfilament.org; License: CC BY 4.0.

First published: 2025-11-11|Current version:v5.1
License link:https://creativecommons.org/licenses/by/4.0/