{"repo":"SiO-2/kvcloak","free":true,"listed":false,"github":"https://github.com/SiO-2/kvcloak","clone":"git clone https://github.com/SiO-2/kvcloak.git","description":"Official implementation of \"Shadow in the Cache: Unveiling and Mitigating Privacy Risks of KV-cache in LLM Inference\" (NDSS 2026)","language":"Python","stars":19,"topics":["kvcache","llm","privacy","ndss-2026"],"license":"Apache-2.0","category":"ai-agents","readme_excerpt":"KV-CLOAK Official implementation of \"Shadow in the Cache: Unveiling and Mitigating Privacy Risks of KV-cache in LLM Inference\" (NDSS 2026) Paper • Project Page • Citation Additional resources: Contributing • Responsible use Responsible Use This repository includes attack implementations for security research and defense evaluation. - Use only on systems, models, and data you own or are explicitly authorized to test. - Do not use this code for unauthorized access, data extraction, or privacy violations. - Attack scripts require explicit acknowledgment via --i-understand-risks (or KVCLOAK ALLOW ATTACKS=1 ). See RESPONSIBLE USE.md for policy details. --- Overview KV-CLOAK is a privacy-preserving protection mechanism for Key-Value (KV) caches in Large Language Model (LLM) inference. It defends against three types of privacy attacks that can reconstruct user inputs from cached intermediate states: - Inversion Attack : Reconstructs input tokens from KV-cache - Collision Attack : Uses distance metrics to recover tokens - Injection Attack : Injects malicious prompts to extract information Key Results Attack Type Metric Origin KV-Cloak Reduction ------------- -------- -------- ---------- ----------- Inversion BERTScore 1.000 0.050 95% ↓ Collision+ BERTScore 1.000 0.077 92% ↓ Injection ROUGE-L 0.302 0.000 100% ↓ Tested on Llama-3.2-1B with 20 samples Performance Overhead Method Latency (64x256) Latency (64x512) -------- ----------------- ------------------ Origin baseline baseline AES ","default_branch":null,"files":null,"tree":[],"storefront":"/r/SiO-2","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/SiO-2/kvcloak/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}