Skip to main content

UNIVERSAL_LOG (v7.7.0)

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

Domain-agnostic structural threshold detection and falsification for time series and multidimensional systems.


Overview

UNIVERSAL_LOG is a statistical instrument for detecting regime changes, abrupt jumps, slope breaks, and structural phase transitions without domain priors. It combines vectorized sliding-window effect sizes, multi-channel structural detectors, permutation-based and AR(1) 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.6.0)
│   ├── __init__.py                  # Public API exports (13 symbols)
│   ├── __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, permutation tests
│   ├── estimators.py                # 29 complexity estimators (incl. autonomous H0_UnionFind) + calibrated T_log
│   ├── detection.py                 # Vectorized scans, 5 structural channels, cascade
│   ├── falsification.py             # Falsification suite, AR(1)/ARIMA(1,1,0)/vol_arima_0_1_0, walk-forward, 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
│   └── regression.py                # Built-in non-regression self-tests
├── 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.6.0/ # Pointer to universal_log/ & monoliths/
├── monoliths/                       # Generated single-file Voie 3 monoliths (.py & .ipynb, v7.6.0)
├── theory/                          # Theoretical T_log corpus (original concept + calibrated v7.4/v7.5)
├── docs/                            # Technical, testing, real-data, and canonical T_log spec
├── tools/                           # Monolith builders, SHA-256 manifest, whitepaper sync, track comparator
├── UNIVERSAL_LOG_v7.1.5_universal.py # Backward-compatible CLI/import shim (delegates to v7.6.0)
├── datasets/                        # 9 synthetic benchmark CSVs + metadata
├── datasets_real/                   # 19 real non-synthetic empirical CSVs (+ occupancy) + metadata
├── datasets_holdout*/               # 6 chronological SHA-256 blind holdout cohorts (R, v731, v732, v740, v750, v760)
├── tests/                           # Unit tests (37), SOTA benchmark, H0 IAAFT replication, holdout/showcase, ablation, viz
├── notebooks/exploration.ipynb      # Interactive Jupyter exploration notebook
├── .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.6.0.post1},
  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.7.0

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.7.0
File Size Uploaded Provenance Actions
universal_log_ts-7.7.0.tar.gz 95.1 kB With provenance Details for universal_log_ts-7.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 181.3 kB

Release files / universal_log_ts-7.7.0.tar.gz

Download URL universal_log_ts-7.7.0.tar.gz
Size 95.1 kB
Tags Source
SHA-256 checksum
How to use checksums
27102330b32a7bd1fddc4f0d89682e0e7cd915accb6ae69650610a7d90af3960
BLAKE2b-256 checksum
How to use checksums
7e80d6bde27442b995ae82e392b61b8b0035f15525bdbeeb56549648fcc277f5
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.7.0-py3-none-any.whl

Download URL universal_log_ts-7.7.0-py3-none-any.whl
Size 86.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
653d629b6d464c819639d7a612356aecc6b9630e8c2fa49a3d6d5bd057736472
BLAKE2b-256 checksum
How to use checksums
a68225239e294898d2e63fbf354415c2d550cf52bedbf267a178e85179d05750
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.7.0

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