Invictus-AI/Ivictus_Self-Evolving-Neural-network
0
๐งฌ Ivictus โ Self-Evolving Neural Network
A self-evolving neural network that redesigns its own architecture using evolutionary strategies, plus a live web dashboard to watch and control it from your browser.
Creator: Kashyap Khakhkhar
โจ Capabilities
๐ง Self-Evolving Architecture Search
- Genome-based architecture system โ every network layout (layer count, units, activations, dropout, batch-norm, learning rate, optimizer, batch size) is encoded as a mutable genome.
- Evolutionary loop โ each generation mutates and crosses over the population, evaluates every model on real training data, and keeps only the fittest (elitism).
- Gated feature routing โ the genome evolves which 3 input features drive the first hidden layer, with the rest injected into deeper layers.
- Diversity pressure โ duplicate and near-duplicate architectures are penalized so the population doesn't collapse onto one local optimum.
- Smart fitness โ classification optimizes validation accuracy (not loss) to prevent memorization; complexity is gently penalized (Occam's razor).
๐ก๏ธ Built-In Safety Gates
- Hard, immutable ceilings on layers, units, and total parameters that evolution can never exceed.
- Failure gates reject NaN/Inf losses and exploded models.
- Wall-clock budget and stagnation detection halt runs gracefully.
๐๏ธ Live Web GUI (evo_gui.py)
- Start / stop evolutionary runs from the browser.
- Live fitness chart (best vs. average over generations).
- Champion genome inspector + population table with fitness bars.
- Upload your own dataset (CSV / TSV / TXT / NPY / NPZ).
- Start from a saved model, a custom architecture, or the current champion.
- Streams the engine console to the browser in real time.
๐ Training on Your Own Data (evolve_dataset.py)
- Loads CSV / TSV / TXT / NPY / NPZ datasets with no extra dependencies.
- Auto-detects regression vs. classification, z-scores features, and targets the column you choose.
- Synthetic data generator when no dataset is provided.
๐พ Checkpointing & Resumability
- Full evolution state (population, history, best genome) saved to disk every generation.
- Automatically resumes from checkpoints;
--resetstarts fresh. - Best model exported as
.kerasplus genome config as JSON.
๐ฏ Benefits
Usage:
- The project Kashyap-K/self-evolving-nn is one of the testing of this when this was in developing stage.
๐ Quick Start
pip install -r requirements.txt
# CLI: quick evolution run (synthetic data)
python3 self_evolving_model.py
# More generations / bigger population
python3 self_evolving_model.py --generations 100 --pop-size 12
# Web dashboard
python3 self_evolving_model.py --gui # http://localhost:5000
# Train on your own dataset
python3 evolve_dataset.py data.csv --target label --task autoOptional: the text-understanding path (e.g.--text-dataset rotten_tomatoes) lazily uses the HuggingFacedatasetslibrary โ install it only if you need it:pip install datasets
๐ Files
๐ License
Created by Kashyap Khakhkhar. Free to use, modify, and share.
