Skip to main content

UNIVERSAL_LOG (v7.8.1)

CI/CD Pipeline PyPI version DOI Release Python 3.10–3.12 License: MIT Open In Colab Live Showcase

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 Open In Colab
notebooks/02_multi_regime_and_multivariate.ipynb Multi-Regime (detect_multi_regime) + v7.8.0 Cholesky Multivariate Falsification (scan_multivariate_channels) Open In Colab
notebooks/03_pdac_immune_gradient_audit.ipynb 4-Cohort PDAC Continuous Immune Gradient vs Discrete Subtype Audit Open In Colab
monoliths/UNIVERSAL_LOG_v7.8.1_universal.ipynb Self-Contained Single-File Package Monolith (Zero External Install) Open In Colab

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: Direction equals the empirical sign of Cohen's d (verified at runtime by column-rename invariance tests).
  • 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, white-noise nulls, shuffled-target nulls, AR(1) surrogate nulls, split-half checks, multi-window stability, and walk-forward validation.
  • 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-Rips PersistentHomology; autonomous H0_UnionFind fallback 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.8.0)
│   ├── __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 & 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, Cholesky multivariate surrogate, cascade
│   ├── falsification.py             # Falsification suite, AR(1)/ARIMA/vol surrogates, multi-regime detector, grading
│   ├── diagnostics.py               # Optional segmented MC + Step 1-4 suite
│   ├── levels.py                    # L1..L7 universal structural diagnostics
│   ├── prediction.py                # Locked cross-study motif prediction
│   ├── 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 (24 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.8.0)
├── 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, 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.8.0)
├── datasets/                        # 9 synthetic benchmark CSVs + metadata
├── datasets_real/                   # 19 real non-synthetic empirical CSVs (+ occupancy) + metadata
├── datasets_holdout*/               # 8 chronological SHA-256 blind holdout cohorts (R, v731..v780)
├── tests/                           # Unit tests (45), 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, or full.
  • --detection-mode: auto (selects among level_shift, detrended_jump, and slope_break when appropriate) or mean (raw level shift only).
  • --output: Output directory (default: ./results_v7).
  • --complexity-diagnostics: Enable exploratory calibrated T_log, full-flux estimators, and L7 sliding-window interactions (disabled by default on the standard analyze() path; required by predict_universal()). A single-pass L5 pre/post-$T_0$ contrast across the 13 unique dimension estimators always runs on the default path as a non-voting descriptor.
  • --describe-limits: Print frozen DEFAULT_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:

  1. results.json: Full structured output (universal_contract, scan, level_shift_scan, structural_scans, cascade, levels L1–L7, falsification, walk_forward, grade, estimators_by_flux, t_log_target, invariance_rename_test, manifest).
  2. thresholds.csv: Central threshold $T_0$ and 5-point derivative cascade ($T_{-2}, T_{-1}, T_0, T_{+1}, T_{+2}$).
  3. report.txt: Concise human-readable summary.
  4. 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

STATUS: Threshold detection and falsification instrument.

  • NOT scientific proof of a causal theory.
  • NOT a medical diagnosis.
  • NOT financial advice.

All detected thresholds (even Grade A) must be interpreted cautiously and replicated on independent data.


Documentation & Governance


Citation

If you use UNIVERSAL_LOG (universal-log-ts) in your research, please cite the archived Zenodo release (CITATION.cff):

@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.8.1},
  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.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for universal-log-ts 7.8.1
File Size Uploaded Provenance Actions
universal_log_ts-7.8.1.tar.gz 103.4 kB With provenance Details for universal_log_ts-7.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for universal-log-ts 7.8.1
File Interpreter ABI Platform Actions
universal_log_ts-7.8.1-py3-none-any.whl Python 3 none any Details for universal_log_ts-7.8.1-py3-none-any.whl

Total release size: 194.9 kB

Release files / universal_log_ts-7.8.1.tar.gz

Download URL universal_log_ts-7.8.1.tar.gz
Size 103.4 kB
Tags Source
SHA-256 checksum
How to use checksums
55673703d726247a692b1ff2c0837fe988f1aff6b483eecae75edec3b14630c2
BLAKE2b-256 checksum
How to use checksums
647f8c33e5eaba570f06962fe04715bd858bb6d923b82f78fe29242c85244491
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 log

Release files / universal_log_ts-7.8.1-py3-none-any.whl

Download URL universal_log_ts-7.8.1-py3-none-any.whl
Size 91.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b29c95ba87141781da5a14bdb4418abbe1ed4363699f0a27475de2f486e70fb
BLAKE2b-256 checksum
How to use checksums
b704fe63113706405f61f0d8c8bc142cb86fd5fba29e9701a10c88407b9aed3f
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 log

Security for universal-log-ts 7.8.1

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.

Select from 2 files

Attestation for universal_log_ts-7.8.1.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page