Metadata-Version: 2.4
Name: zatron
Version: 0.1.0
Summary: Privacy-preserving semantic search via multi-channel modular arithmetic
Author: Zahra Arman
License: MIT
Project-URL: Homepage, https://github.com/zahraarmantech/ZATRON
Project-URL: Demo, https://huggingface.co/spaces/zahraarman/ZATRON
Project-URL: Repository, https://github.com/zahraarmantech/ZATRON
Keywords: semantic-search,privacy,embeddings,encrypted-search,vector-search,rag
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security :: Cryptography
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.21
Requires-Dist: scikit-learn>=1.0
Provides-Extra: demo
Requires-Dist: sentence-transformers>=2.2; extra == "demo"
Requires-Dist: matplotlib>=3.5; extra == "demo"

# ZATRON

**Zero-Access Transformed Retrieval Over Noise** — privacy-preserving semantic search via multi-channel modular arithmetic. Search sensitive documents by meaning without exposing content to the database, the server, or even the key holder.

## Install

```bash
pip install zatron
```

## Quick start

```python
from zatron import ModularBarcodeSystem

system = ModularBarcodeSystem(key="your-secret-key", n_channels=200)
system.fit(corpus_embeddings)                      # fit PCA + quantization

barcodes  = system.encode(corpus_embeddings, doc_ids)
query_bc  = system.encode_query(query_embedding)
distance  = system.compare(query_bc, barcodes[0])  # search in modular space
```

A neural attacker trained on 80,000 labeled pairs recovers similarity from
unprotected signals almost perfectly (rho = 0.90, AUC = 0.999) and gets
nothing from ZATRON barcodes (rho = 0.00, AUC = 0.50).

- Demo: https://huggingface.co/spaces/zahraarman/ZATRON
- Code & benchmarks: https://github.com/zahraarmantech/ZATRON

MIT licensed. Method covered by a pending US provisional patent.
