flip.nvflare.components.custom_percentile_privacy
Classes
Implementation of "largest percentile to share" privacy preserving policy. |
Module Contents
- class flip.nvflare.components.custom_percentile_privacy.PercentilePrivacy(percentile=10, gamma=0.01, data_kinds: List[str] | None = None, off: bool = False)[source]
Bases:
nvflare.apis.dxo_filter.DXOFilterImplementation of “largest percentile to share” privacy preserving policy.
Shokri and Shmatikov, Privacy-preserving deep learning, CCS ‘15
- Parameters:
percentile (int, optional) – Only abs diff greater than this percentile is updated. Allowed range 0..100. Defaults to 10.
gamma (float, optional) – The upper limit to truncate abs values of weight diff. Defaults to 0.01.
0. (Any weight diff with abs<gamma will become)
data_kinds – kinds of DXO to filter
off (bool, optional) – If True, the filter is turned off. Defaults to False.
- process_dxo(dxo: nvflare.apis.dxo.DXO, shareable: nvflare.apis.shareable.Shareable, fl_ctx: nvflare.apis.fl_context.FLContext) None | nvflare.apis.dxo.DXO[source]
Compute the percentile on the abs delta_W.
Only share the params where absolute delta_W greater than the percentile value
- Parameters:
dxo – information from client
shareable – that the dxo belongs to
fl_ctx – context provided by workflow
Returns: filtered dxo