Skip to main content

A trainable continual-learning architecture (manas/buddhi/ahaṃkāra/citta) you train on your own data — no forgetting, novelty/zero-day detection, calibrated abstention.

Project description

antahkarana — train a continual-learning mind on your data

PyPI License Python Model card

antahkarana is a trainable architecture, not a frozen model. You bring your data (and optionally your backbone); it trains a model that learns continually without forgetting, detects novelty / zero-days, abstains when unsure, and consolidates in sleep. Four organs — manas · buddhi · ahaṃkāra · citta — the mind is the same for every domain; only a thin adapter changes.

architecture

Built on the validated Antaḥkaraṇa-base core (gated G0–G5, proven across language · vision · security · with seeded, adaptive evaluation — see the model card for plots, results, and honest limits).

Install

pip install antahkarana            # core + tabular
pip install antahkarana[text]      # + HuggingFace LLM adapter

Train on your data in ~10 lines (tabular)

from antahkarana import Antahkarana, TabularAdapter

# YOUR data: a list of tasks, each (X_train, y_train, X_test, y_test)
stream = TabularAdapter.make_stream(your_tasks)

bb   = TabularAdapter(input_dim=122, n_tasks=4, n_classes=2)   # built-in MLP — bring only data
mind = Antahkarana(bb, replay_strategy="der", avidya_strategy="energy")
res  = mind.train(stream)

print(res["forgetting"], res["final_row"], res["risk_coverage"])

Text (any HuggingFace causal-LM + LoRA)

from antahkarana import Antahkarana, TextAdapter
bb     = TextAdapter("mistralai/Mistral-7B-v0.1")             # frozen base, small LoRA trains
stream = TextAdapter.make_stream(your_text_tasks)             # [(train_pairs, eval_pairs), …]
Antahkarana(bb).train(stream)

Any other modality

Copy antahkarana/adapters/template.py (CustomAdapter) and implement 5 methods over your encoder (audio, graph, multi-modal, robotics, …). The continual-learning mind is unchanged.

Runnable examples

python examples/train_tabular.py     # concept-drift stream: naive forgets, the core doesn't
python examples/train_security.py    # continual threat detection (attack families) + calibrated triage

What you get back

train() returns: the task×task accuracy matrix, final_row, final_avg, forgetting, risk_coverage (calibrated abstention), recovery (sleep), and the trajectory (per-task guṇa/novelty).

Knobs

Antahkarana(bb, samskara=, replay_strategy="naive"|"der", avidya_strategy="msp"|"energy", sleep=, base_lr=, epochs=) — turn each organ on/off and swap in the SOTA implementation (DER++ dark-knowledge replay, energy-OOD novelty).

Ship it closed-source

python build_wheel.py compiles the engine to binary .so (Nuitka) and drops the source, leaving only the public interface readable — others can pip install and train on their data without seeing your code. (For maximum IP protection, serve it behind an API instead.)


Author — Deepak Soni · Apache-2.0

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

antahkarana-0.2.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antahkarana-0.2.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file antahkarana-0.2.0.tar.gz.

File metadata

  • Download URL: antahkarana-0.2.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for antahkarana-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e09c87dab0fab3ebd9c07764998d1f79cf4896e979726dfcade57c0acbe060e7
MD5 de7c1d6d87b40d7c1addb255c668196d
BLAKE2b-256 041759873334be70f525a98c90d5a051343900705f20b35d5d85078dd54e24f7

See more details on using hashes here.

File details

Details for the file antahkarana-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: antahkarana-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for antahkarana-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07e344eb1e7d6e229b9c92ae27c8fb8a4a828dcd86a30b74248a204ad459185d
MD5 920d939ec51777e10bc905b901814c2a
BLAKE2b-256 ba4e6dfd9a820aa30391798a8a0c47600be770ce2f3e8789ab0b72c29df78793

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page