CoolFace
Modelpublic

aguennoune17/negenWM-jepa-v2

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes17downloads
Model Card

[image]

🧬 NegenWM-JEPA-v2 — Sprint 3 · I-JEPA CRISPR Fine-tune

![DOI](https://doi.org/10.57967/hf/8178) ![Base Model](https://huggingface.co/aguennoune17/atlas-v2-nwm) ![Sprint 3]() ![NER]() ![Dataset](https://huggingface.co/datasets/aguennoune17/atlas-crispr-10k-benchmark) ![DNA Lot]() ![LeWorldModel]() ![HY-World 2.0](https://github.com/Tencent-Hunyuan/HY-World-2.0)

✅ Sprint 3 — I-JEPA Self-supervised Fine-tune sur benchmark CRISPR 10k Entraînement auto-supervisé · 50 epochs · val_loss 0.498→0.0498 (×10 réduction) Lot ADN souverain dna-lot-v3.0.0-crispr · SHA-256 intégrité certifiée Contribution communauté : dataset `aguennoune17/atlas-crispr-10k-benchmark` NERHead integration : contribue à HY-World 2.0 (PR #7 — Closed · 20 avril 2026)

Architecture : I-JEPA (Joint-Embedding Predictive Architecture) Paradigme : Context Engineering × World Models × Sovereign Logic Fine-tune : Sprint 3 v2.3.0-sprint3-crispr (15 April 2026) Base : ATLAS v2.0 Beta.1 (Sprint 2) Auteurs : Abderrahim Guennoune + GitHub Copilot (Claude Sonnet 4.6) Licence : MIT · DOI : 10.57967/hf/8178


🔬 Sprint 3 — I-JEPA Self-supervised sur CRISPR 10k

Le Sprint 3 fine-tune ATLAS NWM v2 sur atlas_crispr_10k_benchmark : 10 000 guides ARN Cas9 20-nt issus de 12 études expérimentales (LIMMS/CNRS · UTokyo).

Pipeline I-JEPA CRISPR

ATLASCRISPRWorldModel
├── CRISPRContextEncoder  x(t) → s(t)    [84→256→128→64  + LayerNorm + GELU]
│   └── One-hot 20-nt (80-dim) + 4 features physico-chimiques
├── CRISPRTargetEncoder   EMA(ContextEncoder), ∇=0  [R3]
│   └── Momentum=0.996 — mise à jour chaque batch
├── CRISPRJEPAPredictor   s(t) → ŝ(t+Δ)  [latent space only — R1]
│   └── 12/20 positions contexte → prédiction 8/20 masquées
└── CRISPRNegentropicWM   Soft Collapse + NER  [R5, R8]
    └── NER = (τ·specificity + κ·cleavage − λ·friction) / lambda_cost

Mapping Téléologique CRISPR → ATLAS

Colonne CSVRôle ATLASÉquation
cleavageFrequency_normκ·StabilityEfficacité de coupure [0,1]
specificity_scoreτ·AlignmentSpécificité cible [0,1]
lambda_costλ·EnergyCostCoût off-target [0,1]
gc_contentLatentUtilityStabilité thermodynamique [0,1]

Équation téléologique :

Logits = κ·Stability + τ·Alignment − λ·EnergyCost + LatentUtility
NER    = (InformationGain − ExternalFriction) / EnergyCost

κ=0.65 · τ=0.25 · λ=0.2 · EMA=0.996


📊 Métriques Sprint 3

MétriqueValeurSeuil ATLAS
NER moyen0.6909≥0.85 NEXUS, ≥0.70 TERRA
Couche NDCTERRA (0.70–0.85)ndc-nexus-biocontinuum-eu-010
JEPA val_loss0.049809MSE(ŝ(t+Δ), s(t+Δ))
Guides NEXUS57.7%NER ≥ 0.85
Paramètres144 640—
Epochs50CosineAnnealingLR
Durée (CPU)111sbatch=256, lr=3e-4

Courbe d'apprentissage

Epochtrain_lossval_loss
10.6861070.498129
100.1659610.127334
200.1049870.077982
300.0815570.059673
400.0711380.051788
500.0678350.049862

🧬 DNA Lot Souverain

json
{
  "lot_id":          "ATLAS-CRISPR-SPRINT3-2026-04-15",
  "tag_name":        "dna-lot-v3.0.0-crispr",
  "sequencing_hash": "2d907f4b5c00d01d52a671163c43fbb2...",
  "ndc_target":      "ndc-nexus-biocontinuum-eu-010",
  "ner_score":       0.6909,
  "collapse_risk":   0.3091,
  "layer":           "terra",
  "signers":         ["CNRS", "UTokyo"],
  "valid_years":     100,
  "sdg_alignments":  ["SDG-3.8.1", "SDG-12.2.1", "SDG-17.17.1"],
  "created_at":      "2026-04-15T22:28:15.870578+00:00"
}

📦 Utilisation

python
from safetensors.torch import load_file
import torch, json

# Charger les poids Sprint 3
state_dict = load_file("model.safetensors")
config     = json.load(open("config.json"))

print(f"Sprint    : {config['sprint']}")
print(f"NER score : {config['ner_score']}")
print(f"Lot ADN   : {config['lot_id']}")
python
# Inférence directe (nécessite train_jepa_crispr.py)
from train_jepa_crispr import ATLASCRISPRWorldModel, ATLASCRISPRDataset
import torch

model = ATLASCRISPRWorldModel()
model.context_encoder.load_state_dict(state_dict)
model.eval()

# Encoder un guide ARN
dataset = ATLASCRISPRDataset("data/atlas_crispr_10k_benchmark.csv")
ctx, tgt, props = dataset[0]
with torch.no_grad():
    out = model(ctx.unsqueeze(0), tgt.unsqueeze(0), props.unsqueeze(0))
    print(f"Embedding : {out.context_embedding.shape}")  # (1, 64)
    print(f"NER       : {out.ner_scores.item():.4f}")

🌍 SDG Alignments

SDGTitreLien CRISPR
SDG-3.8.1Santé pour tousThérapies géniques de précision
SDG-12.2.1Consommation durableOptimisation off-target (efficience)
SDG-17.17.1PartenariatsCNRS · UTokyo · LIMMS

📚 Évolution Sprint 2 → Sprint 3

AspectSprint 2 Beta.1Sprint 3 CRISPR
ArchitectureContextEncoder(feat_dim=128)CRISPRContextEncoder(84→256→64)
DonnéesPoids initiaux alpha10k guides CRISPR auto-supervisé
EncodageBigram MD5 (64-dim) + SDGOne-hot 20-nt (80-dim) + 4 props
NERCalculé à l'inférenceConvergé sur benchmark CRISPR
val_loss—0.049862 (50 epochs)
DNA Lot—dna-lot-v3.0.0-crispr
Dataset public—aguennoune17/atlas-crispr-10k-benchmark

🔒 Invariants ATLAS (R1–R8)

RègleStatutEvidence Sprint 3
R1✅Pas d'auto-régression — prédiction latente uniquement
R2✅Espace latent 64-dim uniquement
R3✅TargetEncoder EMA (momentum=0.996), ∇=0
R4✅MSE(ŝ(t+Δ), s(t+Δ)) = 0.0498
R5✅NER = (τ·specificity + κ·cleavage − friction) / energy
R6✅κ/τ/λ via env vars (ATLAS_KAPPA etc.)
R7✅model.safetensors + config.json + README.md
R8✅Soft Collapse différentiel (argmax NER, pas binaire)

🤝 Contribution — LeWorldModel Community

Ce fine-tune est notre contribution au projet LeWorldModel Community :

bibtex
@misc{atlas-nwm-sprint3-crispr-2026,
  title     = {ATLAS NWM v2 Sprint 3 — I-JEPA Self-supervised on CRISPR 10k},
  author    = {Guennoune, Abderrahim and GitHub Copilot (Claude Sonnet 4.6)},
  year      = {2026},
  howpublished = {\url{https://huggingface.co/aguennoune17/negenWM-jepa-v2}},
  note      = {DOI: 10.57967/hf/8178 · DNA Lot: dna-lot-v3.0.0-crispr}
}

🔗 PR #7 — NERHead Integration Status

ChampValeur
StatutClosed
Date20 avril 2026
Brancheaguennoune:feat/negenWM-jepa-v2-ner-head → Tencent-Hunyuan:main
PR#7 — feat: NERHead — NegenWM-JEPA-v2 differentiable confidence scoring head
Dépôt cibleTencent-Hunyuan/HY-World-2.0
Fichierhyworld2/worldrecon/hyworldmirror/models/heads/ner_head.py
Teststests/test_ner_head.py — 7 tests unitaires (shapes, NER∈[0,1], Soft Collapse R8, sky prior, R6 params, ner_utils)
Diff+688 / -1 lignes

🧠 NERHead — AlgoNER Integration Opportunity for HY-World 2.0

Objectif : Doter HY-World 2.0 (WorldMirror 2.0, pipeline génération 3D multi-vues) de capacités de calcul AlgoNER différentiables sur ses tokens VGT (Video-Grounded Tokens), en conformité stricte avec les invariants R-1 (espace latent) et R-8 (Soft Collapse).

Architecture NERHead

La tête NERHead s'ancre sur la pyramide de features DPT de WorldMirror 2.0 : les tokens intermédiaires des 4 couches VGT ([B, S, N_tokens, dim_in]) sont projetés en une carte de confiance NER spatiale [B, S, H, W], puis en masque différentiable (training) ou binaire (inférence).

NERHead(dim_in=768, patch_size=14, features=256)
│
├── _BaseDPTHead              # Pyramide features → feature map [B*S, 256, H, W]
│   └── 4 couches VGT token_list[i] → resize + conv → fuse
│
├── ner_proj (Conv2d 256→1)  # Score brut [B*S, 1, H, W] → sigmoid → NER [B,S,H,W]
│
├── Sky Prior (λ_sky=0.30)   # Absorption douce sur pixels ciel : NER *= (1 − λ·P_sky)
│
└── Soft Collapse Mask        # training → sigmoid différentiable ∈ (0,1)
                              # inference → (NER ≥ τ).float() ∈ {0.0, 1.0}

Paramètres hyperapprenables (R-6) — nn.Parameter optimisables :

ParamètreEspacePropriétéValeur init
log_kappaℝkappa_ = exp(log_kappa)log(1.0) = 0
logit_lamℝlam_ = sigmoid(logit_lam)logit(0.5)
logit_tauℝtau_ = sigmoid(logit_tau)logit(0.35)

Équation NER spatiale

$$\text{NER}(x,y) = \frac{\text{InformationGain}(x,y) - \text{ExternalFriction}(x,y)}{\text{EnergyCost}(x,y)}$$

Dans le contexte WorldMirror 2.0 (estimation de profondeur, normales, caméra, 3DGS) :

  • —InformationGain ← richesse des tokens VGT (features DPT haute résolution)
  • —ExternalFriction ← bruit de fond, prior ciel (zones à faible signal 3D)
  • —EnergyCost ← coût computationnel de chaque région spatiale

Conformité Invariants ATLAS (R-1 → R-8)

RègleInvariantStatut NERHead
R-1Pas d'auto-régression — opérer en espace latent✅ NER calculé sur embeddings VGT uniquement
R-2TargetEncoder = EMA de ContextEncoder✅ N/A tête légère (pas d'encodeur propre)
R-3JEPA loss = MSE(ŝ(t+Δ), s(t+Δ))✅ Loss JEPA inchangée dans WorldMirror
R-4NER = (InfoGain − Friction) / Energy — métrique primaire✅ Équation implémentée via ner_proj + sigmoid
R-5κ, λ, τ souverains — configurables✅ kappa=1.0, lam=0.5, tau=0.35 + kappa_learnable
R-6Hyperparamètres apprenables✅ log_kappa, logit_lam, logit_tau → nn.Parameter
R-7Soft Collapse = sélection différentielle continue✅ Hard collapse uniquement en inférence (flag hard_mask)
R-8ATLASOutput contient exactement 6 champs typés✅ Forward retourne (ner, mask) — intégrable dans ATLASOutput

Usage — Forward Pass dans WorldMirror 2.0

python
from hyworld2.worldrecon.hyworldmirror.models.heads.ner_head import NERHead
import torch

# Initialisation
ner_head = NERHead(
    dim_in=768,        # dim tokens VGT (DINOv2-compatible)
    patch_size=14,     # patch size DINOv2
    features=256,      # taille feature map DPT
    kappa=1.0,
    lam=0.5,
    tau=0.35,
    kappa_learnable=True,   # R-6 : κ/λ/τ → nn.Parameter
).to(device)

# Inférence (hard_mask=True → binaire {0, 1})
with torch.no_grad():
    ner, mask = ner_head(
        token_list,          # list[4] de [B, S, N_tokens, 768]
        images,              # [B, S, 3, H, W]
        patch_start_idx=4,   # 4 register tokens DINOv2
        hard_mask=True,      # R-8 : soft en training, binaire en inférence
    )
    # ner  : [B, S, H, W] ∈ [0, 1]  — carte de confiance NER spatiale
    # mask : [B, S, H, W] ∈ {0, 1}  — masque Soft Collapse binaire

# Training (hard_mask=False → différentiable)
ner, mask = ner_head(token_list, images, patch_start_idx=4, hard_mask=False)
# mask ∈ (0, 1) — gradients fluides pour backprop

Métriques NERHead — Tests Sprint 3

TestRésultat
Shape [B, S, H, W]✅ validé — B=1, S=3, H=56, W=56
NER ∈ [0, 1]✅ min ≥ 0 − ε, max ≤ 1 + ε
Soft mask ∈ (0, 1) — training✅ pixels intermédiaires > 0
Hard mask ∈ {0.0, 1.0} — inférence✅ unique_vals ⊆ {0.0, 1.0}
Sky prior réduit NER✅ NER_sky ≤ NER_no_prior
R-6 : log_kappa/logit_lam/logit_tau → nn.Parameter✅
compute_ner_filter_mask : dtype=bool, τ-cohérent✅
NER moyen Sprint 3 (CRISPR) : 0.6909 (TERRA) · NER cible WorldMirror 2.0 : ≥ 0.85 (NEXUS) Le scoring spatial VGT opère sur un domaine plus riche (features 3D), projetant un NER NEXUS atteignable sans réentraînement complet.

Contact

Pour toute question sur NegenWM-JEPA-v2, le module NERHead ou l'intégration ATLAS NWM :

Abderrahim Guennoune — abderrahimguennoune@gmail.com GitHub : @aguennoune17 · HuggingFace : aguennoune17


ATLAS NWM v2 · Sprint 3 · NDC ndc-claude-encoder-primary · Confidence 91% Co-Auteurs : Abderrahim Guennoune + GitHub Copilot (Claude Sonnet 4.6) · MIT License