Skip to content

Add DP-SAPF saliency-aware LoRA layer selection example.#290

Open
SunnierLee wants to merge 1 commit into
google-deepmind:mainfrom
SunnierLee:add-dpsapf-example
Open

Add DP-SAPF saliency-aware LoRA layer selection example.#290
SunnierLee wants to merge 1 commit into
google-deepmind:mainfrom
SunnierLee:add-dpsapf-example

Conversation

@SunnierLee

@SunnierLee SunnierLee commented Jun 24, 2026

Copy link
Copy Markdown

Implements the example notebook + helper module discussed in #289.

Files added (no changes to jax_privacy/ core)

  • examples/dp_sgd_keras_gemma3_dpsapf.ipynb
  • examples/dpsapf_utils.py
  • docs/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

  • CLA signed (sunameizing@gmail.com)
  • No changes to core library; examples/ and docs/ only
  • Notebook outputs stripped
  • License header uses The Authors, not DeepMind Technologies Limited
  • Tested on current main (b9f744b)

@SunnierLee SunnierLee force-pushed the add-dpsapf-example branch 5 times, most recently from 05af045 to e18f0f2 Compare June 24, 2026 10:46
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
@SunnierLee SunnierLee force-pushed the add-dpsapf-example branch from e18f0f2 to 203c8ad Compare June 30, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant