PhaseBridge — Phase Interchange Format (PIF)

A strict, lossless bridge between discrete alphabets and continuous phase space.

Status: reference implementation

Overview

PhaseBridge (PIF) defines a minimal, verifiable data representation that maps discrete alphabets (uintM) to a continuous phase domain θ ∈ [0, 2π) and back — losslessly under the declared alphabet. PIF packages a small JSON schema, optional MessagePack serialization, integrity checks (SHA-256), and a single diagnostic coherence metric κ that is meaningful across time series and images.

Why PhaseBridge?

  • Multi-modal pipelines mix formats (tables, images, signals) and need a lightweight, auditable interchange layer.
  • Existing containers/codecs focus on storage/compression; learned embeddings sacrifice invertibility.
  • PhaseBridge provides strict round-trip guarantees, simple integrity verification, and a unified diagnostic signal — ideal where reversibility and trust matter.

Key benefits

  • Bit-exact round-trip when meta.note = "no_processing".
  • Integrity via optional meta.hash_raw (SHA-256).
  • Universal diagnostic κ (coherence) usable across modalities.
  • Lightweight integration: reference Python SDK, CLI tools, JSON Schema.
  • Conformance tests and property-based round-trip checks included.

How it works — the minimal flow

  1. Declare alphabet — define schema.alphabet.M.

  2. Encode — map discrete symbol n ∈ {0..M−1} to θ = 2π·n/M (stored as float64).

  3. Package — produce a PIF record (schema, θ, optional amplitude, meta, optional hash).

  4. Validatepb-validate checks format, hash and κ diagnostics.

  5. Decodepb-decode reconstructs discrete symbols exactly (if no-processing mode used).

Project status

When to use PhaseBridge (use cases)

  • You need strict, reversible representation for archival or verification.

  • You require run-time integrity checks at integration boundaries.

  • You want a single, modality-agnostic diagnostic (κ) for monitoring structural coherence.

  • Research prototypes, cognitive pipelines, and experimental multimodal stacks where invertibility matters.

Limitations & notes

  • Round-trip guarantees assume IEEE-754 float64 and declared alphabet constraints (M ≤ 2³²).

  • PhaseBridge is not a compression codec for storage savings — it is a representational substrate focused on reversibility and diagnostics.

  • Do not use for already lossy or corrupted pipelines unless data are explicitly marked as processed (meta.note).

Repo contents & architecture (what you’ll find)

  • S1PhaseCodec — core n↔θ codec for lossless mapping.

  • PIF dataclass & JSON Schema — canonical record format (v1).

  • CLI tools: pb-encode, pb-decode, pb-validate, pb-kappa.

  • Conformance suite — property-based tests and example round-trip cases.

  • Examples — image/time series round trips and kappa monitoring.

Contributing & community

License & releases

  • Check repository root for license (MIT). We recommend tagging releases and archiving on Zenodo for DOI/long-term citation (Zenodo already hosts the preprint).

Bring explainable intelligence with NSI

We are opening pilot projects in finance, telecom, industry, healthcare — and beyond. NSI delivers real-time semantic alerts, explainable pattern libraries, and adaptive system maps.

Name
Company
Email *

©SynqraTech, 2025

Build systems that reconstruct the structure of reality