Add DP-SAPF saliency-aware LoRA layer selection example.#290
Open
SunnierLee wants to merge 1 commit into
Open
Conversation
05af045 to
e18f0f2
Compare
Adds an example notebook + utility module demonstrating DP-SAPF (arXiv:2605.30312, USENIX Security 2026) applied to LLM fine-tuning with Gemma3. A Renyi-DP-composed top-k voting probe ranks LoRA candidates by per-sample gradient saliency; only the top-k% layers are adapted under DP-SGD. The composed (probe + training) privacy cost matches a single target (eps, delta) via RDP accounting. - examples/dp_sgd_keras_gemma3_dpsapf.ipynb - examples/dpsapf_utils.py
e18f0f2 to
203c8ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the example notebook + helper module discussed in #289.
Files added (no changes to
jax_privacy/core)examples/dp_sgd_keras_gemma3_dpsapf.ipynbexamples/dpsapf_utils.pydocs/index.rst (register the notebook in the Examples toctree)What it shows
A DP top-k voting probe ranks LoRA-eligible layers by per-sample gradient saliency. The notebook fine-tunes Gemma3 with LoRA only on the top-k% layers; on CNN/DailyMail and XSum at ε=4, top-5% selection beats
keras_hub's default (query+value) on all ROUGE metrics under the same (ε, δ) budget.Checklist
examples/anddocs/onlyThe Authors, notDeepMind Technologies Limitedmain(b9f744b)