finds.dev← search

// the find

socathie/circomlib-ml

★ 182 · Jupyter Notebook · GPL-3.0 · updated Jun 2024

Circom Circuits Library for Machine Learning

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →