UNIVERSAL_LOG (v7.9.2)
Domain-agnostic structural threshold, multi-regime, and multivariate break detection with multi-null falsification for time series.
Interactive Google Colab Notebooks (One-Click)
| Notebook | What You Can Run in 60 Seconds | Launch |
|---|---|---|
notebooks/01_quickstart_univariate.ipynb |
Univariate Step vs Random Walk vs Smooth Ramp + Inline HTML5/SVG Report | |
notebooks/02_multi_regime_and_multivariate.ipynb |
Multi-Regime (detect_multi_regime) + v7.8.0 Cholesky Multivariate Falsification (scan_multivariate_channels) |
|
notebooks/03_pdac_immune_gradient_audit.ipynb |
4-Cohort PDAC Continuous Immune Gradient vs Discrete Subtype Audit | |
monoliths/UNIVERSAL_LOG_v7.9.2_universal.ipynb |
Self-Contained Single-File Package Monolith (Zero External Install) |
Overview
UNIVERSAL_LOG is a statistical instrument for detecting regime changes, abrupt jumps, slope breaks, multi-regime transitions, and synchronized multivariate breaks without domain priors. It combines vectorized sliding-window effect sizes, multi-channel structural detectors, permutation-based and Marriott–Pope AR(1)/ARIMA/Cholesky-multivariate falsification suites, walk-forward validation, and 29 complexity/topological estimators organized across levels L1–L7.
Core Design Principles (v7)
- P1 — Zero domain priors: No domain names, domain lexicons, or domain-tuned heuristics in code.
- P2 — No hand-tuned weights: Inverse-variance stability weighting (
1 / (1 + CV)), or equal weights. - P3 — Name-invariant direction & verdict: Direction equals the empirical sign of Cohen's d, and all random null streams seed from canonical IEEE-754 numeric
values_hash_sha256(so renaming columns or switching CSV/DataFrame leaves detector, cut, effect size, p-value, and Grade bit-for-bit invariant, verified at runtime). - P4 — No harmonic prior: Uniform Monte Carlo and permutation nulls; harmonic jitter is an optional comparative ablation only.
- P5 — Falsification first: Every threshold faces permutation-corrected scans,
B=100vectorized white-noise and shuffled-target nulls, physical-axis OLS + smooth quadratic curvature guard ($H_{0,\text{quad}}$), AR(1)/ARIMA/volatility surrogate nulls, split-half checks, multi-window stability, and expanding-window walk-forward persistence. - P6 — Effect + CI + p: Never a bare score alone.
- P7 — Full reproducibility: Fixed seeds, input/code metadata, SHA-256 hashes, and deterministic outputs.
- P8 — Calibrated diagnostic ($T_{\log}$): $T_{\log}$ is explicitly calibrated against its temporal permutation null and serves strictly as a diagnostic, never as proof.
Installation
Requirements
- Python 3.10+
numpy,pandas,scipy(core)matplotlib,seaborn(visualization)pytest,pytest-cov(testing)ripser(optional, for Vietoris-RipsPersistentHomology; autonomousH0_UnionFindfallback built-in since v7.6.0)
Editable / Local Install
# Install from PyPI (import name: universal_log)
pip install universal-log-ts
# Or editable local install from source
pip install -r requirements.txt
pip install -e ".[dev]"
With optional persistent homology support:
pip install -e ".[dev,full]"
Project Structure
11-27-2026/
├── LIVRE_BLANC.md # Master living whitepaper ("monolithe pour tous", auto-synced)
├── universal_log/ # Voie 3 (canonical): modular Python package (v7.9.2)
│ ├── __init__.py # Public API exports (15 symbols incl. detect_multi_regime & scan_multivariate_channels)
│ ├── __main__.py # Entry point for `python -m universal_log`
│ ├── cli.py # CLI argument parser & --describe-limits
│ ├── config.py # UniversalConfig & mode presets
│ ├── data.py # UniversalDataset loader, canonical values_hash, axis regularity & synthetic demos
│ ├── stats.py # Cohen's d, bootstrap CI, vectorized permutation tests
│ ├── estimators.py # 29 complexity estimators (incl. autonomous H0_UnionFind) + calibrated T_log
│ ├── detection.py # Vectorized scans, 5 structural channels (physical-axis OLS + two_lines_x phi_within + H0_quad), Cholesky MV surrogate
│ ├── falsification.py # Falsification suite (B=100 nulls), AR(1)/ARIMA/vol surrogates, multi-regime, causal walk-forward, grading
│ ├── diagnostics.py # Optional segmented MC + Step 1-4 suite
│ ├── levels.py # L1..L7 universal structural diagnostics (pre-holdout L7 boundaries & motifs)
│ ├── prediction.py # Locked cross-study motif prediction (deduplicated replications, pre-holdout verified)
│ ├── pipeline.py # analyze() orchestration & exports
│ ├── report_html.py # Self-contained offline HTML5/SVG report renderer (incl. multi-regime bands)
│ └── regression.py # Built-in non-regression self-tests (31 checks)
├── tracks/ # The analytical tracks (Voie 1, Voie 1.1, Voie 2, Voie 3 pointer)
│ ├── README.md # Comparative guide & CLI invocation for all tracks
│ ├── voie_1_holographique_v6.5.0/ # Voie 1: holographic 2-layer T_log, 3-anchor triangulation, CSD, L1-L7a/b
│ ├── voie_1_holographique_v6.6.0/ # Voie 1.1: calibrated double-null holographic track (30-60x faster, H0_UnionFind)
│ ├── voie_2_socle_p1_p8_v7.1.5/ # Voie 2: minimalist P1-P8 single-channel baseline + 3-cohort MC
│ └── voie_3_instrument_calibre_v7.8.0/ # Pointer to universal_log/ & monoliths/
├── monoliths/ # Generated single-file Voie 3 monoliths (.py & .ipynb, v7.9.2)
├── notebooks/ # 3 one-click Google Colab notebooks + exploration.ipynb
├── theory/ # Theoretical T_log corpus (original concept + calibrated v7.4/v7.5)
├── docs/ # GitHub Pages showcase, quickstart, testing, real-data, audits, and canonical T_log spec
├── tools/ # Monolith builders, preprint PDF compiler, figures, SHA-256 manifest, whitepaper sync
├── UNIVERSAL_LOG_v7.1.5_universal.py # Backward-compatible CLI/import shim (delegates to v7.9.2)
├── datasets/ # 9 synthetic benchmark CSVs + metadata
├── datasets_real/ # 19 real non-synthetic empirical CSVs (+ occupancy) + metadata
├── datasets_holdout*/ # 12 chronological SHA-256 blind holdout cohorts (R, v731..v792b)
├── tests/ # Unit tests (62), SOTA & multi-regime vs ruptures benchmarks, MC calibrations, holdouts
├── .github/workflows/ci.yml # Automated CI/CD pipeline
├── MANIFEST.sha256 # Complete SHA-256 provenance manifest
├── pyproject.toml # Package configuration
├── pytest.ini # Pytest configuration
├── requirements.txt # Python dependencies
└── LICENSE # MIT License
Usage
Command Line
# Analyze a CSV / Parquet / JSON dataset
python -m universal_log --input datasets/demo_step.csv --mode fast --output results/demo_step
# Or via installed console script (after `pip install -e .`)
universal-log --input datasets/demo_step.csv --mode robust
# Specify explicit control and target columns
python -m universal_log --input data.csv --control time --target signal_1
# Run synthetic built-in demos
python -m universal_log --demo step
python -m universal_log --demo logistic
python -m universal_log --demo null
# Run built-in non-regression test suite
python -m universal_log --self-test
# Print frozen routing gates, stubs, surrogate rules, and non-claims
python -m universal_log --describe-limits
Key CLI Flags
--input: Path to CSV, Parquet, or JSON file.--control: Ordered control axis column name (auto-inferred if omitted).--target: Target variable column name (auto-inferred if omitted).--mode: Sampling preset:fast,robust, orfull.--detection-mode:auto(selects amonglevel_shift,detrended_jump, andslope_breakwhen appropriate) ormean(raw level shift only).--output: Output directory (default:./results_v7).--complexity-diagnostics: Enable exploratory calibratedT_log, full-flux estimators, andL7sliding-window interactions (disabled by default on the standardanalyze()path; required bypredict_universal()). A single-passL5pre/post-$T_0$ contrast across the 13 unique dimension estimators always runs on the default path as a non-voting descriptor.--describe-limits: Print frozenDEFAULT_ROUTING_GATES, estimator stubs, surrogate/grading limits, and non-claims.--full-validation: Enable heavy 3-cohort segmented MC + trajectory validation.--harmonic-ablation: Run optional harmonic-jitter robustness ablation.--seed: Random seed (default:42).
Python API
from universal_log import UniversalConfig, analyze
config = UniversalConfig(
seed=42,
mode="robust",
detection_mode="auto",
output_dir="./results_v7",
verbose=True,
)
result = analyze("datasets/demo_step.csv", config=config)
print(result["grade"]["grade"], result["scan"]["control_value"])
Execution Modes
| Mode | Bootstrap | Pairwise Permutations | Scan Permutations | MC Paths (--full-validation) |
|---|---|---|---|---|
fast |
100 | 200 | 200 | 100 |
robust |
300 | 500 | 500 | 200 |
full |
1000 | 1000 | 1000 | 400 |
Testing & Visualization
# Unit & integration tests
pytest -v
# Built-in non-regression checks
python -m universal_log --self-test
# Regenerate synthetic benchmark datasets
python tests/generate_test_datasets.py
# Run full synthetic benchmark suite and write reports to results/reports/
python tests/run_tests.py
# Run multi-mode stability comparison (fast vs robust)
python tests/run_multi_mode_tests.py
# Run cross-domain benchmark on 19 real non-synthetic empirical datasets + predict_universal() validation
python tests/run_real_datasets.py --mode fast
# Run frozen gate sensitivity ablation (+-10%, +-20%)
python tests/run_ablation.py --ablation
# Prepare blind SHA-256 holdout manifest (downloads, hashes code + data, NO analysis)
python tests/run_ablation.py --prepare-holdout
# Evaluate blind holdout ONCE (verifies code/data hashes, then runs analyze)
python tests/run_ablation.py --evaluate-holdout
# Render summary plots to results/visualizations/
python tests/visualize_results.py
Outputs
Each analyze() run writes four files into --output:
results.json: Full structured output (universal_contract,scan,level_shift_scan,structural_scans,cascade,levelsL1–L7,falsification,walk_forward,grade,estimators_by_flux,t_log_target,invariance_rename_test,manifest).thresholds.csv: Central threshold $T_0$ and 5-point derivative cascade ($T_{-2}, T_{-1}, T_0, T_{+1}, T_{+2}$).report.txt: Concise human-readable summary.report.html: Self-contained interactive HTML5/SVG visual report (series + $T_0$ + cascade $T_{-2}\dots T_{+2}$ + active transformed view + null comparison + L1–L7 & estimators) directly openable offline in any browser.
Disclaimer & Known Methodological Scope (v7.9.2)
STATUS: Threshold detection and falsification instrument.
- NOT scientific proof of a causal theory.
- NOT a medical diagnosis.
- NOT financial advice.
- Physical-axis
within_regime_ar1()(v7.9.2): Detrends each regime separately against the physical control coordinatex(residual_model = "two_lines_x", selected overcontinuous_hinge_xandrow_indexinresults/v792_phi_study/v792_phi_model_comparison.md:70/70vs64/70vs45/70on irregular/regular true slope breaks with identical1/130negative rate and0/910diffs vsv7.9.1), with segment centering and an IEEE-754 relative roundoff floor (1000 * eps * scale) so noiseless piecewise-linear hinges (with or without large constant offsets) yieldphi_within = 0.0while preserving small-amplitude noisy signals. - Walk-forward causal scope (
v7.9.1+, condition on missing data):walk_forward()selects each split's window, detector channel, preprocessing, and threshold strictly on the past prefix[:train_end](strictly_causal = True,detector_selection_scope = "past_prefix_only"). Important condition for incomplete series: because non-finite (NaN) rows are dropped upfront and expanding splits are computed by observation count (edges = np.linspace(0, n, n_splits + 1)), strict past invariance holds for fixed retained-observation count and split boundaries (mutating future finite values leaves finished splits bit-for-bit identical; turning future observations into missingNaNrows reducesnand shifts earlier split boundaries accordingly). - Pre-holdout L7 motifs (
v7.9.1+):L7freezes segment boundaries, training thresholdtrain_t0_idx, training informativeness, and candidate complementary pairs strictly before opening the held-out last segment (segment_boundary_scope = "pre_holdout_prefix_only",motif_selection_scope = "pre_holdout_segments_only"), andpredict_universal()rejects any pair peaking in the held-out segment or containing duplicate replications. - Known
detect_multi_regime()scope onvolatility_shift& smooth curves (scheduled forv7.9.3): Whenanalyze()selectsvolatility_shifton an integrated null (e.g.,h11_neg_06_rw_corr_3ch_irreg, single Grade D) or on some smooth irregular curves (h11_neg_03),detect_multi_regime()runs directly on the transformed/irregular array without a pipeline-matchedvol_arima_0_1_0surrogate or smooth-curvature guard (3/6negatives flagged bymulti_regimein the 11th holdout identically inv7.9.1andv7.9.2). Addressing multi-regime falsification on volatility-transformed series and smooth curves is scheduled forv7.9.3.
All detected thresholds (even Grade A) must be interpreted cautiously and replicated on independent data.
Documentation & Governance
- 5-Minute Quickstart (
docs/quickstart.md) —pip install universal-log-ts, CLI, Python API,detect_multi_regime(),scan_multivariate_channels(), and grading rules (installpip install "universal-log-ts[bench]"forruptures& Parquetpyarrow) - Interactive GitHub Pages Showcase (
docs/index.html) — 300 DPI figures + embedded interactive HTML5/SVG reports - Preprint PDF (
paper/UNIVERSAL_LOG_v7.9.2_preprint.pdf) ·paper/paper.md·paper/paper.bib·paper/JOSS_CHECKLIST.md— JOSS/arXiv/OSF paper + 300 DPI figures +CITATION.cff/.zenodo.json - v7.9.2 Physical-Axis
phi_withinModel Comparison · v7.9.1 → v7.9.2 Comparison (910 Trajectories, 0/910 diffs) · 12th Blind Holdout (v7.9.2final, 13/13) · 11th Blind Holdout (v7.9.2candidate8ceec6d, 10/12) · 10th Blind Holdout (v7.9.1, 13/14) · 9th Blind Holdout (v7.9.0, 12/13) · Corrected PDAC 40-Permutation Study - Archived External Technical Audit (
v7.8.0) — Independent audit at commitd02275d(910 replayed trajectories + prioritized roadmap) - Livre Blanc Complet (
LIVRE_BLANC.md) — Monolithe documentaire vivant (les 3 Voies, théorieT_log, résultats mesurés, journal) - Guide des 3 Voies (
tracks/README.md) - Spécification canonique
T_log(docs/tlog_spec.md) - T_log calibré v7.4.0 (
theory/calibrated/TLOG_calibrated_v7.4.0.md) & Concept original (theory/original/TLog_original.txt) - Technical Documentation · Testing Guide · Real Datasets Guide
- Contributing Guide (
CONTRIBUTING.md) · Code of Conduct (CODE_OF_CONDUCT.md)
Citation
If you use UNIVERSAL_LOG (universal-log-ts) in your research, please cite the archived Zenodo release (CITATION.cff):
- Concept DOI (all versions):
10.5281/zenodo.24637051 - Version DOIs:
v7.9.110.5281/zenodo.24662161·v7.9.010.5281/zenodo.24659825·v7.8.110.5281/zenodo.24656867·v7.8.010.5281/zenodo.24653639·v7.7.010.5281/zenodo.24651717·v7.6.0.post110.5281/zenodo.24637052
@software{drasse_menard_2026_universal_log,
author = {Drasse-M{\'e}nard, Zackary},
title = {{UNIVERSAL\_LOG}: Domain-Agnostic Structural Threshold Detection and Multi-Null Falsification in Time Series},
year = 2026,
publisher = {Zenodo},
version = {v7.9.2},
doi = {10.5281/zenodo.24637051},
url = {https://doi.org/10.5281/zenodo.24637051}
}
License
MIT License — see LICENSE.
Metadata
Release files for universal-log-ts 7.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| universal_log_ts-7.9.2.tar.gz | 125.8 kB | With provenance | Details for universal_log_ts-7.9.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| universal_log_ts-7.9.2-py3-none-any.whl | Python 3 | none | any | Details for universal_log_ts-7.9.2-py3-none-any.whl |
Total release size: 231.1 kB
Release files / universal_log_ts-7.9.2.tar.gz
| Download URL | universal_log_ts-7.9.2.tar.gz |
|---|---|
| Size | 125.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fea1f3ca6ca26178db9ed3ba619628f0e000d9b0d1072d937177d8f3e37971be
|
|
BLAKE2b-256 checksum How to use checksums |
081846dd2010e2b07bcee55d61370a306e0747dcab8976d42c6dac740cbf2b47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / universal_log_ts-7.9.2-py3-none-any.whl
| Download URL | universal_log_ts-7.9.2-py3-none-any.whl |
|---|---|
| Size | 105.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
397bc4a4aa01eb88a7be7eb03967853608b6588248f45da2389fe75791c58376
|
|
BLAKE2b-256 checksum How to use checksums |
e1e904c468da1f0d86a0649defeabee7e8b963e6f64b6679b1bdd55d991fceb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for universal-log-ts 7.9.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for universal_log_ts-7.9.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.