Symbolic cognition engine for epistemic drift, rupture detection, and realignment.
Project description
Cognize
Give any Python system cognition.
Cognize is a symbolic cognition layer for Python systems — from LLMs to agents to simulations.
It enables programmable epistemic control by modeling belief (V), reality (R), misalignment (∆), memory (E), and rupture (Θ).
Features
- Drift-aware cognition engine (
EpistemicState) - Programmable rupture thresholds and realignment logic
- Symbolic rupture and collapse modeling
- Supports high-dimensional reality inputs (e.g., embeddings)
- Export cognition logs (
.json,.csv) for external audits - Control layer for hallucination detection in LLMs or symbolic gating in agents
- Minimal, extensible, domain-agnostic
- Built with symbolic state logic — extensible for memory, attention, or projection systems
Installation
pip install cognize
Core Concepts
| Symbol | Meaning |
|---|---|
V |
Projection (belief) |
R |
Reality (signal) |
∆ |
Distortion |
Θ |
Tolerance threshold |
E |
Misalignment memory |
⊙ |
Stable |
⚠ |
Rupture |
∅ |
No signal yet |
Example Usage
from cognize import EpistemicState
# Scalar-based epistemic drift tracking
e = EpistemicState(V0=0.0, threshold=0.4)
for R in [0.1, 0.3, 0.6, 0.8]:
e.receive(R)
print(e.symbol(), e.summary())
# Access rolling drift statistics
print(e.drift_stats(window=3))
# Trigger fallback if cognitive rupture risk is too high
e.intervene_if_ruptured(lambda: print("⚠ Intervention triggered!"))
# Manually realign belief to current signal
e.realign(R=0.7)
# Export logs
e.export_json("cognition.json")
e.export_csv("cognition.csv")
Expected Output:
⊙ {'V': 0.03, 'E': 0.01, 'Θ': 0.4, ...}
⊙ {...}
⚠ {'V': 0.0, 'E': 0.0, 'Θ': 0.4, ...}
{'mean_drift': 0.24, 'std_drift': 0.13, 'max_drift': 0.3, 'min_drift': 0.1}
⚠ Intervention triggered!
Sample cognition.json output:
[
{
"t": 0,
"V": 0.03,
"R": 0.1,
"delta": 0.1,
"Θ": 0.4,
"ruptured": false,
"symbol": "⊙",
"source": "default"
},
...
]
Cognize also supports vector input (e.g. NumPy arrays) for multi-dimensional drift modeling — useful for embeddings or continuous signals.
License
Cognize is released under the Apache 2.0 License.
© 2025 Pulikanti Sashi Bharadwaj
Original work licensed under Apache 2.0
Project details
Release history Release notifications | RSS feed
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 cognize-0.1.0.tar.gz.
File metadata
- Download URL: cognize-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49c47653c556d787ef83e55f6d12c6fa294133b76db9ca04c99e16b29eda980f
|
|
| MD5 |
4db8a195d6b6653213162a49b8eb42ff
|
|
| BLAKE2b-256 |
7dd6505789c98906bdec6614aee8215f92008a7c72f05187707bcf2128aac213
|
File details
Details for the file cognize-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cognize-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f52ce714e7449c38a089c6340abcfdef607b53e6d9c6a3706403c54715f742d2
|
|
| MD5 |
1af7c18be480b924015c9737835dce79
|
|
| BLAKE2b-256 |
edf078e4984e34e43f5cd19d5a014ab8cbc46bc587d1ee01084ee206777afbe1
|