Europe/Helsinki
ProjectsNovember 8, 2026

TRUSTED PETs: Privacy Pipeline That Beat the Baselines 2x

Nhat Chau
,
Chien Le Minh
TRUSTED PETs is a privacy pipeline my team of 3 built in 2 days at the Since AI Hackathon 2026 in Turku, Finland 🇫🇮. It finds personal data in tables and free text, protects it, and proves how much risk was removed and how much value was kept. It identifies sensitive columns with nearly 2x the accuracy of the organisers' baselines, finds personal data in free text 5.4x better, and runs entirely on the local machine. I set up the repository, built the first version of the React web app, and made the detector 2x faster on a cold run and 18x faster with a warm cache.
Organisations need to share data with researchers, vendors and the public, but their tables are full of names, national IDs, phone numbers and details that can re-identify people when combined. The challenge was "protect the data, keep its value". The organisers gave us synthetic data from 9 domains (health, finance, mobility, energy, cyber and more), 27 sharing scenarios and an evaluation toolkit. Their baselines read a gold label file to know what each column contains. Our tool had to work that out on its own, including in an export where all 26 column names were hidden (c01 to c26).
  • Automatic detection: labels every column with its privacy role, subtype, GDPR special-category flag and a confidence score. Macro-F1 is 0.774 with column names hidden, against the baseline's 0.401.
  • Free-text PII finder: finds names, phone numbers, addresses and national IDs in chat messages with 0.999 recall, above the 0.95 the health scenario requires.
  • Three-tier AI detector: rules and checksums first, then machine learning (kNN and logistic regression), then a local 27B-parameter LLM for the columns it is still unsure about.
  • Scenario-aware protection: picks one privacy technique per column (keyed HMAC pseudonyms, generalisation, suppression, redaction) to fit the sharing scenario.
  • Automatic tuning: searches up to 50 candidate plans to meet the k-anonymity, l-diversity and t-closeness targets while keeping the data useful.
  • Release gate: reloads and re-checks every output file, and publishes only a release that passes.
  • 7-step CI-style web UI: Input, Detect, Review, Select, Search, Transform and Evaluate, each with result tables and a human review step.
  • Python, pandas, NumPy, scikit-learn: the pipeline stages, the ML router and parallel model fitting with joblib.
  • AutoTrust-JEV-27B (4-bit MLX): a local LLM on Apple Silicon (about 18 GB of memory) that scores labelling decisions, so no data is sent to a cloud API.
  • React 19, TypeScript, Vite: the web client.
  • Tailwind CSS 4 and Ant Design 6: UI styling and components.
  • Chrome on-device AI (Gemini Nano): optional in-browser help with uncertain columns.
  • pets-eval: the organisers' toolkit for privacy and utility scorecards.
  • Prettier, ESLint, Husky: code quality and pre-commit checks.
The detector re-trained its models on every run and looked up columns one at a time. I cached the trained models on disk, trained them in parallel, batched the lookups into one matrix operation per table, and sent the LLM requests concurrently. A run over all 9 datasets went from 7.2s to 3.5s cold and 0.4s warm, and the predictions were 100% identical to before. The backend was still being written on day one, so I built the first web app to run fully in the browser: a rule-based classifier, a policy engine, k-anonymity transforms and a risk preview. The team kept working against it until the Python API was ready, then connected the same pages to the API. The gold labels sat next to the data, so it would have been easy to cheat by accident. We added a guard mode that blocks every pipeline stage from reading the answers. Only the final scorecard can read them. We lead with the hidden-names score because it is the fair test.
MetricOrganisers' baselineOur resultImprovement
Column detection, names hidden (macro-F1)0.4010.774nearly 2x
Column detection, with names (macro-F1)0.6460.854+32%
Free-text personal data (F2)0.1840.9985.4x
Detector run time, 9 datasets7.2s3.5s cold, 0.4s warm2x / 18x
In the customer-service scenario, the release was validated end to end with 0% residual national IDs, payment cards, IBANs, phone numbers and emails in the text. It still scored 0.9995, 1.0 and 1.0 on three of its four utility tasks. On the fourth, it scored 0, the same as the baseline.

Related projects