memaudit is a tool that integrates with the TRL library to verify whether fine-tuning models on private data has led to memorization. It works by injecting calibrated decoy secrets into the dataset and monitoring loss during the training process.
- Uses `inject()` to plant decoys and `MemorizationAuditCallback` to handle auditing within the SFTTrainer workflow.
- Verifies at train start that every decoy receives loss under the real configuration, including masking, packing, and LoRA settings.
- Fails the run if a canary never receives loss, preventing false all-clear reports.
- Generates a local JSON report covering membership inference and regurgitation tests with confidence intervals.
- Includes a public proof run on TinyLlama-1.1B-Chat showing leakage correlates with data duplication.
The tool provides test evidence for legal or security inquiries regarding data privacy, rather than serving as a compliance certificate.