Skip to content

Add time series signals and configurable shadow model sampling[working]#368

Open
fazelehh wants to merge 1 commit intomainfrom
pr-c-core-module-changes
Open

Add time series signals and configurable shadow model sampling[working]#368
fazelehh wants to merge 1 commit intomainfrom
pr-c-core-module-changes

Conversation

@fazelehh
Copy link
Collaborator

@fazelehh fazelehh commented Feb 2, 2026

Summary

  • Add DTW and MSM time series signal classes to signal.py with optional sktime dependency
  • Add Move-Split-Merge distance utility (msm.py) for multivariate time series
  • Add configurable sampling_method parameter to shadow model training ("balanced" or "random")
  • Add sample_shadow_indices() method to AbstractInputHandler for custom sampling strategies
  • Fix dataset params propagation in mia_handler.py using population.return_params()
  • Add sampling_method field to ShadowModelConfig schema

Files Changed

  • leakpro/signals/signal.py - Added DTW, MSM signals
  • leakpro/signals/utils/msm.py - New MSM distance utility
  • leakpro/attacks/utils/shadow_model_handler.py - Configurable sampling_method
  • leakpro/input_handler/abstract_input_handler.py - sample_shadow_indices method
  • leakpro/input_handler/mia_handler.py - Dataset params fix
  • leakpro/schemas.py - sampling_method field

Test plan

  • Verify existing MIA attacks still work with default "balanced" sampling
  • Test "random" sampling method
  • Test DTW and MSM signals with time series data

- Add DTW and MSM signal classes for time series distance metrics
- Add msm.py utility for Move-Split-Merge distance calculation
- Add sample_shadow_indices() to AbstractInputHandler for custom sampling
- Add configurable sampling_method ('balanced'/'random') to shadow models
- Fix dataset params propagation using population.return_params()
- Add optimizer param filtering to prevent invalid argument errors
@fazelehh fazelehh changed the title Add time series signals and configurable shadow model sampling Add time series signals and configurable shadow model sampling[working] Feb 3, 2026
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