finds.dev

socathie/circomlib-ml

Circom Circuits Library for Machine Learning

View on GitHubHomepage ↗

★ 182Jupyter NotebookGPL-3.0updated Jun 2024

// the take

Circom circuit templates for common neural network layers — Dense, Conv2D, ReLU, BatchNorm, pooling variants — so you can run ML inference inside a ZK proof. The target user is someone building zkML applications who needs provable inference without writing circuits from scratch. Think: on-chain MNIST classifier with a verifiable proof that the model ran correctly.

The layer coverage is solid for a research-grade library: Conv1D/2D with strides, DepthwiseConv2D, SeparableConv2D, BatchNormalization, and several pooling types are all there. The Poly activation (x²+x) as a ReLU substitute is a real practical contribution — ReLU requires range checks that blow up constraint counts, and polynomial activations cut that significantly. The scaling math in the README is honest and detailed; it actually tells you where precision dies in deep networks rather than hiding it. End-to-end MNIST test circuits give you a working reference point rather than just unit tests.

The README opens with a warning that it's outdated, which is not a great sign for a library people would build on top of. No tooling for the weight-scaling pipeline — you're on your own to write the Python/TF export code that converts floats to scaled integers at the right exponents, which is the most error-prone part of using this. The finite-field precision ceiling (~10^76) means any network deeper than ~5-6 layers hits a wall, and there's no guidance on architecture choices that stay within budget. No npm package or versioning — you're copying circom files directly, so staying current with upstream circomlib changes is a manual exercise.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
182
Forks
22
Language
Jupyter Notebook
License
GPL-3.0
Last commit
19 Jun 2024

// nearby

If circomlib-ml isn't quite it.

All repos →