Zama’s Concrete-ML library is making fully homomorphic encryption accessible to data scientists who don’t want to learn cryptography. The French startup’s latest tutorial walks through building a sentiment analysis model that runs entirely on encrypted data — a capability that matters more than most people realize. Think about it: every time you ask a cloud service to analyze your private messages, your emails, or your customer feedback, that text gets decrypted on someone else’s server. FHE eliminates that exposure entirely.
The tutorial uses the Twitter airline sentiment dataset, which skews heavily negative — 62.69% of tweets are complaints, versus 16.14% positive and 21.17% neutral. That imbalance shapes the evaluation strategy, since a model that just predicts “negative” every time would already hit 62% accuracy. The real challenge is distinguishing between the minority classes.
Rather than training a transformer directly on encrypted data — which would be computationally brutal — the approach is cleverer. They use a fine-tuned RoBERTa model from Hugging Face to extract hidden representations of each tweet, average those representations across words to get a 768-dimensional vector, then feed that vector into an XGBoost classifier. XGBoost is far more FHE-friendly than a full transformer. This two-stage pipeline is becoming a standard pattern for FHE machine learning: use a large model for feature extraction in plaintext, then run the actual classification on encrypted features.
What’s notable here is the demo on Hugging Face Spaces, which lets anyone test the encrypted inference without setting up a local FHE environment. That’s a meaningful step toward broader adoption. FHE still carries a 10-100x computational overhead compared to plaintext inference, but for latency-tolerant applications like batch sentiment analysis, that tradeoff is increasingly acceptable. The question is whether enterprises will pay that cost for privacy guarantees they could approximate with other techniques — or whether FHE becomes the default once hardware acceleration matures.