Skip to main content

Temporal validity framework for time-aware AI systems. Implements the Temporal-Logical Decay Architecture (TLDA) for retrieval-augmented generation.

Project description

Chronofy

Temporal validity framework for time-aware AI systems.

Chronofy implements the Temporal-Logical Decay Architecture (TLDA), a three-layer neuro-symbolic framework that embeds temporal validity directly into the representation, retrieval, and reasoning layers of Retrieval-Augmented Generation (RAG) systems.

The Problem

Current RAG systems treat all retrieved facts as equally valid regardless of when they were recorded. A clinical lab reading from yesterday and one from six months ago get weighted identically if they're semantically similar to the query. This causes temporal hallucination — plausible but factually obsolete outputs.

The Solution

Chronofy provides three layers of temporal protection:

  • Layer 1 — Temporal Embeddings: Reserves dedicated dimensions in embedding vectors for temporal information, making fact age structurally irremovable from the representation.
  • Layer 2 — Decay-Weighted Retrieval: Integrates learnable exponential decay functions into graph-based retrieval, where decay rates are grounded in Bayesian decision theory.
  • Layer 3 — STL Verification: Applies Signal Temporal Logic robustness functions to verify the temporal validity of retrieved knowledge throughout the reasoning chain.

Installation

pip install chronofy

With optional dependencies:

pip install chronofy[graph]   # NetworkX for graph-based retrieval
pip install chronofy[ml]      # PyTorch + sentence-transformers for embeddings
pip install chronofy[all]     # Everything

Quick Start

from chronofy import TemporalFact, ExponentialDecay, EpistemicFilter
from datetime import datetime, timedelta

# Define facts with timestamps
facts = [
    TemporalFact(
        content="Patient serum potassium: 4.1 mEq/L",
        timestamp=datetime.now() - timedelta(days=1),
        fact_type="vital_sign",
        source_quality=0.95,
    ),
    TemporalFact(
        content="Patient serum potassium: 3.2 mEq/L",
        timestamp=datetime.now() - timedelta(days=180),
        fact_type="vital_sign",
        source_quality=0.95,
    ),
    TemporalFact(
        content="Patient blood type: O+",
        timestamp=datetime.now() - timedelta(days=3650),
        fact_type="demographic",
        source_quality=1.0,
    ),
]

# Configure decay rates per fact type (beta = 2 * kappa)
decay = ExponentialDecay(
    beta={
        "vital_sign": 5.0,      # High volatility — decays in days
        "medication": 1.0,       # Medium — decays in weeks
        "chronic_condition": 0.01,  # Low — stable over months
        "demographic": 0.0,      # Invariant — never decays
    }
)

# Filter facts by temporal validity
query_time = datetime.now()
ep_filter = EpistemicFilter(decay_fn=decay, threshold=0.1)
valid_facts = ep_filter.filter(facts, query_time)

for fact in valid_facts:
    score = decay.compute(fact, query_time)
    print(f"  [{score:.3f}] {fact.content}")

Decision-Theoretic Grounding

The decay coefficient β is not an arbitrary hyperparameter. Under Gaussian latent dynamics (Ornstein-Uhlenbeck process), the information-theoretically optimal decay rate is:

β = 2κ

where κ is the mean-reversion rate of the underlying process. This means:

  • High κ (volatile processes like vital signs) → high β → fast decay
  • Low κ (stable processes like genetic markers) → low β → slow/no decay

See our paper for the full derivation: Chronofy: A Temporal-Logical Decay Architecture for Information Validity in Time-Aware RAG (IEEE IRI 2026).

Architecture

┌─────────────────────────────────────────────┐
│              Chronofy Pipeline               │
├─────────────┬───────────────┬───────────────┤
│  Layer 1    │   Layer 2     │   Layer 3     │
│  Temporal   │   Decay-      │   STL         │
│  Embedding  │   Weighted    │   Robustness  │
│             │   Retrieval   │   Verification│
├─────────────┼───────────────┼───────────────┤
│ TMRL-style  │ exp(-β·Δt)    │ G[0,n](v≥γ)  │
│ subspace    │ graph walk    │ weakest-link  │
│ encoding    │ + epistemic   │ bound +       │
│             │ filter        │ re-acquisition│
└─────────────┴───────────────┴───────────────┘

Citation

@inproceedings{syed2026chronofy,
  title={Chronofy: A Temporal-Logical Decay Architecture for Information Validity in Time-Aware Retrieval-Augmented Generation},
  author={Syed, Muntaser},
  booktitle={Proc. IEEE International Conference on Information Reuse and Integration (IRI)},
  year={2026}
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chronofy-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chronofy-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file chronofy-0.1.0.tar.gz.

File metadata

  • Download URL: chronofy-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.2 Windows/11

File hashes

Hashes for chronofy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ac55e620533114a48716959a150ca0e8676f04024da1ef0447a356c8412234a4
MD5 729e941e9c0ea068cac5956d24f2b957
BLAKE2b-256 efe7654ca54f89d61f3b6770c7afc1e48fc39a0c5fc49751b1bb6aa241d7fe1b

See more details on using hashes here.

File details

Details for the file chronofy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chronofy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.2 Windows/11

File hashes

Hashes for chronofy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70932be9d526c7d2036b0f23593bc051e5a13cbd8a1f71c5420ad9dbdf022419
MD5 1e7ca33e8a818efed69cfec46554cf12
BLAKE2b-256 fe66085ba2cd012e9a883c9932931ed3c3cca6d8781ac6887c1ecce421b87fae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page