Skip to content

Commit 71c4a5b

Browse files
authored
Merge branch 'dev_1.7.0' into dev_1.7.0
2 parents a480e17 + eee356f commit 71c4a5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3687
-233
lines changed

.github/workflows/ci-deepspeech-v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
- name: Run Test Action
3030
uses: ./.github/actions/deepspeech-v2
3131
- name: Upload coverage to Codecov
32-
uses: codecov/[email protected].0
32+
uses: codecov/[email protected].2

.github/workflows/ci-lingvo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ jobs:
6060
- name: Run ${{ matrix.name }} Tests
6161
run: ./run_tests.sh ${{ matrix.framework }}
6262
- name: Upload coverage to Codecov
63-
uses: codecov/[email protected].0
63+
uses: codecov/[email protected].2

.github/workflows/ci-mxnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ jobs:
8686
- name: Run ${{ matrix.name }} Tests
8787
run: ./run_tests.sh ${{ matrix.framework }}
8888
- name: Upload coverage to Codecov
89-
uses: codecov/[email protected].0
89+
uses: codecov/[email protected].2

.github/workflows/ci-pytorch-fasterrcnn.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
- name: Run Test Action
4747
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_pytorch_faster_rcnn.py --framework=pytorch --skip_travis=True --durations=0
4848
- name: Upload coverage to Codecov
49-
uses: codecov/[email protected].0
49+
uses: codecov/[email protected].2

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ jobs:
133133
- name: Run Tests
134134
run: ./run_tests.sh ${{ matrix.framework }}
135135
- name: Upload coverage to Codecov
136-
uses: codecov/[email protected].0
136+
uses: codecov/[email protected].2

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - Person <email address>
66

77
- International Business Machines Corporation (IBM)
8-
- Two Six Labs, LLC
8+
- Two Six Technologies
99
- Kyushu University
1010
- Intel Corporation
1111
- University of Chicago

README-cn.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,21 @@
2626
(图像,表格,音频,视频等)和机器学习任务(分类,物体检测,语音识别,
2727
生成模型,认证等)。
2828

29+
## Adversarial Threats
30+
2931
<p align="center">
3032
<img src="docs/images/adversarial_threats_attacker.png?raw=true" width="400" title="ART logo">
3133
<img src="docs/images/adversarial_threats_art.png?raw=true" width="400" title="ART logo">
3234
</p>
3335
<br />
3436

37+
## ART for Red and Blue Teams (selection)
38+
39+
<p align="center">
40+
<img src="docs/images/white_hat_blue_red.png?raw=true" width="800" title="ART Red and Blue Teams">
41+
</p>
42+
<br />
43+
3544
## 学到更多
3645

3746
| **[开始使用][get-started]** | **[文献资料][documentation]** | **[贡献][contributing]** |

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@ adversarial threats of Evasion, Poisoning, Extraction, and Inference. ART suppor
2727
(images, tables, audio, video, etc.) and machine learning tasks (classification, object detection, speech recognition,
2828
generation, certification, etc.).
2929

30+
## Adversarial Threats
31+
3032
<p align="center">
3133
<img src="docs/images/adversarial_threats_attacker.png?raw=true" width="400" title="ART logo">
3234
<img src="docs/images/adversarial_threats_art.png?raw=true" width="400" title="ART logo">
3335
</p>
3436
<br />
3537

38+
## ART for Red and Blue Teams (selection)
39+
40+
<p align="center">
41+
<img src="docs/images/white_hat_blue_red.png?raw=true" width="800" title="ART Red and Blue Teams">
42+
</p>
43+
<br />
44+
3645
## Learn more
3746

3847
| **[Get Started][get-started]** | **[Documentation][documentation]** | **[Contributing][contributing]** |

art/attacks/attack.py

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,12 @@ def __init__(self, estimator):
329329
@abc.abstractmethod
330330
def infer(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> np.ndarray:
331331
"""
332-
Infer sensitive properties (attributes, membership training records) from the targeted estimator. This method
332+
Infer sensitive attributes from the targeted estimator. This method
333333
should be overridden by all concrete inference attack implementations.
334334
335335
:param x: An array with reference inputs to be used in the attack.
336336
:param y: Labels for `x`. This parameter is only used by some of the attacks.
337-
:return: An array holding the inferred properties.
337+
:return: An array holding the inferred attribute values.
338338
"""
339339
raise NotImplementedError
340340

@@ -358,12 +358,41 @@ def __init__(self, estimator, attack_feature: Union[int, slice] = 0):
358358
@abc.abstractmethod
359359
def infer(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> np.ndarray:
360360
"""
361-
Infer sensitive properties (attributes, membership training records) from the targeted estimator. This method
361+
Infer sensitive attributes from the targeted estimator. This method
362362
should be overridden by all concrete inference attack implementations.
363363
364364
:param x: An array with reference inputs to be used in the attack.
365365
:param y: Labels for `x`. This parameter is only used by some of the attacks.
366-
:return: An array holding the inferred properties.
366+
:return: An array holding the inferred attribute values.
367+
"""
368+
raise NotImplementedError
369+
370+
371+
class MembershipInferenceAttack(InferenceAttack):
372+
"""
373+
Abstract base class for membership inference attack classes.
374+
"""
375+
376+
def __init__(self, estimator: Union["CLASSIFIER_TYPE"]):
377+
"""
378+
:param estimator: A trained estimator targeted for inference attack.
379+
:type estimator: :class:`.art.estimators.estimator.BaseEstimator`
380+
:param attack_feature: The index of the feature to be attacked.
381+
"""
382+
super().__init__(estimator)
383+
384+
@abc.abstractmethod
385+
def infer(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> np.ndarray:
386+
"""
387+
Infer membership status of samples from the target estimator. This method
388+
should be overridden by all concrete inference attack implementations.
389+
390+
:param x: An array with reference inputs to be used in the attack.
391+
:param y: Labels for `x`. This parameter is only used by some of the attacks.
392+
:param probabilities: a boolean indicating whether to return the predicted probabilities per class, or just
393+
the predicted class.
394+
:return: An array holding the inferred membership status (1 indicates member of training set,
395+
0 indicates non-member) or class probabilities.
367396
"""
368397
raise NotImplementedError
369398

art/attacks/evasion/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
from art.attacks.evasion.elastic_net import ElasticNet
1919
from art.attacks.evasion.fast_gradient import FastGradientMethod
2020
from art.attacks.evasion.frame_saliency import FrameSaliencyAttack
21-
from art.attacks.evasion.feature_adversaries import FeatureAdversaries
21+
from art.attacks.evasion.feature_adversaries.feature_adversaries_numpy import FeatureAdversariesNumpy
22+
from art.attacks.evasion.feature_adversaries.feature_adversaries_pytorch import FeatureAdversariesPyTorch
23+
from art.attacks.evasion.feature_adversaries.feature_adversaries_tensorflow import FeatureAdversariesTensorFlowV2
24+
from art.attacks.evasion.geometric_decision_based_attack import GeoDA
2225
from art.attacks.evasion.hclu import HighConfidenceLowUncertainty
2326
from art.attacks.evasion.hop_skip_jump import HopSkipJump
2427
from art.attacks.evasion.imperceptible_asr.imperceptible_asr import ImperceptibleASR

0 commit comments

Comments
 (0)