Skip to main content

K-ABENA: K-Adaptive Backpropagation with Error-based N-exclusion Algorithm

Project description

kabena-ml

K-ABENA — K-Adaptive Backpropagation with Error-based N-exclusion Algorithm

"Gradient intelligent : ignorer les petites erreurs pour apprendre plus vite." — YekoElite University × NeuroSoft IA

PyPI version License: MIT Python 3.9+


Installation en 30 secondes

pip install kabena-ml                # core (NumPy uniquement)
pip install kabena-ml[torch]         # + PyTorch
pip install kabena-ml[tf]            # + TensorFlow
pip install kabena-ml[all]           # tout inclus

Coût d'adoption : 2 lignes de code

Avant K-ABENA (SGD standard) :

loss = criterion(model(X), y)
loss.backward()

Après K-ABENA (+2 lignes) :

losses = criterion(model(X), y, reduction="none")  # ligne 1 modifiée
mask   = kabena_filter(losses, K=0.25)              # ligne 2 ajoutée
losses[mask].mean().backward()                      # ligne 3 inchangée

C'est tout. Votre architecture, votre optimiseur, votre pipeline — rien ne change.


Principe

K-ABENA filtre les observations "mineures" (erreur ≤ K) avant la backward pass.

Paramètre Rôle Valeur par défaut
K Seuil absolu — erreurs ≤ K sont "mineures" auto (calibrate_K)
N Proportion de mineures conservées (0 = toutes exclues) 0.0
N=0  → mode agressif  : toutes les mineures exclues (gain maximal)
N=1  → mode standard  : aucune exclue (= SGD classique)
N=0.4 → mode modéré  : 40% des mineures conservées (régularisation)

Tutoriels

Niveau Format Usage
Niveau 1 Jupyter Notebook Exploration rapide, cours
Niveau 2 Scripts .py Projets complets
Niveau 3 MLOps (MLflow + Hydra) Production

14 notebooks au total, dont 2 dédiés à la robustesse au bruit avec couverture PyTorch + TensorFlow/Keras + HuggingFace Trainer (notebooks 13–14).


Algorithmes couverts

  • ✅ Régression linéaire / Ridge / Lasso (scikit-learn)
  • ✅ Classification logistique (scikit-learn)
  • ✅ SVM linéaire SGD (scikit-learn)
  • ✅ XGBoost / Gradient Boosting (sklearn)
  • ✅ MLP multicouche (scikit-learn + PyTorch + TensorFlow)
  • ✅ CNN — vision (PyTorch + TensorFlow/Keras)
  • ✅ Transformer — NLP classification (PyTorch + HuggingFace Trainer)
  • ✅ Données déséquilibrées — K-ABENA Stratifié

Robustesse au bruit (v1.1.0)

K-ABENA présente un effet d'auto-protection empirique sous bruit de labels : l'avantage sur SGD standard s'amplifie avec le niveau de bruit (+1.7 pts à 0% de bruit, +8.6 pts à 30–40%). Détails complets, mécanisme et limites : Chapitre 16B du livre · calibrate_K_noisy() · notebooks 13–14.

⚠️ Limite L10 — à lire avant usage en production. Les valeurs par défaut de calibrate_K_noisy() (noise_factor=2.0, q_cap=25.0) ont été observées sur deux configurations seulement (CIFAR-10, SST-2) — ce n'est pas une constante universelle validée, contrairement à N=0.3 (validé sur 8 datasets). Constat additionnel vérifié : avec ces valeurs par défaut, le plafond q_cap=25% est atteint dès 7.5% de bruit estimé — au-delà, toute variation de bruit produit exactement le même K. Toujours valider noise_factor via une grille [1.0, 1.5, 2.0, 2.5, 3.0] sur votre propre dataset avec bruit connu avant de déployer en production.

from kabena_ml import calibrate_K_noisy

# Calibrage adapté au bruit estimé (30% de labels corrompus)
K = calibrate_K_noisy(losses_epoch1, estimated_noise_pct=0.30)

Auteur

M. Bonbhel — YekoElite University × NeuroSoft IA
contact@neurosoft-ia.com | +1 418 271 0819
GitHub : yekoelite/kabena-ml


Référence : Bonbhel, J.-F. (2026). "Gradient intelligent : la théorie K-ABENA pour un Machine Learning plus efficace." YekoElite University.

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

kabena_ml-1.2.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

kabena_ml-1.2.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file kabena_ml-1.2.0.tar.gz.

File metadata

  • Download URL: kabena_ml-1.2.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for kabena_ml-1.2.0.tar.gz
Algorithm Hash digest
SHA256 65172b67b03b69aa798be9f71e11596dbc2c8b08206009cf5522fe44003ba878
MD5 fbf71500a9e29154eda3ec156c7595c9
BLAKE2b-256 291a1b33f9fbb479c564e531da619d6f5db139bf9925da95895eeb052933579b

See more details on using hashes here.

File details

Details for the file kabena_ml-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: kabena_ml-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for kabena_ml-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de23cc12980279ad535f001ed8a6606658263e3f03bfb3a87a1d4a347c39a2aa
MD5 79d5e91faf6570b343902ea26cde9832
BLAKE2b-256 ffa5f1b92a03bf7b1642baeb5acc0de09b01f3cc6e82bce4fe8cc4c6ece096aa

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