Pimento enforces privacy guarantees for natural language queries

PIMENTO: A Privacy Framework for Querying Text

Cryptography and Security

Summary

Handling privacy for queries made on text data is tricky because existing privacy methods don’t fit well with natural language. The authors introduce Pimento, a framework that converts text, queries, and privacy rules into a database format so these privacy rules can be checked and enforced accurately. Pimento combines two major privacy ideas—contextual integrity and differential privacy—making it possible to have stronger privacy protection for text analytics. Their system also improves accuracy by carefully choosing queries that require less noise to maintain privacy.

What this means in practice

  • For data privacy teams: Enforce strict privacy rules on natural language queries run over sensitive text datasets by translating them into verifiable database queries.
  • For natural language processing developers: Build tools that process user questions in natural language while ensuring privacy policies and protections are correctly applied and noise is minimized.

Authors

Mushtari Sadia, Ang Chen, Amrita Roy Chowdhury

Abstract

Currently, there are two state-of-the-art, complementary privacy guarantees: contextual integrity (CI) for what may flow, and differential privacy (DP) for what may be inferred. Yet neither maps cleanly onto natural language, leaving existing approaches unable to provide these guarantees for analytics over unstructured text. We address this gap with Pimento, a framework that takes three forms of natural language: text corpus, queries, and privacy policies; and grounds them into a relational database, creating a common substrate on which both guarantees can be enforced formally. With this design, we not only provide end to end privacy guarantees, but also improvement to utility through three key contributions: DP aware Text-to-SQL, which searches for correct queries requiring the least DP noise; CI aware Text-to-SQL, which compiles natural language policies into executable CI rules over the database; and a new privacy definition we call contextual differential privacy, which redefines the traditional DP neighborhood under CI, and yields a tighter smooth sensitivity bound. Across new benchmarks, Pimento selects the best query in 75.3% of cases (upto +45 points over baselines) and achieves zero leakage under correct policy grounding. To our knowledge, Pimento is the first framework to provide formal privacy guarantees for natural language analytics under CI, DP, and their composition.