Merged
Conversation
Resolve conflict in attack_factory_mia.py by keeping all attacks: - base, ramia, multi_signal_lira (from main) - dts (from this PR) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
henrikfo
approved these changes
Jan 27, 2026
Collaborator
henrikfo
left a comment
There was a problem hiding this comment.
- There are no tests. However, the code looks good, and there are no apparent issues with it. Can we add an Issue of missing tests to keep track of that, then implement them at a later stage?
- No random seeds, for instance data_indices = np.random.choice(..), or train_test_split(...) in dts.py, which will make reproducability harder.
- Might be appropriate with a warining when users sets a too-low "clf_data_fraction". I think users will understand this without the warning but it might be a good add as a failsafe for runtime, when we are trying to mature the tool. A simple
# After creating MIC dataset if len(self.mic_data) < 10: logger.warning(f"MIC dataset only has {len(self.mic_data)} samples...")
Similar to the first bullet, the later ones can be implemented and fixed at a later stage if we just keep track of them with an issue. Anyhow, the code looks great. If you have tested it on your end and it works, I'm approving the PR.
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.
Summary
This PR incorporates the Deep Time Series (DTS) attack from PR #330 by @ZyzzGit, with:
Original PR Description
Adds the Deep Time Series (DTS) attack implementation, leveraging deep learning (instead of signal analysis) for attacking time series models. N.B. only supports the time series modality. The update includes:
New Files
leakpro/attacks/mia_attacks/dts.py- Main DTS attack implementation (275 lines)leakpro/attacks/utils/dts_mia_classifier/mi_classifier.py- MIC model API (158 lines)leakpro/attacks/utils/dts_mia_classifier/models/inception_time.py- InceptionTime model (136 lines)leakpro/attacks/utils/dts_mia_classifier/models/lstm_classifier.py- LSTM classifier (31 lines)Modified Files
leakpro/attacks/mia_attacks/attack_factory_mia.py- Register"dts": AttackDTSTest plan
Closes #330
🤖 Generated with Claude Code