Lab 05
Zero-Knowledge Inference
Prove an AI decision is genuine
Create a private AI calculation and a mathematical receipt that catches a changed answer.
Overview
How can someone check a calculation without seeing its private inputs?
How this could help a business
This pattern can support privacy-sensitive verification between organisations. Production use also needs an appropriate model, legal review, secure input collection and a clear decision process.
What I built
- A small trained credit-data model, a fixed-point version and comparisons of their predictions.
- A proof circuit, browser proof worker and tests that reject changed public results.
Live demo
Choose fictional account details, create a private proof, then try changing the answer.
What I built
Implementation, decisions and evidence.
What Sebastian built
The application around the technology.
- A small trained credit-data model, a fixed-point version and comparisons of their predictions.
- A proof circuit, browser proof worker and tests that reject changed public results.
- An integration with the published verifier contract on Ethereum's Sepolia test network.
One engineering decision
Keep the private inputs in the browser and send only the proof and its public outputs when external verification is requested.
What to check yourself
Generate a fresh proof, inspect the real changed-answer check, or open the published GPL-3.0 verifier source.
Tools and model credits. The practice dataset comes from UCI. Circom and snarkjs provide the proof tools; the public source package credits these dependencies.
These are portfolio demonstrations. Explore professional experience separately, or discuss how the approach could fit your team.
Learn
Understand what the application is doing.
You are testing whether an answer can be changed without being caught. Start with the prefilled practice account; no wallet or blockchain knowledge is needed.
Pause and predict
If a mathematical proof passes, does that make the AI's advice correct?
A learning question, not a score. Try this in the working demo.
Try changing something
Now make it your experiment.
Predict whether a changed answer will pass. Check the original, reveal the tamper check, then try different fictional details.
A valid proof checks the calculation, not whether the AI is fair, accurate or suitable for lending. Practice data only; never a real credit decision.
A few words, explained
- Proof
- A mathematical receipt that lets a checker test a statement about a calculation.
- Blockchain
- A shared record that can run a public verification program. This example uses a practice network and does not move money.
Data handling & current limitations
Practice data only, in New Taiwan dollars. A proof checks the calculation, not whether its advice is good.
Demo only. Each lab below explains which inputs stay on your device and which data is sent for server-backed features. Model files are downloaded and may remain in your browser cache. Hosting and security services also receive the network requests needed to serve the site.
Your private features, salt and model weights stay in this browser. The optional testnet check sends the proof and six public signals (model commitment, input commitment, prediction, risk bucket and two thresholds) to our server, which passes them to the Sepolia verifier through an RPC provider. Those six values are visible to both.
A valid proof checks the calculation, not whether the AI is fair, accurate or suitable for lending. Practice data only; never a real credit decision.