Cognitive Code Topology Engine - Self-evolving neural security scanner
Project description
🧠 NeuralSpace – Cognitive Code Security Engine
NeuralSpace is a next‑generation, self‑evolving security scanner that detects obfuscated malicious code using a Covalent Tree topology – a novel neural architecture that routes code through a fractal decision tree where each branch has its own specialized "neural atom."
Unlike traditional static scanners (SAST/NGAV) that rely on rigid rule sets or giant black‑box models, NeuralSpace learns the semantic fingerprint of your codebase and autonomously fractures into new branches when it encounters novel architectural patterns.
🔥 The Problem We Solve
| Current Tool | Limitation | NeuralSpace Advantage |
|---|---|---|
| Traditional AV | Relies on known signatures. | Blocks zero‑day obfuscated threats. |
| SAST (SonarQube) | 99.5% false positives. | Contextual detection (e.g., requests.get alone is safe; requests.get + exec is not). |
| Transformer Models | Huge, slow, cloud‑dependent. | Lightweight (~8 KB weights), runs instantly on CPU. |
| File Watchers | React to files, don't understand content. | Routes files dynamically into a living knowledge tree. |
✨ Key Features
- 🧬 Self‑Evolving Topology – The Covalent Tree spawns new branches when it detects structural drift in your code (cosine similarity < 0.15). It doesn't just classify; it organizes your codebase.
- 🧠 Distributed Neural Atoms – Each tree branch has its own
PureNeuralAtom(512→4→4 network) initialized with a unique seed. This creates specialized "brains" for different code families (e.g., web scrapers vs. quant math vs. CLI tools). - 🛡️ Obfuscation‑Resistant Tokenizer – Engineered combination features (indices 490–495) catch multi‑stage evasions like
base64+exec+requests, bypassing the neural network's natural struggle with long‑range dependencies. - 🌍 Polyglot – Scans Python, JavaScript, TypeScript, Go, and Rust (more coming soon).
- ⚡ Ultra‑Lightweight & Local – Trains in under 1 minute on a standard CPU. No cloud, no GPU, no expensive API calls.
- 🔗 CI/CD Native – Ships with a pre‑built GitHub Action that runs on every
pushandpull_request. - 🌐 Federated Intelligence – Shares anonymized threat signatures with a global network, creating a living immune system.
🏗️ How It Works
- Tokenization – Raw source code is converted into a 512‑dimension vector using unigram hashing, byte trigrams, and hard‑coded combo indices (
requests+exec→ +8.0). - Routing – The vector descends the Covalent Tree. If it matches a child node (cosine similarity > 0.85), it dives deeper. Otherwise, it stops.
- Judgment – The terminal node's
PureNeuralAtomcomputes two scores:- Sentinel (S) – Threat probability (class 3).
- Logic (L) – Safe probability (class 0).
- Enforcement – If
S > 0.25orL < 0.2, the file is quarantined (renamed/moved) and logged. - Evolution – If the file is allowed but deviates significantly from the parent's latent centroid, the tree spawns a new child node to capture this new architectural pattern.
🚀 Quick Start
Installation
# Clone the repository
git clone https://github.com/krishnakanthsharmat-cloud/NeuralSpace.git
cd NeuralSpace
# Install in development mode (recommended)
pip install -e .
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neuralspace_ai-1.0.0.tar.gz.
File metadata
- Download URL: neuralspace_ai-1.0.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2c5f7c616459d245e78f3f04976bf41f4780732f14dfc265738317297fdc989
|
|
| MD5 |
d157e01725e2692056e05bdc0882cc48
|
|
| BLAKE2b-256 |
4d9100396a0aac1e3d19deabd05acf4f3acc2714ce7a3bb923255e34585e94e9
|
File details
Details for the file neuralspace_ai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: neuralspace_ai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d877046b0d28fb83368071a6be7a7022fbcf516c641bd7932f2b28daad1dde22
|
|
| MD5 |
940e8ecb061ee1a0695636686b850735
|
|
| BLAKE2b-256 |
e80ea9d2b507a285e26bdbc772f2cb97d4add8f46a0daab4f0cd4381498b56d8
|