Skip to main content

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.

Metadata

Release files for kabena-ml 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kabena-ml 1.2.0
File Size Uploaded
kabena_ml-1.2.0.tar.gz 22.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kabena-ml 1.2.0
File Interpreter ABI Platform
kabena_ml-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.3 kB

Release files / kabena_ml-1.2.0.tar.gz

Download URL kabena_ml-1.2.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
65172b67b03b69aa798be9f71e11596dbc2c8b08206009cf5522fe44003ba878
BLAKE2b-256 checksum
How to use checksums
291a1b33f9fbb479c564e531da619d6f5db139bf9925da95895eeb052933579b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / kabena_ml-1.2.0-py3-none-any.whl

Download URL kabena_ml-1.2.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de23cc12980279ad535f001ed8a6606658263e3f03bfb3a87a1d4a347c39a2aa
BLAKE2b-256 checksum
How to use checksums
ffa5f1b92a03bf7b1642baeb5acc0de09b01f3cc6e82bce4fe8cc4c6ece096aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page