\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/KF_a47apY_gAAobnpen4K.png\" width=\"100%\">\n</div>\n\n\nMemPrivacy implements **local reversible pseudonymization**:\n\n1. **On-device privacy detection (local)** \n Detect privacy spans in user input and classify them by:\n - **privacy level** (PL1–PL4)\n - **privacy type** (e.g., Email, Real Name, Medical Health, Recovery Code)\n\n2. **Typed placeholder replacement (local → cloud)** \n Replace protected spans with **semantically meaningful typed placeholders**, e.g.:\n - `160/110` (blood pressure) → `<Health_Info_1>`\n - `recovery code RC-7291` → `<Recovery_Code_1>`\n\n3. **Local secure mapping (persistent across sessions)** \n Store the mapping `placeholder ↔ original value` in a **local SQLite DB**.\n\n4. **Cloud reasoning and memory operations (cloud)** \n The cloud agent/memory only sees placeholders—preserving semantic roles while hiding raw values.\n\n5. **Downlink restoration (local)** \n Restore placeholders in the cloud response back to the original values for a fluent user experience.\n\nThis yields **architecture-level isolation**: cloud components never see/store raw sensitive values.\n\n---\n\n## Key Contributions & Advantages\n\n<div align=\"center\">\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/eo_3o39uKtSvMA9_rzsP8.png\" width=\"100%\">\n</div>\n\n\n### 1) Privacy–Utility Balance (vs. masking)\n- **Irreversible masking** (`***`) protects privacy but loses meaning and breaks memory retrieval.\n- **Untyped placeholders** (`<Mask_1>`) keep structure but lose semantic roles.\n- **MemPrivacy (typed placeholders)** preserve the semantic role *and* hide raw values, minimizing utility loss.\n\n### 2) Configurable Protection via a 4-Level Privacy Taxonomy\nMemPrivacy introduces **PL1–PL4** to support user-configurable policies:\n\n| Level | Meaning | Examples | Typical Default Policy |\n|---|---|---|---|\n| PL1 | low sensitivity / preferences | “I like sci-fi”, tone, generic habits | can be kept for personalization |\n| PL2 | identifiable PII | real name, phone, email, detailed address, account IDs | disallowed by default in long-term memory |\n| PL3 | highly sensitive PII | health records, financial records, precise location, religion/ethnicity | not permitted in general memory |\n| PL4 | critical secrets (immediately exploitable) | passwords, OTPs, recovery codes, API keys | **zero retention**; must be blocked/redacted |\n\n### 3) Benchmark & Evaluation for Memory Systems\nThis repo builds **MemPrivacy-Bench** and evaluates privacy protection strategies across real memory systems:\n- **MemPrivacy-Bench**: 200 synthetic users, bilingual (Chinese/English), multi-turn dialogues with dense privacy exposure, plus memory QA tasks.\n- Evaluations on **MemPrivacy-Bench** (in-distribution) and **PersonaMem-v2** (out-of-distribution, annotated here).\n\n### 4) Lightweight & Practical\nThe framework is designed for **edge deployment**:\n- local detection + placeholder substitution + SQLite lookup are low-latency operations\n- works as a drop-in privacy layer for existing cloud agents / memory systems\n\n### 5) Open-Source MemPrivacy Models\nWe release a family of MemPrivacy models trained via Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) across different parameter sizes. You can access the full model collection [here](https://huggingface.co/collections/IAAR-Shanghai/memprivacy).\n\n| Model Name | Parameters | Method | HuggingFace Link |\n| :--- | :---: | :---: | :--- |\n| 🤗 **MemPrivacy-4B-RL** | 4B | RL | [IAAR-Shanghai/MemPrivacy-4B-RL](https://huggingface.co/IAAR-Shanghai/MemPrivacy-4B-RL) |\n| 🤗 **MemPrivacy-4B-SFT** | 4B | SFT | [IAAR-Shanghai/MemPrivacy-4B-SFT](https://huggingface.co/IAAR-Shanghai/MemPrivacy-4B-SFT) |\n| 🤗 **MemPrivacy-1.7B-RL** | 1.7B | RL | [IAAR-Shanghai/MemPrivacy-1.7B-RL](https://huggingface.co/IAAR-Shanghai/MemPrivacy-1.7B-RL) |\n| 🤗 **MemPrivacy-1.7B-SFT** | 1.7B | SFT | [IAAR-Shanghai/MemPrivacy-1.7B-SFT](https://huggingface.co/IAAR-Shanghai/MemPrivacy-1.7B-SFT) |\n\n---\n\n## Evaluation Results\n\n### 1. Privacy Extraction Performance\n\n<div align=\"center\">\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/PTiaiiGkY7PP1zGs8IQJn.png\" width=\"100%\">\n</div>\n\n**Key Takeaways:**\n\n* **Superior Accuracy:** MemPrivacy consistently outperforms 11 general LLMs and **OpenAI-Privacy-Filter**. The best model (MemPrivacy-4B-RL) achieves F1 scores of **85.97%** and **94.48%**, significantly surpassing the top general models (78.41% and 92.18%). Even our smallest 0.6B model beats most general models.\n* **Robustness on Complex Data:** While lightweight filters like OpenAI-Privacy-Filter are fast, they struggle with implicit and linguistically diverse privacy expressions (only 35.50% F1 on MemPrivacy-Bench). MemPrivacy accurately handles fine-grained, heterogeneous conversational scenarios.\n* **High Efficiency:** Despite its accuracy, MemPrivacy remains highly efficient. Processing latency per message is consistently **below one second** on PersonaMem-v2, making it well-suited for seamless on-device deployment without noticeable delays.\n\n### 2. Memory System Performance under Different Protection Methods\n\n<div align=\"center\">\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/mL_8cwXBEBXU-bcBTc7KN.png\" width=\"100%\">\n</div>\n\n\n\n**Key Takeaways:**\n\n* **Optimal Privacy-Utility Trade-off:** Compared to traditional masking (`***`) or untyped placeholders (`<Mask_1>`), MemPrivacy preserves the utility of downstream systems (LangMem, Mem0, Memobase) significantly better by retaining critical semantic roles.\n* **Minimal Degradation:** When applying stringent protection (PL2–PL4), system accuracy drops by merely **0.71%–1.60%**. If protecting only critical secrets (PL4), the drop is **below 0.89%**. \n* **Extractor Dependency:** The effectiveness of the entire framework heavily depends on accurate privacy extraction. Replacing the MemPrivacy model with general LLMs (e.g., DeepSeek-V3.2-Think, GPT-5.2) causes substantial accuracy degradation, validating the necessity of our specialized fine-tuning.\n\n---\n\n## 🔗 Links\n\n* [Paper on arXiv](https://arxiv.org/abs/2605.09530)\n* [GitHub Repository](https://github.com/MemTensor/MemPrivacy)\n* [Hugging Face Models](https://huggingface.co/collections/IAAR-Shanghai/memprivacy)","html":"<h1 class=\"relative group flex items-baseline\">\n\t<a id=\"memprivacy-privacy-preserving-personalized-memory-for-edge-cloud-agents\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#memprivacy-privacy-preserving-personalized-memory-for-edge-cloud-agents\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\tMemPrivacy: Privacy-Preserving Personalized Memory for Edge-Cloud Agents\n\t</span>\n</h1>\n<p><strong>Authors:</strong> Yining Chen, Jihao Zhao, Bo Tang, Haofen Wang, Yue Zhang, Fei Huang, Feiyu Xiong, Zhiyu Li<br><strong>ArXiv:</strong> <a href=\"https://arxiv.org/abs/2605.09530\" rel=\"nofollow\">2605.09530</a><br><strong>GitHub:</strong> <a href=\"https://github.com/MemTensor/MemPrivacy\" rel=\"nofollow\">MemTensor/MemPrivacy</a><br><strong>Hugging Face Models:</strong> <a href=\"https://huggingface.co/collections/IAAR-Shanghai/memprivacy\">IAAR-Shanghai/memprivacy</a></p>\n<hr>\n<h2 class=\"relative group flex items-baseline\">\n\t<a id=\"🧠-motivation\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#🧠-motivation\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t🧠 Motivation\n\t</span>\n</h2>\n<p>As LLM-powered agents become widespread in edge-cloud settings, <strong>personalized memory</strong> is crucial for long-term adaptation and user-centric interaction. However, <strong>cloud-based memory</strong> risks exposing sensitive user information, while naive privacy solutions (like <code>***</code> masking) <strong>destroy task semantics</strong>, harming memory utility and personalization.</p>\n<p><strong>Goal:</strong> Protect sensitive data <strong>without sacrificing semantic utility</strong>.</p>\n<hr>\n<h2 class=\"relative group flex items-baseline\">\n\t<a id=\"why-memprivacy\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#why-memprivacy\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\tWhy MemPrivacy?\n\t</span>\n</h2>\n<p>Cloud agents typically send user messages to remote LLMs and store conversation traces in memory systems (e.g., <strong>Mem0</strong>, <strong>LangMem</strong>, <strong>Memobase</strong>) for long-term personalization. This creates a large privacy attack surface:</p>\n<ul>\n<li>plaintext prompts and logs may contain <strong>PII</strong>, medical/financial data, credentials</li>\n<li>cloud memory stores can leak via retrieval, prompt injection, inversion, or misconfiguration</li>\n<li>naïve mitigation (e.g., <code>***</code> masking) <strong>destroys task semantics</strong>, harming retrieval and personalization</li>\n</ul>\n<p><strong>Goal:</strong> reduce privacy leakage <strong>without sacrificing utility</strong>.</p>\n<hr>\n<h2 class=\"relative group flex items-baseline\">\n\t<a id=\"core-idea\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#core-idea\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\tCore Idea\n\t</span>\n</h2>\n<div align=\"center\">\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/KF_a47apY_gAAobnpen4K.png\" width=\"100%\">\n</div>\n\n\n<p>MemPrivacy implements <strong>local reversible pseudonymization</strong>:</p>\n<ol>\n<li><p><strong>On-device privacy detection (local)</strong><br>Detect privacy spans in user input and classify them by:</p>\n<ul>\n<li><strong>privacy level</strong> (PL1–PL4)</li>\n<li><strong>privacy type</strong> (e.g., Email, Real Name, Medical Health, Recovery Code)</li>\n</ul>\n</li>\n<li><p><strong>Typed placeholder replacement (local → cloud)</strong><br>Replace protected spans with <strong>semantically meaningful typed placeholders</strong>, e.g.:</p>\n<ul>\n<li><code>160/110</code> (blood pressure) → <code><Health_Info_1></code></li>\n<li><code>recovery code RC-7291</code> → <code><Recovery_Code_1></code></li>\n</ul>\n</li>\n<li><p><strong>Local secure mapping (persistent across sessions)</strong><br>Store the mapping <code>placeholder ↔ original value</code> in a <strong>local SQLite DB</strong>.</p>\n</li>\n<li><p><strong>Cloud reasoning and memory operations (cloud)</strong><br>The cloud agent/memory only sees placeholders—preserving semantic roles while hiding raw values.</p>\n</li>\n<li><p><strong>Downlink restoration (local)</strong><br>Restore placeholders in the cloud response back to the original values for a fluent user experience.</p>\n</li>\n</ol>\n<p>This yields <strong>architecture-level isolation</strong>: cloud components never see/store raw sensitive values.</p>\n<hr>\n<h2 class=\"relative group flex items-baseline\">\n\t<a id=\"key-contributions--advantages\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#key-contributions--advantages\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\tKey Contributions & Advantages\n\t</span>\n</h2>\n<div align=\"center\">\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/eo_3o39uKtSvMA9_rzsP8.png\" width=\"100%\">\n</div>\n\n\n<h3 class=\"relative group flex items-baseline\">\n\t<a id=\"1-privacyutility-balance-vs-masking\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#1-privacyutility-balance-vs-masking\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t1) Privacy–Utility Balance (vs. masking)\n\t</span>\n</h3>\n<ul>\n<li><strong>Irreversible masking</strong> (<code>***</code>) protects privacy but loses meaning and breaks memory retrieval.</li>\n<li><strong>Untyped placeholders</strong> (<code><Mask_1></code>) keep structure but lose semantic roles.</li>\n<li><strong>MemPrivacy (typed placeholders)</strong> preserve the semantic role <em>and</em> hide raw values, minimizing utility loss.</li>\n</ul>\n<h3 class=\"relative group flex items-baseline\">\n\t<a id=\"2-configurable-protection-via-a-4-level-privacy-taxonomy\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#2-configurable-protection-via-a-4-level-privacy-taxonomy\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t2) Configurable Protection via a 4-Level Privacy Taxonomy\n\t</span>\n</h3>\n<p>MemPrivacy introduces <strong>PL1–PL4</strong> to support user-configurable policies:</p>\n<div class=\"max-w-full overflow-auto\">\n\t<table>\n\t\t<thead><tr>\n<th>Level</th>\n<th>Meaning</th>\n<th>Examples</th>\n<th>Typical Default Policy</th>\n</tr>\n\n\t\t</thead><tbody><tr>\n<td>PL1</td>\n<td>low sensitivity / preferences</td>\n<td>“I like sci-fi”, tone, generic habits</td>\n<td>can be kept for personalization</td>\n</tr>\n<tr>\n<td>PL2</td>\n<td>identifiable PII</td>\n<td>real name, phone, email, detailed address, account IDs</td>\n<td>disallowed by default in long-term memory</td>\n</tr>\n<tr>\n<td>PL3</td>\n<td>highly sensitive PII</td>\n<td>health records, financial records, precise location, religion/ethnicity</td>\n<td>not permitted in general memory</td>\n</tr>\n<tr>\n<td>PL4</td>\n<td>critical secrets (immediately exploitable)</td>\n<td>passwords, OTPs, recovery codes, API keys</td>\n<td><strong>zero retention</strong>; must be blocked/redacted</td>\n</tr>\n</tbody>\n\t</table>\n</div>\n<h3 class=\"relative group flex items-baseline\">\n\t<a id=\"3-benchmark--evaluation-for-memory-systems\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#3-benchmark--evaluation-for-memory-systems\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t3) Benchmark & Evaluation for Memory Systems\n\t</span>\n</h3>\n<p>This repo builds <strong>MemPrivacy-Bench</strong> and evaluates privacy protection strategies across real memory systems:</p>\n<ul>\n<li><strong>MemPrivacy-Bench</strong>: 200 synthetic users, bilingual (Chinese/English), multi-turn dialogues with dense privacy exposure, plus memory QA tasks.</li>\n<li>Evaluations on <strong>MemPrivacy-Bench</strong> (in-distribution) and <strong>PersonaMem-v2</strong> (out-of-distribution, annotated here).</li>\n</ul>\n<h3 class=\"relative group flex items-baseline\">\n\t<a id=\"4-lightweight--practical\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#4-lightweight--practical\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t4) Lightweight & Practical\n\t</span>\n</h3>\n<p>The framework is designed for <strong>edge deployment</strong>:</p>\n<ul>\n<li>local detection + placeholder substitution + SQLite lookup are low-latency operations</li>\n<li>works as a drop-in privacy layer for existing cloud agents / memory systems</li>\n</ul>\n<h3 class=\"relative group flex items-baseline\">\n\t<a id=\"5-open-source-memprivacy-models\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#5-open-source-memprivacy-models\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t5) Open-Source MemPrivacy Models\n\t</span>\n</h3>\n<p>We release a family of MemPrivacy models trained via Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) across different parameter sizes. You can access the full model collection <a href=\"https://huggingface.co/collections/IAAR-Shanghai/memprivacy\">here</a>.</p>\n<div class=\"max-w-full overflow-auto\">\n\t<table>\n\t\t<thead><tr>\n<th align=\"left\">Model Name</th>\n<th align=\"center\">Parameters</th>\n<th align=\"center\">Method</th>\n<th align=\"left\">HuggingFace Link</th>\n</tr>\n\n\t\t</thead><tbody><tr>\n<td align=\"left\">🤗 <strong>MemPrivacy-4B-RL</strong></td>\n<td align=\"center\">4B</td>\n<td align=\"center\">RL</td>\n<td align=\"left\"><a href=\"https://huggingface.co/IAAR-Shanghai/MemPrivacy-4B-RL\">IAAR-Shanghai/MemPrivacy-4B-RL</a></td>\n</tr>\n<tr>\n<td align=\"left\">🤗 <strong>MemPrivacy-4B-SFT</strong></td>\n<td align=\"center\">4B</td>\n<td align=\"center\">SFT</td>\n<td align=\"left\"><a href=\"https://huggingface.co/IAAR-Shanghai/MemPrivacy-4B-SFT\">IAAR-Shanghai/MemPrivacy-4B-SFT</a></td>\n</tr>\n<tr>\n<td align=\"left\">🤗 <strong>MemPrivacy-1.7B-RL</strong></td>\n<td align=\"center\">1.7B</td>\n<td align=\"center\">RL</td>\n<td align=\"left\"><a href=\"https://huggingface.co/IAAR-Shanghai/MemPrivacy-1.7B-RL\">IAAR-Shanghai/MemPrivacy-1.7B-RL</a></td>\n</tr>\n<tr>\n<td align=\"left\">🤗 <strong>MemPrivacy-1.7B-SFT</strong></td>\n<td align=\"center\">1.7B</td>\n<td align=\"center\">SFT</td>\n<td align=\"left\"><a href=\"https://huggingface.co/IAAR-Shanghai/MemPrivacy-1.7B-SFT\">IAAR-Shanghai/MemPrivacy-1.7B-SFT</a></td>\n</tr>\n</tbody>\n\t</table>\n</div>\n<hr>\n<h2 class=\"relative group flex items-baseline\">\n\t<a id=\"evaluation-results\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#evaluation-results\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\tEvaluation Results\n\t</span>\n</h2>\n<h3 class=\"relative group flex items-baseline\">\n\t<a id=\"1-privacy-extraction-performance\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#1-privacy-extraction-performance\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t1. Privacy Extraction Performance\n\t</span>\n</h3>\n<div align=\"center\">\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/PTiaiiGkY7PP1zGs8IQJn.png\" width=\"100%\">\n</div>\n\n<p><strong>Key Takeaways:</strong></p>\n<ul>\n<li><strong>Superior Accuracy:</strong> MemPrivacy consistently outperforms 11 general LLMs and <strong>OpenAI-Privacy-Filter</strong>. The best model (MemPrivacy-4B-RL) achieves F1 scores of <strong>85.97%</strong> and <strong>94.48%</strong>, significantly surpassing the top general models (78.41% and 92.18%). Even our smallest 0.6B model beats most general models.</li>\n<li><strong>Robustness on Complex Data:</strong> While lightweight filters like OpenAI-Privacy-Filter are fast, they struggle with implicit and linguistically diverse privacy expressions (only 35.50% F1 on MemPrivacy-Bench). MemPrivacy accurately handles fine-grained, heterogeneous conversational scenarios.</li>\n<li><strong>High Efficiency:</strong> Despite its accuracy, MemPrivacy remains highly efficient. Processing latency per message is consistently <strong>below one second</strong> on PersonaMem-v2, making it well-suited for seamless on-device deployment without noticeable delays.</li>\n</ul>\n<h3 class=\"relative group flex items-baseline\">\n\t<a id=\"2-memory-system-performance-under-different-protection-methods\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#2-memory-system-performance-under-different-protection-methods\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t2. Memory System Performance under Different Protection Methods\n\t</span>\n</h3>\n<div align=\"center\">\n <img src=\"https://cdn-uploads.huggingface.co/production/uploads/64e18e9ec20c27fcc8df384e/mL_8cwXBEBXU-bcBTc7KN.png\" width=\"100%\">\n</div>\n\n\n\n<p><strong>Key Takeaways:</strong></p>\n<ul>\n<li><strong>Optimal Privacy-Utility Trade-off:</strong> Compared to traditional masking (<code>***</code>) or untyped placeholders (<code><Mask_1></code>), MemPrivacy preserves the utility of downstream systems (LangMem, Mem0, Memobase) significantly better by retaining critical semantic roles.</li>\n<li><strong>Minimal Degradation:</strong> When applying stringent protection (PL2–PL4), system accuracy drops by merely <strong>0.71%–1.60%</strong>. If protecting only critical secrets (PL4), the drop is <strong>below 0.89%</strong>. </li>\n<li><strong>Extractor Dependency:</strong> The effectiveness of the entire framework heavily depends on accurate privacy extraction. Replacing the MemPrivacy model with general LLMs (e.g., DeepSeek-V3.2-Think, GPT-5.2) causes substantial accuracy degradation, validating the necessity of our specialized fine-tuning.</li>\n</ul>\n<hr>\n<h2 class=\"relative group flex items-baseline\">\n\t<a id=\"🔗-links\" class=\"block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full\" href=\"#🔗-links\" rel=\"nofollow\">\n\t\t<span class=\"header-link\"><svg class=\"text-gray-500 hover:text-black dark:hover:text-gray-200 w-4\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" width=\"1em\" height=\"1em\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 256 256\"><path d=\"M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z\" fill=\"currentColor\"></path></svg></span>\n\t</a>\n\t<span>\n\t\t🔗 Links\n\t</span>\n</h2>\n<ul>\n<li><a href=\"https://arxiv.org/abs/2605.09530\" rel=\"nofollow\">Paper on arXiv</a></li>\n<li><a href=\"https://github.com/MemTensor/MemPrivacy\" rel=\"nofollow\">GitHub Repository</a></li>\n<li><a href=\"https://huggingface.co/collections/IAAR-Shanghai/memprivacy\">Hugging Face Models</a></li>\n</ul>\n","updatedAt":"2026-05-13T02:40:23.929Z","author":{"_id":"64e18e9ec20c27fcc8df384e","avatarUrl":"/avatars/64ef866b9fa385efcefb34ea76b76802.svg","fullname":"Ding Chen","name":"Hush-cd","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":4,"isUserFollowing":false}},"numEdits":2,"identifiedLanguage":{"language":"en","probability":0.6427178382873535},"editors":["Hush-cd"],"editorAvatarUrls":["/avatars/64ef866b9fa385efcefb34ea76b76802.svg"],"reactions":[{"reaction":"👍","users":["syzsunshine","AdinaY","superbearmaster","flozxwer"],"count":4}],"isReport":false}},{"id":"6a03e1b103f8aa230c6ba267","author":{"_id":"64e18e9ec20c27fcc8df384e","avatarUrl":"/avatars/64ef866b9fa385efcefb34ea76b76802.svg","fullname":"Ding Chen","name":"Hush-cd","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":4,"isUserFollowing":false},"createdAt":"2026-05-13T02:28:01.000Z","type":"comment","data":{"edited":true,"hidden":true,"hiddenBy":"","hiddenReason":"Abuse","latest":{"raw":"This comment has been hidden","html":"This comment has been hidden","updatedAt":"2026-05-13T02:52:51.651Z","author":{"_id":"64e18e9ec20c27fcc8df384e","avatarUrl":"/avatars/64ef866b9fa385efcefb34ea76b76802.svg","fullname":"Ding Chen","name":"Hush-cd","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":4,"isUserFollowing":false}},"numEdits":0,"editors":[],"editorAvatarUrls":[],"reactions":[]}}],"primaryEmailConfirmed":false,"paper":{"id":"2605.09530","authors":[{"_id":"6a028212b823258e76123310","name":"Yining Chen","hidden":false},{"_id":"6a028212b823258e76123311","user":{"_id":"658e85bb5b7553ca5c29ba89","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/658e85bb5b7553ca5c29ba89/KK6UpS9agtrxevvBoup5N.jpeg","isPro":false,"fullname":"Jihao Zhao","user":"Robot2050","type":"user","name":"Robot2050"},"name":"Jihao Zhao","status":"claimed_verified","statusLastChangedAt":"2026-05-13T07:54:23.408Z","hidden":false},{"_id":"6a028212b823258e76123312","name":"Bo Tang","hidden":false},{"_id":"6a028212b823258e76123313","name":"Haofen Wang","hidden":false},{"_id":"6a028212b823258e76123314","name":"Feiyu Xiong","hidden":false},{"_id":"6a028212b823258e76123315","name":"Zhiyu Li","hidden":false}],"publishedAt":"2026-05-10T00:00:00.000Z","submittedOnDailyAt":"2026-05-13T00:00:00.000Z","title":"MemPrivacy: Privacy-Preserving Personalized Memory Management for Edge-Cloud Agents","submittedOnDailyBy":{"_id":"64e18e9ec20c27fcc8df384e","avatarUrl":"/avatars/64ef866b9fa385efcefb34ea76b76802.svg","isPro":false,"fullname":"Ding Chen","user":"Hush-cd","type":"user","name":"Hush-cd"},"summary":"As LLM-powered agents are increasingly deployed in edge-cloud environments, personalized memory has become a key enabler of long-term adaptation and user-centric interaction. However, cloud-assisted memory management exposes sensitive user information, while existing privacy protection methods typically rely on aggressive masking that removes task-relevant semantics and consequently degrades memory utility and personalization quality. To address this challenge, We propose MemPrivacy, which identifies privacy-sensitive spans on edge devices, replaces them with semantically structured type-aware placeholders for cloud-side memory processing, and restores the original values locally when needed. By decoupling privacy protection from semantic destruction, MemPrivacy minimizes sensitive data exposure while retaining the information required for effective memory formation and retrieval. We also construct MemPrivacy-Bench for systematic evaluation, a dataset covering 200 users and over 52k privacy instances, and introduce a four-level privacy taxonomy for configurable protection policies. Experiments show that MemPrivacy achieves strong performance in privacy information extraction, substantially surpassing strong general-purpose models such as GPT-5.2 and Gemini-3.1-Pro, while also reducing inference latency. Across multiple widely used memory systems, MemPrivacy limits utility loss to within 1.6%, outperforming baseline masking strategies. Overall, MemPrivacy offers an effective balance between privacy protection and personalized memory utility for edge-cloud agents, enabling secure, practical, and user-transparent deployment.","upvotes":117,"discussionId":"6a028212b823258e76123316","githubRepo":"https://github.com/MemTensor/MemPrivacy","githubRepoAddedBy":"user","ai_summary":"MemPrivacy enables privacy-preserving personalized memory in edge-cloud environments by using type-aware placeholders to protect sensitive data while maintaining semantic integrity for effective memory operations.","ai_keywords":["personalized memory","edge-cloud environments","privacy protection","semantically structured placeholders","memory formation","memory retrieval","privacy information extraction","inference latency","utility loss","privacy taxonomy","memory systems"],"githubStars":38,"organization":{"_id":"684d4f8e0bb9b6d7621cd53b","name":"MemTensor","fullname":"MemTensor","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/62a155e615eeab266b2f2243/2mVH99TFqle9MJVb95aDC.jpeg"}},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"64e18e9ec20c27fcc8df384e","avatarUrl":"/avatars/64ef866b9fa385efcefb34ea76b76802.svg","isPro":false,"fullname":"Ding Chen","user":"Hush-cd","type":"user"},{"_id":"620783f24e28382272337ba4","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/620783f24e28382272337ba4/zkUveQPNiDfYjgGhuFErj.jpeg","isPro":false,"fullname":"GuoLiangTang","user":"Tommy930","type":"user"},{"_id":"62a155e615eeab266b2f2243","avatarUrl":"/avatars/e89ef156e73af028e3ce3664e6cb4e62.svg","isPro":false,"fullname":"Zhiyu Li","user":"jimi888","type":"user"},{"_id":"66599216be167970cd754ae7","avatarUrl":"/avatars/fe045fb632045ebbfb2b20f61818c5f2.svg","isPro":false,"fullname":"Zeyu Zhang","user":"llamafans","type":"user"},{"_id":"680e0194a2bada9a2513a4a9","avatarUrl":"/avatars/28179274e80ef574841b64362fa34a59.svg","isPro":false,"fullname":"Guo","user":"mian1615","type":"user"},{"_id":"6552fd8db2d47c6675cc82bd","avatarUrl":"/avatars/3991c52a2b0bddb2f1585f93915ee78f.svg","isPro":false,"fullname":"Junwei Jayden Liao (SII)","user":"jwliao-ai","type":"user"},{"_id":"64a27e5098fad0c8a5c236d4","avatarUrl":"/avatars/1f67bf3744786b5d3dc491968fe0c0d3.svg","isPro":false,"fullname":"Wenqiang Wei","user":"wwq38556399","type":"user"},{"_id":"655da268f828e5ad0f0a82ad","avatarUrl":"/avatars/4d0c6d4e015ea0c2a580463a9bc462b7.svg","isPro":false,"fullname":"Camille Proust","user":"bittergreen","type":"user"},{"_id":"646f63f4753be77a8e94f95d","avatarUrl":"/avatars/771b8a10354906ae9d4cf827a54405d6.svg","isPro":false,"fullname":"yangcongge","user":"Bronion","type":"user"},{"_id":"642a3d4375bcc24c5e59c968","avatarUrl":"/avatars/4171ea689efe666e59c95420cf468eb7.svg","isPro":false,"fullname":"chunyuli","user":"fridayl","type":"user"},{"_id":"64c3bb3f5d0ab485fbd83a6a","avatarUrl":"/avatars/fff01ab52d79308b59ceb50160be6446.svg","isPro":false,"fullname":"Daoji.Wang","user":"wy627665797","type":"user"},{"_id":"689b58556eb1ced69a125108","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/689b58556eb1ced69a125108/RhxQnNOXvhr5y8Yywr4I7.png","isPro":false,"fullname":"Jianan Yang","user":"Mathematics-Yang","type":"user"}],"acceptLanguages":["en"],"dailyPaperRank":1,"organization":{"_id":"684d4f8e0bb9b6d7621cd53b","name":"MemTensor","fullname":"MemTensor","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/62a155e615eeab266b2f2243/2mVH99TFqle9MJVb95aDC.jpeg"},"markdownContentUrl":"https://huggingface.co/buckets/huggingchat/papers-content/resolve/2605/2605.09530.md"}">
MemPrivacy: Privacy-Preserving Personalized Memory Management for Edge-Cloud Agents
Abstract
MemPrivacy enables privacy-preserving personalized memory in edge-cloud environments by using type-aware placeholders to protect sensitive data while maintaining semantic integrity for effective memory operations.
AI-generated summary
As LLM-powered agents are increasingly deployed in edge-cloud environments, personalized memory has become a key enabler of long-term adaptation and user-centric interaction. However, cloud-assisted memory management exposes sensitive user information, while existing privacy protection methods typically rely on aggressive masking that removes task-relevant semantics and consequently degrades memory utility and personalization quality. To address this challenge, We propose MemPrivacy, which identifies privacy-sensitive spans on edge devices, replaces them with semantically structured type-aware placeholders for cloud-side memory processing, and restores the original values locally when needed. By decoupling privacy protection from semantic destruction, MemPrivacy minimizes sensitive data exposure while retaining the information required for effective memory formation and retrieval. We also construct MemPrivacy-Bench for systematic evaluation, a dataset covering 200 users and over 52k privacy instances, and introduce a four-level privacy taxonomy for configurable protection policies. Experiments show that MemPrivacy achieves strong performance in privacy information extraction, substantially surpassing strong general-purpose models such as GPT-5.2 and Gemini-3.1-Pro, while also reducing inference latency. Across multiple widely used memory systems, MemPrivacy limits utility loss to within 1.6%, outperforming baseline masking strategies. Overall, MemPrivacy offers an effective balance between privacy protection and personalized memory utility for edge-cloud agents, enabling secure, practical, and user-transparent deployment.
Community
This comment has been hidden (marked as Abuse)
MemPrivacy: Privacy-Preserving Personalized Memory for Edge-Cloud Agents
Authors: Yining Chen, Jihao Zhao, Bo Tang, Haofen Wang, Yue Zhang, Fei Huang, Feiyu Xiong, Zhiyu Li
ArXiv: 2605.09530
GitHub: MemTensor/MemPrivacy
Hugging Face Models: IAAR-Shanghai/memprivacy
🧠 Motivation
As LLM-powered agents become widespread in edge-cloud settings, personalized memory is crucial for long-term adaptation and user-centric interaction. However, cloud-based memory risks exposing sensitive user information, while naive privacy solutions (like *** masking) destroy task semantics, harming memory utility and personalization.
Goal: Protect sensitive data without sacrificing semantic utility.
Why MemPrivacy?
Cloud agents typically send user messages to remote LLMs and store conversation traces in memory systems (e.g., Mem0, LangMem, Memobase) for long-term personalization. This creates a large privacy attack surface:
- plaintext prompts and logs may contain PII, medical/financial data, credentials
- cloud memory stores can leak via retrieval, prompt injection, inversion, or misconfiguration
- naïve mitigation (e.g.,
*** masking) destroys task semantics, harming retrieval and personalization
Goal: reduce privacy leakage without sacrificing utility.
Core Idea
MemPrivacy implements local reversible pseudonymization:
On-device privacy detection (local)
Detect privacy spans in user input and classify them by:
- privacy level (PL1–PL4)
- privacy type (e.g., Email, Real Name, Medical Health, Recovery Code)
Typed placeholder replacement (local → cloud)
Replace protected spans with semantically meaningful typed placeholders, e.g.:
160/110 (blood pressure) → <Health_Info_1>
recovery code RC-7291 → <Recovery_Code_1>
Local secure mapping (persistent across sessions)
Store the mapping placeholder ↔ original value in a local SQLite DB.
Cloud reasoning and memory operations (cloud)
The cloud agent/memory only sees placeholders—preserving semantic roles while hiding raw values.
Downlink restoration (local)
Restore placeholders in the cloud response back to the original values for a fluent user experience.
This yields architecture-level isolation: cloud components never see/store raw sensitive values.
Key Contributions & Advantages
1) Privacy–Utility Balance (vs. masking)
- Irreversible masking (
***) protects privacy but loses meaning and breaks memory retrieval.
- Untyped placeholders (
<Mask_1>) keep structure but lose semantic roles.
- MemPrivacy (typed placeholders) preserve the semantic role and hide raw values, minimizing utility loss.
2) Configurable Protection via a 4-Level Privacy Taxonomy
MemPrivacy introduces PL1–PL4 to support user-configurable policies:
| Level |
Meaning |
Examples |
Typical Default Policy |
| PL1 |
low sensitivity / preferences |
“I like sci-fi”, tone, generic habits |
can be kept for personalization |
| PL2 |
identifiable PII |
real name, phone, email, detailed address, account IDs |
disallowed by default in long-term memory |
| PL3 |
highly sensitive PII |
health records, financial records, precise location, religion/ethnicity |
not permitted in general memory |
| PL4 |
critical secrets (immediately exploitable) |
passwords, OTPs, recovery codes, API keys |
zero retention; must be blocked/redacted |
3) Benchmark & Evaluation for Memory Systems
This repo builds MemPrivacy-Bench and evaluates privacy protection strategies across real memory systems:
- MemPrivacy-Bench: 200 synthetic users, bilingual (Chinese/English), multi-turn dialogues with dense privacy exposure, plus memory QA tasks.
- Evaluations on MemPrivacy-Bench (in-distribution) and PersonaMem-v2 (out-of-distribution, annotated here).
4) Lightweight & Practical
The framework is designed for edge deployment:
- local detection + placeholder substitution + SQLite lookup are low-latency operations
- works as a drop-in privacy layer for existing cloud agents / memory systems
5) Open-Source MemPrivacy Models
We release a family of MemPrivacy models trained via Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) across different parameter sizes. You can access the full model collection here.
Evaluation Results
1. Privacy Extraction Performance
Key Takeaways:
- Superior Accuracy: MemPrivacy consistently outperforms 11 general LLMs and OpenAI-Privacy-Filter. The best model (MemPrivacy-4B-RL) achieves F1 scores of 85.97% and 94.48%, significantly surpassing the top general models (78.41% and 92.18%). Even our smallest 0.6B model beats most general models.
- Robustness on Complex Data: While lightweight filters like OpenAI-Privacy-Filter are fast, they struggle with implicit and linguistically diverse privacy expressions (only 35.50% F1 on MemPrivacy-Bench). MemPrivacy accurately handles fine-grained, heterogeneous conversational scenarios.
- High Efficiency: Despite its accuracy, MemPrivacy remains highly efficient. Processing latency per message is consistently below one second on PersonaMem-v2, making it well-suited for seamless on-device deployment without noticeable delays.
2. Memory System Performance under Different Protection Methods
Key Takeaways:
- Optimal Privacy-Utility Trade-off: Compared to traditional masking (
***) or untyped placeholders (<Mask_1>), MemPrivacy preserves the utility of downstream systems (LangMem, Mem0, Memobase) significantly better by retaining critical semantic roles.
- Minimal Degradation: When applying stringent protection (PL2–PL4), system accuracy drops by merely 0.71%–1.60%. If protecting only critical secrets (PL4), the drop is below 0.89%.
- Extractor Dependency: The effectiveness of the entire framework heavily depends on accurate privacy extraction. Replacing the MemPrivacy model with general LLMs (e.g., DeepSeek-V3.2-Think, GPT-5.2) causes substantial accuracy degradation, validating the necessity of our specialized fine-tuning.
🔗 Links
This comment has been hidden (marked as Abuse) Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
Tap or paste here to upload images
Cite arxiv.org/abs/2605.09530 in a dataset README.md to link it from this page.
Cite arxiv.org/abs/2605.09530 in a Space README.md to link it from this page.
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.