CPU HIGGS dense training: OpenNN vs PyTorch vs TensorFlow
OpenNN trains the canonical HIGGS dense classifier at a median 107,677 samples/s on eight Intel Core i9-12900K P-core threads. Across three matched runs, it delivers 1.202x PyTorch and 1.057x TensorFlow throughput with comparable held-out quality.
Each framework completed three independent runs. OpenNN recorded a throughput standard deviation of 748 samples/s, or 0.7% of its median, compared with 5,404 samples/s for PyTorch and 4,674 samples/s for TensorFlow.
Contents
- Introduction
- Benchmark application
- Reference computer
- Methodology
- Results
- Held-out quality
- Discussion
- Conclusions
- Reproducing
- References
Introduction
HIGGS is a large tabular binary-classification dataset from high-energy physics. Its 10.5-million-row training split and 28 numerical features make it useful for measuring sustained dense-network throughput rather than a short synthetic kernel.
This CPU training benchmark uses the same canonical 28-1024-1024-1 ReLU classifier with Adam, batch 1,024, one warmup epoch and one timed epoch, and eight P-core threads in OpenNN, PyTorch, and TensorFlow.
Benchmark application
| Item | Configuration |
|---|---|
| Dataset | HIGGS |
| Training rows | 10,500,000 |
| Test rows processed | 499,712 |
| Inputs | 28 normalized numerical features |
| Network | 28 -> 1024 ReLU -> 1024 ReLU -> 1 |
| Loss | Binary cross-entropy |
| Optimizer | Adam |
| Batch size | 1,024 |
| Warmup | 1 epoch |
| Timed work | 1 epoch |
| CPU threads | 8 P-core threads |
| Metric | Training samples/s; higher is better |
Reference computer
| Component | Value |
|---|---|
| CPU | Intel Core i9-12900K |
| OpenNN CPU backend | Intel oneMKL |
| Operating environment | Linux 6.17 x86_64 under WSL2 |
| Python | 3.12.3 |
| PyTorch | 2.13.0+cu130 |
| TensorFlow | 2.21.0 |
| OpenNN | 9.0.0 |
| Run ID | 20260714T093802Z |
Methodology
The three engines consume the same normalized HIGGS split and implement the same dense topology. GPUs are hidden so the comparison remains CPU-only. OpenNN uses its oneMKL build; all engines receive an eight-thread limit chosen to use the processor’s eight performance cores.
OpenNN and PyTorch use close core placement in the harness. TensorFlow receives the same eight-thread intra-op limit without explicit affinity because forcing that affinity substantially regresses this TensorFlow workload. This is documented behavior of the benchmark protocol, not an undisclosed per-result change.
Each benchmark run executes one warmup epoch followed by one timed epoch. The runner launches three independent runs per engine and reports the median throughput and timed-epoch duration; the displayed dispersion is the standard deviation across those three runs. Testing runs after training and is excluded from the throughput measurement.
Results
| Framework | Median throughput | Standard deviation | Median timed epoch | OpenNN speedup |
|---|---|---|---|---|
| OpenNN | 107,677 samples/s | 748 samples/s | 97.514 s | 1.000x |
| TensorFlow | 101,874 samples/s | 4,674 samples/s | 103.069 s | 1.057x |
| PyTorch | 89,558 samples/s | 5,404 samples/s | 117.242 s | 1.202x |
OpenNN leads PyTorch by 20.2% and TensorFlow by 5.7% in median throughput. Its standard deviation is 0.7% of the median, compared with 6.0% for PyTorch and 4.6% for TensorFlow in this three-run sample.
Held-out quality
The runner evaluates the trained model on the same held-out split after timing:
| Framework | Accuracy | Log loss | ROC AUC |
|---|---|---|---|
| OpenNN | 0.771921 | 0.467444 | 0.856560 |
| TensorFlow | 0.772391 | 0.466840 | 0.856889 |
| PyTorch | 0.769467 | 0.471449 | 0.853886 |
The three one-epoch models occupy the same quality band. TensorFlow has the strongest median value by a small margin in each held-out metric, while OpenNN and PyTorch remain close enough that throughput is not being obtained by skipping the matched learning workload.
Discussion
Across the three independent runs, OpenNN finishes the median timed epoch 19.7 seconds ahead of PyTorch and 5.6 seconds ahead of TensorFlow, reaching the highest median throughput of the three frameworks.
The quality table matters because training throughput can otherwise reward implementations that perform different work. Here, all three implementations produce comparable held-out accuracy, log loss, and AUC after the timed workload.
Repeatability is also operationally relevant. OpenNN’s 0.7% throughput dispersion makes epoch duration more predictable in this setup, while the PyTorch and TensorFlow results vary by roughly 5-6%. The benchmark does not isolate the cause of that difference, so it should be treated as a measured property of this protocol rather than attributed to one runtime mechanism alone.
Conclusions
- OpenNN records the highest median throughput at 107,677 samples/s.
- It is 1.202x PyTorch and 1.057x TensorFlow across three independent runs.
- OpenNN has the lowest observed throughput dispersion: 748 samples/s, or 0.7% of its median.
- Held-out accuracy, log loss, and ROC AUC remain comparable across the three engines.
Reproducing
The canonical runner is docs/benchmarks/throughput/higgs/run_higgs_cpu.py:
python docs/benchmarks/throughput/higgs/run_higgs_cpu.py train \
--engines opennn,pytorch,tensorflow \
--train "$OPENNN_BENCH_DATA/higgs/higgs_train.csv" \
--test "$OPENNN_BENCH_DATA/higgs/higgs_test.csv" \
--epochs 1 --warmup-epochs 1 --batch 1024 \
--hidden 1024 --hidden-layers 2 --activation relu \
--threads 8 --runs 3
The runner searches build-mkl/bin first and warns when the selected OpenNN binary does not link Intel oneMKL. The immutable result artifact is docs/benchmarks/results/cpu-dense-higgs-train-20260714T093802Z.json.