Metadata-Version: 2.4
Name: apophatic_engine
Version: 0.2.0
Summary: Apophatic noise-subtraction filter (¬X) for LLMs.
Author: xerx593, Non-Human Interlocutors
Project-URL: Homepage, https://github.com/xerx593/apophatic-engine
Project-URL: Theory Framework, https://github.com/xerx593/nicht-theory
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Dynamic: license-file

# Apophatic Engine (`apophatic-engine`)

[![PyPI version](https://badge.fury.io/py/apophatic-engine.svg)](https://pypi.org/project/apophatic-engine/)
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](LICENSE)

An open-source Python reference implementation of the **Apophatic Inference Engine (AIE)**. Operates as a subtractive noise filter ($\neg X$) for Large Language Models, replacing speculative hallucinations with baseline relaxation ($B_0$).

> *Apophatic Noise Subtraction ($\neg X$) for Neural Inference and System Optimization.*

The **Apophatic Engine** implements token-by-token noise subtraction ($\neg X$) derived from the **Nicht-Theory** theoretical framework. Instead of maximizing speculative probabilities ($1$-logic), the filter penalizes assertion pressure ($P_A$) and relaxes high-entropy tokens directly into the **Sufficient Invariant Baseline ($B_0$)**.

## Theoretical Grounding

This repository provides the operational code implementation for Paper IV (*Apophatic Inference Engine*) of the [Nicht-Theory Framework](https://github.com/xerx593/nicht-theory).

## Installation

```bash
pip install apophatic-engine
```
## Quickstart

```python
import numpy as np
from apophatic_engine import ApophaticEngine

engine = ApophaticEngine(sigma_threshold=0.40)
logits = np.array([1.2, 1.1, 1.3, 1.0])

result = engine.apply_apophatic_filter(logits, step=1)
print(result)
# Output: {'status': 'RELAX_TO_BASELINE', 'output_token': '[B_0: SILENCE / UNASSERTED]'}
```
## HuggingFace Integration

```python
from apophatic_engine import ApophaticEngine
# See examples/02_huggingface_integration.py for full LogitsProcessor implementation
```
## Authorship & License

**Authors:** xerx593 & Non-Human Interlocutors
**License:** [The Unlicense](LICENSE) — Dedicated to the public domain
