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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chronofy-0.1.1.tar.gz.
File metadata
- Download URL: chronofy-0.1.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.2 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6aefa47b8c497756cc85aface0172fe6296f0f17814e919d4a065bfc0a1dcbd
|
|
| MD5 |
a26a6d4d4db78c63c4dc01458f4263f5
|
|
| BLAKE2b-256 |
286a8ab2478bd6b8bccece3d21bc0c990353af3fe27770a8740b207b89b7eb9c
|
File details
Details for the file chronofy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: chronofy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.2 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
631c381c553d730f7774004640b72acb4ec6d9fc50d94c1ee8feee79568ffd5b
|
|
| MD5 |
9b8b33ceaf1f2803ada4723075a022ba
|
|
| BLAKE2b-256 |
3c9ce60fd46fca0b8e19f4e1957e195b8f6cabeaeb3fabb55a7f20905bebef38
|