Hi everyone! ![]()
A couple of days ago, I introduced the concrete-fhe-toolkit(`community.zama.org/t/showcase-concrete-fhe-toolkit-bounded-math-sorting-and-transcendentals-sin-cos-division-for-concrete/4633\`) here—a library built to simplify bounded FHE math operations on top of Zama’s Concrete.
Today, I’m excited to announce a massive update: The Machine Learning (ML) Subpackage!
While the toolkit originally focused on basic array operations and math (like gcd, factorial, sin), we realized that one of the biggest bottlenecks for developers is porting standard ML models to FHE. With the new ML subpackage, you can now run standard machine learning models and metrics directly on encrypted data effortlessly.
What’s New?
- Models: Encrypted
linear_regression_inference,decision_tree_node,knn_inference, andmajority_votes. - Metrics:
accuracy_score,confusion_matrix,mean_squared_error,mean_absolute_error. - Matrix & Array Ops: Encrypted dot products, matrix multiplications, array padding, slicing, and scaling.
Showcase: Privacy-Preserving Breast Cancer Diagnosis We put together an end-to-end example where a server evaluates a Logistic Regression model on encrypted patient features (using the sklearn Breast Cancer dataset) without ever seeing the raw medical data. You can check out the full code in the README!
GitHub Repository: github.com/tolgabuyuktanir/concrete-fhe-toolkit
PyPI: pip install concrete-fhe-toolkit
I would love to hear your feedback, feature requests, or see any projects you build with this!
Happy encrypting!