SAVRN
Search Contact SAVRN

Open-weight model · Tabular classification

cernpeerenv-zmumu-dqn

by D DHDRL/cernpeerenv-zmumu-dqn

Task. Binary classification of simulated dimuon events: does this event contain an opposite-sign muon pair whose invariant mass falls in (80, 100) GeV? Method. The classifier is trained with Stable-Baselines3 DQN or PPO inside a one-step Gymnasium wrapper.

Parameters
Context
Weights4.5 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads132

Model Card

By D, published under apache-2.0, revision 00f18f8236ed.

Task. Binary classification of simulated dimuon events: does this event contain an opposite-sign muon pair whose invariant mass falls in (80, 100) GeV? Method. The classifier is trained with Stable-Baselines3 DQN or PPO inside a one-step Gymnasium wrapper. Each reset / step is one labeled event and then terminated=True. There is no horizon, no delayed credit assignment, and no control of a detector. Label. Computed from the same padded muon kinematics the policy sees: at least two muons, opposite charge, invariant mass in (massmin, massmax) with defaults 80–100 GeV. This is not generator-level Z truth and not a CMS official tag. Data for the reported numbers. Pythia8 Monte Carlo only…

Read D's full model card

Z→μμ event classifier (DQN/PPO trained) + peer-vote ensemble negative result

Task. Binary classification of simulated dimuon events: does this event contain an opposite-sign muon pair whose invariant mass falls in (80, 100) GeV?

Method. The classifier is trained with Stable-Baselines3 DQN or PPO inside a one-step Gymnasium wrapper. Each reset / step is one labeled event and then terminated=True. There is no horizon, no delayed credit assignment, and no control of a detector.

Label. Computed from the same padded muon kinematics the policy sees: at least two muons, opposite charge, invariant mass in (mass_min, mass_max) with defaults 80–100 GeV. This is not generator-level Z truth and not a CMS official tag.

Data for the reported numbers. Pythia8 Monte Carlo only (WeakSingleBoson:ffbar2gmZ, Z forced to μ⁺μ⁻, hat mass 60–120 GeV). The negative class is mostly off-window OS dimuons, not QCD background. None of the published checkpoints were trained or evaluated on real CMS ROOT Open Data.

If you want the classifier, load best_model_SingleAgent_dqn.zip at the repo root (not SingleAgent_DQN/best_model.zip). Peer-vote checkpoints are included as an ablation, not as a better model.

Scope

Claim Status
One-step binary classifier on muon kinematics Yes
Label = OS pair in the 80–100 GeV mass window Yes
SB3 DQN/PPO used as the optimizer Yes
Sequential RL / POMDP / long horizon No
Independent HEP truth label No
Real CMS Open Data in these checkpoints No
Z vs QCD tagging No
Compared to a BDT or supervised MLP No
Full mixed-ensemble weights published No (mixed agent0 PPO is missing)

What is included

cern_hunt_env.py — Gymnasium adapter (CernHuntEnv)

  • Class labels exposed as Discrete(2): 0 = no window pair, 1 = OS pair in (80, 100) GeV
  • Fixed-shape Dict observation: Muon_pt/eta/phi/mass/charge + validity mask, padded to max_muons=8
  • Data order: optional CMS-style ROOT Events tree → Pythia8 → Herwig CLI. Reported runs use Pythia8 only
  • Training signal: +1 / −1 for correct / incorrect class; optional mass-proximity bonus when the window label is 1 (reward_shaping=True in the reported runs)
  • Each step() classifies one event and terminates

peer_voting_env.py — inference-time vote wrapper (PeerVotingEnv)

  • N independently trained classifiers see the same event and vote
  • Aggregation: majority, unanimous, or weighted
  • Optional consensus bonus (+0.1) when all votes agree
  • Not multi-agent RL: agents do not interact over time

baseline_training.py — training and 300-event holdout eval

  • Single-agent PPO and DQN; homogeneous 3×PPO votes; mixed 2×PPO+1×DQN votes
  • Disjoint seed ranges (STANDALONE_SEEDS, PEER_SEED_BASE)
  • Reported training used allow_pythia=True, require_real_source=False, reward_shaping=True, DummyVecEnv of 4 raw envs, MultiInputPolicy

weighted_voting_eval.py — inference-only weight sweep on the mixed trio

  • Reloads trained members and sweeps the DQN vote weight
  • Writes results/weighted_voting_sweep.csv

NormalizedCernHuntEnv exists in the env file and was not used for the numbers below.

How to use

The Hugging Face repo is a flat checkout. Import the local modules, or install the package and use cernpeerenv.

from stable_baselines3 import DQN
from cern_hunt_env import CernHuntEnv

model = DQN.load("best_model_SingleAgent_dqn.zip")

env = CernHuntEnv(
    allow_pythia=True,
    infinite_data=True,
    reward_shaping=True,
    require_real_source=False,
)
obs, _ = env.reset(seed=42)
action, _ = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, info = env.step(int(action))
# info: label, best_inv_mass, mu_count
# terminated is always True
env.close()

model.predict is shown on one unbatched observation. For many events, loop or use SB3 evaluate_policy.

Published checkpoints

File What it is
best_model_SingleAgent_dqn.zip Recommended. Single-agent DQN (92.7% on seed-888 holdout)
best_model_SingleAgent_ppo.zip Single-agent PPO (87.0% on seed-888 holdout)
PeerVoting_3Agents_Mixed_agent1_PPO_106000_steps.zip Mixed-ensemble member (PPO)
PeerVoting_3Agents_Mixed_agent2_DQN_100000_steps.zip Mixed-ensemble member (DQN)
PeerVoting_3Agents_PPO_agent0_PPO_106000_steps.zip One member of the homogeneous PPO trio

Missing from this repo: mixed-ensemble agent0 PPO, and homogeneous-PPO agents 1 and 2. The mixed-vote table is not fully reproducible from published weights alone.

results/ holds learning-curve CSVs/PNGs and weighted_voting_sweep.csv.

Checkpoints are Stable-Baselines3 2.9.0, Gymnasium 0.29.1, PyTorch 2.x. Policy nets are small (policy.pth ≈ 65 KB); CPU inference is fine.

Validation results

All reported training used Pythia8 only. Accuracies count predicted class == window label.

Method Accuracy Agreement Eval
Random 48.6% n/a 500 events, seed 0
PPO (single) 87.0% n/a 300 events, seed 888
DQN (single) 92.7% n/a 300 events, seed 888
PPO majority vote (3 agents, homogeneous) 87.7% 97.0% 300 events, seed 777
Mixed vote, unweighted (2×PPO + 1×DQN) 89.3% 93.0% 300 events, seed 777

Weight sweep on the mixed trio (aggregation="weighted", no retraining, 300 events, seed 777):

DQN weight Ensemble accuracy
0.34 (≈uniform) 89.3%
0.40 89.3%
0.50 93.7%
0.60–0.90 93.7% (flat)

Read these as one-seed, 300-event holdouts. A 1-point gap is sampling noise. Do not merge 92.7% and 93.7% into “DQN 92.7–93.7%”: they are different eval seeds, and 93.7% is a weighted vote that has already collapsed onto the DQN member.

Negative result. Once the DQN weight is ≥ 0.5, it outweighs the two PPO votes whenever they disagree, so the ensemble reproduces the DQN decision. That is not evidence that voting helps. The homogeneous PPO trio agreeing on 97% of events is the same story: seed-diverse copies collapse to nearly the same boundary.

Class balance is not logged. The random baseline near 50% only suggests the 80–100 GeV window does not make the Pythia sample extremely one-sided.

No supervised MLP, logistic regression, or BDT was run on the same features. A hard mass-window cut is the label; a linear model on the same 4-vectors would be the fair non-SB3 baseline and is not in this repo.

Dependencies

gymnasium>=0.29.0,<1.0.0
numpy>=1.25.0,<2.0.0
uproot>=5.0.0
vector>=0.9.0
stable-baselines3>=2.0.0
torch>=2.0.0
pythia8mc>=1.0.0

Reported runs: Colab-class T4, ~15 minutes per 100k events. device="auto" picks CUDA when present. CPU training is practical at this network size.

Notes

Pythia8 only for every number in the tables (allow_pythia=True, require_real_source=False). The env can load a ROOT file with an Events tree via root_path=....

Single training seed per row. No multi-seed mean. 300-event eval sets are small. gamma=0.99 is the SB3 default even though each episode is one step.

This is a packaging baseline: Gymnasium plumbing, a window-label classifier, and a documented failure of naive vote aggregation.

Identity and Version

Repository
DHDRL/cernpeerenv-zmumu-dqn
Publisher
D
Task
Tabular classification
Modality
Tabular
Library
stable-baselines3
Parameters
Not stated by the source
Languages
dqn
Revision
00f18f8236edb1d51a967bfa9e7bfcf3fd03e737
First published
2026-07-07
Last updated
2026-08-29

Files and Weights

24 files, 4.5 MB in total.

Configuration5 files · 80.0 KB
Documentation1 file · 7.6 KB
Other17 files · 4.4 MB
Repository1 file · 2.0 KB
Every file
FileTypeSizeSHA-256
__init__.pyConfiguration2.3 KB
baseline_training.pyConfiguration20.5 KB
cern_hunt_env.pyConfiguration47.1 KB
peer_voting_env.pyConfiguration6.9 KB
weighted_voting_eval.pyConfiguration3.3 KB
README.mdDocumentation7.6 KB
PeerVoting_3Agents_Mixed_agent1_PPO_106000_steps.zipOther213.2 KB bd7d3d1f32e3
PeerVoting_3Agents_Mixed_agent2_DQN_100000_steps.zipOther151.7 KB 6f1a57f059c3
PeerVoting_3Agents_PPO_agent0_PPO_106000_steps.zipOther213.2 KB 122555838053
best_model_SingleAgent_dqn.zipOther151.7 KB ab06260dad47
best_model_SingleAgent_ppo.zipOther213.1 KB 1d3d68226c90
pyproject.tomlOther1.1 KB
requirements.txtOther2.8 KB
results/PeerVoting_3Agents_Mixed_learning_curve.pngOther198.1 KB e8806bae066b
results/PeerVoting_3Agents_Mixed_metrics.csvOther596.7 KB
results/PeerVoting_3Agents_PPO_learning_curve.pngOther196.8 KB 690c82184a76
results/PeerVoting_3Agents_PPO_metrics.csvOther631.8 KB
results/SingleAgent_DQN_learning_curve.pngOther189.4 KB 2225f2637af2
results/SingleAgent_DQN_metrics.csvOther548.5 KB
results/SingleAgent_PPO_learning_curve.pngOther191.0 KB 5384622eeee0
results/SingleAgent_PPO_metrics.csvOther593.4 KB
results/combined_learning_curves.pngOther323.3 KB 11b9dd48bf58
results/weighted_voting_sweep.csvOther320 B
.gitattributesRepository2.0 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download from D

Released by D through its official repository on Hugging Face. Read the license.

Questions About cernpeerenv-zmumu-dqn

Can I use cernpeerenv-zmumu-dqn commercially?

Yes. cernpeerenv-zmumu-dqn is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Tabular classification

Nori-30M

Synthefy

Nori-30M is the ~29.2M-parameter variant of Nori, a tabular foundation model for regression via in-context learning (ICL). Given a few labeled rows as context, it predicts on new query rows in a single forward pass, with no task-specific training or fine-tuning. The model is trained entirely on synthetic data. Mean and median R² across 96 regression tasks from three public benchmark suites, on the same protocol as the base Nori: Stronger than the ~6M base on every suite. Evaluated with the bundled default inference config and the large-GPU protocol (up to 50k context rows per dataset). Paste this into Claude Code, Cursor, or any AI coding assistant and it will wire python from synthefynori…

Open weights apache-2.0 synthefy-nori

Model · Tabular classification

sap-rpt-1-oss

SAP

Go to SAP-RPT Playground ↗ Note: This model and repository were formerly known as ConTextTab. While the code and repository have now been updated in line with the new name sap-rpt-1-oss, the model checkpoint and functionality remain identical. Implementation of the deep learning model with the inference pipeline described in the paper "ConTextTab: A Semantics-Aware Tabular In-Context Learner". Tabular in-context learning (ICL) has recently achieved state-of-the-art (SOTA) performance on several tabular prediction tasks. Previously restricted to classification problems on small tables, recent advances such as TabPFN and TabICL have extended its use to larger datasets. While being…

Access requested at publisher apache-2.0 sap-rpt-1-oss

Model · Tabular classification

Nori

Synthefy

Nori is a tabular foundation model for regression via in-context learning (ICL). Given a few labeled rows as context, it predicts on new query rows in a single forward pass, with no task-specific training or fine-tuning. The model is trained entirely on synthetic data. Mean and median R² of the base model across 96 regression tasks from three public benchmark suites (single H200, up to 50K context rows per dataset): Large-N / long-context tables (common in TabArena) are the current focus of the large-table training stages. These numbers are reproducible end-to-end with one command — see Reproducing these numbers. Paste this into Claude Code, Cursor, or any AI coding assistant and it will…

Open weights apache-2.0 synthefy-nori

Model · Tabular classification

EXAONE-Tabular

LG AI Research

EXAONE Tabular is a transformer-based foundation model for tabular data that solves classification and regression through in-context learning: you pass the labeled rows to fit and the model predicts new rows in a single forward pass — no gradient updates and no per-dataset training. This repository is the exaonetabular inference runtime — a self-contained package that loads a released checkpoint and serves predictions through a small, scikit-learn-style API. The code here is permissively licensed; the released weights are non-commercial — see Both checkpoints are released: EXAONETabularClassifier and EXAONETabularRegressor each fetch their own weights with a single frompretrained() call.…

Open weights other

Model · Tabular classification

TabPFN-v2-clf

Prior Labs

TabPFN is a transformer-based foundation model for tabular data that leverages prior-data based learning to achieve strong performance on small tabular datasets without requiring task-specific training. For detailed usage examples and best practices, check out: - Python ≥ 3.9 - PyTorch ≥ 2.1 - scikit-learn ≥ 1.0 This repository hosts the production TabPFN-v2 base checkpoints. Files matching the pattern tabpfn-v2-classifier-finetuned-.ckpt are content-identical aliases of the corresponding base checkpoints (e.g. tabpfn-v2-classifier-finetuned-gn2p4bpt-xp6f0iqb.ckpt is identical to tabpfn-v2-classifier-gn2p4bpt.ckpt; tabpfn-v2-classifier-finetuned-zk73skhh.ckpt is identical to…

Open weights other tabpfn

Model · Tabular classification

tabfm-1.0.0-pytorch

Google

TabFM is a zero-shot tabular foundation model from Google Research. It supports classification and regression on structured/tabular data with mixed numerical and categorical columns, requiring no fine-tuning or hyperparameter search - training examples are passed as context and predictions are made in a single forward pass. This repository contains the PyTorch weights. For the JAX/Flax weights see You can also load directly using the HuggingFace Hub API: Developed by the Google Research team. - Tabular data with numerical and/or categorical columns - Binary and multiclass classification (up to 10 classes) TabFM uses alternating row and column attention to capture both feature interactions…

Open weights other tabfm