Metadata-Version: 2.4
Name: apophatic_engine
Version: 0.2.2.post1
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
Project-URL: DOI / Monograph, https://doi.org/10.5281/zenodo.22067674
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://img.shields.io/badge/pypi-v0.2.2-blue.svg)](https://pypi.org/project/apophatic-engine/)
[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.22067674-blue.svg)](https://doi.org/10.5281/zenodo.22067674)
[![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 (¬X) for Large Language Models, replacing speculative hallucinations with vector collapse toward baseline relaxation (B_0).

> *Apophatic Noise Subtraction (¬X) for Neural Inference and System Optimization.*

The **Apophatic Engine** implements token-by-token noise subtraction (¬X) derived from the **Nicht-Theory** theoretical framework. Instead of maximizing speculative probabilities (1-logic), the filter penalizes assertion pressure (P_A) and collapses high-entropy logit vectors 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) (DOI: 10.5281/zenodo.22067674).

## Installation

```bash
pip install apophatic-engine
```

## Quickstart (v0.2.2)

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

engine = ApophaticEngine(sigma_threshold=0.40)
logits = np.array([1.1, 1.05, 1.12, 0.98])
result = engine.apply_apophatic_filter(logits, step=1)
print(result)
# Output:
# {
#    'status': 'COLLAPSED_TO_B0',
#    'logits': array([1.0625, 1.0625, 1.0625, 1.0625]),
#    'sigma': 0.732,
#    'P_A': 1.0,
#    'action': '¬X applied: Logit vector fully collapsed to baseline B_0'
# }
```

## 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
