Skip to content

Replace prv-accountant with Opacus built-in PRV accountant #391

@andreatgretel

Description

@andreatgretel

Priority Level

Medium (Nice to have)

Is your feature request related to a problem?

The prv-accountant PyPI package (v0.2.0, Aug 2022) is effectively unmaintained - no release in 4 years. Its internal domain-size computation can overflow or hang for small noise multipliers (high epsilon), which #351 works around with a SIGALRM timeout and RDP fallback. Relying on an abandoned dependency for privacy accounting is a maintenance risk.

Describe the solution you'd like

Migrate from prv-accountant to Opacus's built-in PRV accountant (opacus.accountants.prv). Opacus ships a separate PRV implementation based on the same paper, and its compute_safe_domain_size uses Opacus's own RDP internally - which may avoid the hang since Opacus RDP handles high epsilon fine. This would also drop the prv-accountant dependency entirely.

Describe alternatives you've considered

  • Keep the current approach from fix(dp): fall back to RDP accountant when PRV overflows or hangs #351 (SIGALRM timeout + RDP fallback). Works, but leaves the unmaintained dependency in place and means RDP's looser bounds are used silently when PRV fails.
  • Vendor/fork prv-accountant and fix the overflow. Higher maintenance burden than switching to Opacus's actively maintained implementation.

Additional context

Discussion: #351 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions