Domain Agnostic Text Redaction from Natural Language Rules using Instruction Tuning
This paper presents an explainable, domain-agnostic text redaction framework that leverages instruction-tuned language models to identify and redact sensitive information based on user-defined natural language rules, providing transparent justifications for each action to ensure auditability and high precision in critical applications like legal and medical documentation.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the modern world, vast amounts of personal and corporate information exist as simple text, from medical records and legal contracts to financial reports. As this data becomes increasingly digitized, a critical challenge arises: how to share or analyze these documents without exposing sensitive secrets. Laws like the General Data Protection Regulation and the Health Insurance Portability and Accountability Act demand that specific details, such as names, addresses, or private medical conditions, be hidden before a document leaves a secure environment. Traditionally, this task of "sanitization" has relied on rigid computer programs that hunt for predictable patterns, like a phone number or a social security number. While effective for these standard formats, these tools often fail when sensitive information appears in complex, unstructured sentences, such as a specific clause in a contract or a nuanced medical diagnosis. Furthermore, when these automated tools do make a decision to hide text, they rarely explain why, leaving human auditors to guess the logic behind the redaction.
To solve this, a team of researchers at Mphasis Limited has developed a new approach that treats text redaction not as a simple search-and-replace task, but as a reasoning problem. Instead of hard-coding rules for every possible type of sensitive data, they created a system where a human can describe what needs to be hidden in plain English. For instance, a user might simply state, "Hide any mention of specific client fees in this financial report," or "Remove all details regarding the location of the land plot in this legal agreement." The system then uses a large language model to translate these natural language instructions into a set of logical rules. These rules are used to train a smaller, more efficient language model that can read a document, understand the context, and decide exactly which words or phrases match the user's definition of sensitive. Crucially, this system does not just black out the text; it generates a written explanation for every single piece of information it removes, citing the specific rule that triggered the action.
The researchers tested this method on a variety of document types, including financial disclosures, client engagement details, and medical records. They found that the system could accurately identify and redact sensitive content that traditional tools would miss, such as complex legal terms or specific business strategies, while leaving non-sensitive information untouched. To ensure the system was truly secure, they subjected the redacted documents to a rigorous test where a powerful artificial intelligence attempted to guess the hidden information based on the surrounding text. The system proved highly resilient; the AI was unable to reconstruct the redacted details, indicating that the sensitive information was effectively removed and not just obscured. In their testing, the model successfully identified and redacted over 95 percent of the sensitive instances it was asked to find.
A key innovation in this work is the use of synthetic data to train the system. Rather than feeding the model real, private documents, the researchers used a large language model to generate thousands of fake documents that mimicked real-world scenarios. These synthetic documents contained both sensitive and non-sensitive content, along with the correct redactions and explanations. This allowed the smaller model to learn how to reason about privacy rules without ever seeing a real person's private data during its training. The result is a tool that is both flexible and transparent. It can adapt to new types of documents and new definitions of sensitivity on the fly, simply by listening to a human's instructions. By providing a clear, natural language justification for every redaction, the system bridges the gap between automated efficiency and human accountability, offering a way to protect privacy that is as understandable as it is effective.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.