This is the companion repository for our paper titled "Smooth Perturbations for Time Series Adversarial Attacks". This paper has been accepted on PAKDD22 (May 16-19, 2022).
All our experiments were performed on the widely used time series classification benchmark UCR/UEA archive. We used the latest version (2018) which contains 128 datasets. The UCR archive is necessary to run the code.
All experiments were performed using the time series classifier InceptionTime from the paper InceptionTime: Finding AlexNet for Time Series Classification. The companion Github repository is located here. InceptionTime's weight are necessary to run the code.
The code runs using Python 3.7. You will need to install the packages present in the requirements.txt file.
pip install -r requirements.txt
The code is divided as follows:
-
The main.py python file contains the necessary code to run the experiments.
-
The utils folder contains the necessary functions to read the datasets and visualize the plots.
-
The attacks folder contains the implementation of the adversarial attack used.
-
The classifier.py file contains InceptionTime implementation.
You should consider changing the root_dir variable. This variable specifies the folder where the UEA/UCR archive and all the weights of InceptionTime are located. Both are necesary to run the code.
To simply run all the experiments, you can type:
python3 main.py run_all
It will first performs adversarial attacks for BIM, GM with and without noise cliping, and SGM over all the UCR archive. Then it will produce all the pairwise plots in order to compare the methods according to the ASR and L2 norm. These plots are shown in the paper. Finally, it will perform an adversarial attack for SGM.
Be careful, the computations can take more than a week on a single GTX 1080 Ti.
This files presents the adversarial attacks for all the datasets of the UCR archive. For each method, we recorded the execution time in seconds, the ASR, the number of succesfully perturbed samples and the average L2 norm of the dataset.
Duration (seconds) | ASR | # Samples perturbed | Average L2 norm | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BIM | GM | GM-wo-clip | SGM-wo-clip | BIM | GM | GM-wo-clip | SGM-wo-clip | BIM | GM | GM-wo-clip | SGM-wo-clip | BIM | GM | GM-wo-clip | SGM-wo-clip | |
ACSF1 | 284,726224899292 | 259,383599042892 | 250,680391788483 | 239,084174394608 | 0,58 | 0,38 | 0,38 | 0,2 | 58 | 38 | 38 | 20 | 3,01644642575213 | 1,5800983083033 | 1,75960747422706 | 0,746868705880894 |
Adiac | 251,994608163834 | 190,6036632061 | 187,342823505402 | 220,374300956726 | 0,879795396419437 | 0,836317135549872 | 0,854219948849105 | 0,849104859335038 | 344 | 327 | 334 | 332 | 0,729881868425424 | 0,53292910831207 | 0,588279175630833 | 0,577910805713805 |
AllGestureWiimoteX | 705,967068195343 | 570,106570482254 | 611,768842458725 | 602,636587381363 | 0,0742857142857143 | 0,0271428571428571 | 0,07 | 0,0185714285714286 | 52 | 19 | 49 | 13 | 1,79780086984287 | 1,11541013968371 | 1,90029412161169 | 1,66265151723063 |
AllGestureWiimoteY | 695,129547119141 | 561,853433609009 | 598,475128412247 | 589,277519464493 | 0,16 | 0,07 | 0,134285714285714 | 0,0628571428571428 | 112 | 49 | 94 | 44 | 1,83937568226594 | 1,18360002668198 | 1,89474795760064 | 1,66940596745689 |
AllGestureWiimoteZ | 697,143391847611 | 562,014775753021 | 599,845276594162 | 589,683598041534 | 0,241428571428571 | 0,115714285714286 | 0,242857142857143 | 0,168571428571429 | 169 | 81 | 170 | 118 | 1,93324385048995 | 1,12905563643015 | 1,84342821105547 | 1,59586469976894 |
ArrowHead | 148,15026307106 | 118,305222511292 | 119,132261037827 | 124,549461126328 | 0,954285714285714 | 0,885714285714286 | 0,954285714285714 | 0,88 | 167 | 155 | 167 | 154 | 0,932673065326619 | 0,668091014950923 | 0,704240438368119 | 0,701016304844035 |
BME | 129,736853599548 | 113,237291812897 | 108,596731424332 | 129,881789684296 | 0,0333333333333333 | 0,0333333333333333 | 0,693333333333333 | 0,446666666666667 | 5 | 5 | 104 | 67 | 1,08901747235136 | 0,984496777676734 | 1,90656008050269 | 1,9455196086658 |
Beef | 68,8423388004303 | 54,1351509094238 | 49,5499436855316 | 55,9602241516113 | 0,866666666666667 | 0,766666666666667 | 0,733333333333333 | 0,566666666666667 | 26 | 23 | 22 | 17 | 1,38316154699975 | 0,663146238052697 | 0,743418888818777 | 0,858116537148753 |
BeetleFly | 62,2155921459198 | 54,0227372646332 | 48,7805495262146 | 56,7291057109833 | 0,55 | 0,1 | 0,25 | 0 | 11 | 2 | 5 | 0 | 1,69998059863941 | 1,2518599953887 | 1,48150575661611 | 1,48681629240267 |
BirdChicken | 44,717990398407 | 42,6750915050507 | 38,8356082439423 | 44,469272851944 | 1 | 0,85 | 1 | 0,95 | 20 | 17 | 20 | 19 | 0,885547765659749 | 0,639915036433556 | 0,62545722773905 | 0,728415865325331 |
CBF | 405,358385324478 | 358,502407550812 | 330,966987371445 | 380,099367141724 | 0,0188888888888888 | 0,0133333333333333 | 0,488888888888889 | 0,0222222222222223 | 17 | 12 | 440 | 20 | 1,09757085067273 | 0,98193420913159 | 2,42842228050904 | 2,77519410934409 |
Car | 91,8741052150726 | 73,3134772777557 | 73,8365125656128 | 83,1964323520661 | 1 | 1 | 0,966666666666667 | 0,883333333333333 | 60 | 60 | 58 | 53 | 1,09901413786071 | 0,720520552959231 | 0,742419130617965 | 0,812107279098439 |
Chinatown | 193,014804840088 | 192,235889673233 | 177,762791872025 | 204,671388864517 | 0,411078717201166 | 0,411078717201166 | 0,994169096209913 | 0,994169096209913 | 141 | 141 | 341 | 341 | 0,422930333254333 | 0,40310028575946 | 0,457057244048466 | 0,473752456423164 |
ChlorineConcentration | 2025,2163734436 | 1615,88358974457 | 1492,74789428711 | 1706,31480097771 | 0,9671875 | 0,970052083333333 | 0,981510416666667 | 0,978125 | 3714 | 3725 | 3769 | 3756 | 0,260644012969676 | 0,179079970879935 | 0,182355848276019 | 0,211190372160089 |
CinCECGTorso | 4129,39370965958 | 3355,3123934269 | 3352,92757296562 | 3464,64744520187 | 0,965217391304348 | 0,964492753623188 | 0,96304347826087 | 0,568840579710145 | 1332 | 1331 | 1329 | 785 | 0,960925706603712 | 0,52556804726365 | 0,515899386993609 | 0,489341614254863 |
Coffee | 55,8718738555908 | 53,8507649898529 | 46,9863705635071 | 54,8644163608551 | 1 | 1 | 1 | 1 | 28 | 28 | 28 | 28 | 0,646559608215747 | 0,459580630473048 | 0,460129706663553 | 0,498897103534155 |
Computers | 395,173809766769 | 308,643865346909 | 305,441889286041 | 321,689844846725 | 908 | 908 | 924 | 728 | 227 | 227 | 231 | 182 | 0,694146438424808 | 0,506255061859076 | 0,520262936964589 | 0,585604279326217 |
CricketX | 317,63668513298 | 242,096783399582 | 234,598888635635 | 255,799316883087 | 0,123076923076923 | 0,0846153846153847 | 0,17948717948718 | 0,0846153846153847 | 48 | 33 | 70 | 33 | 1,5766832958849 | 1,24809896227697 | 2,21049566109956 | 1,90145798246319 |
CricketY | 285,142260551453 | 220,489032268524 | 213,127371549606 | 236,367571353912 | 0,135897435897436 | 0,11025641025641 | 0,266666666666667 | 0,133333333333333 | 53 | 43 | 104 | 52 | 1,64598827791433 | 1,33524239184837 | 2,17431500445928 | 1,87270789374804 |
CricketZ | 284,549852609634 | 220,619388580322 | 212,975075960159 | 235,618731498718 | 0,0794871794871796 | 0,0641025641025641 | 0,174358974358974 | 0,11025641025641 | 31 | 25 | 68 | 43 | 1,61960026368129 | 1,27693543278071 | 2,4013003790694 | 2,07108511966874 |
Crop | 6607,38280487061 | 6804,75160431862 | 5985,32898139954 | 7049,48293590546 | 0,192916666666667 | 0,168035714285714 | 0,35422619047619 | 0,312678571428571 | 3241 | 2823 | 5951 | 5253 | 0,249587320039207 | 0,2468179774222 | 0,55622845845552 | 0,488366993349833 |
DiatomSizeReduction | 302,159450531006 | 253,146081447601 | 234,87357211113 | 2297,21081638336 | 0,954248366013072 | 0,84640522875817 | 0,983660130718954 | 0,88562091503268 | 292 | 259 | 301 | 271 | 1,50602557941303 | 1,01705642130869 | 1,02982179188824 | 1,04556414431646 |
DistalPhalanxOutlineAgeGroup | 116,747921228409 | 111,90199136734 | 97,006915807724 | 110,817744493485 | 0,935251798561151 | 0,935251798561151 | 0,949640287769784 | 0,949640287769784 | 130 | 130 | 132 | 132 | 0,237039805929213 | 0,184390353627073 | 0,183609339980477 | 0,1985337753642 |
DistalPhalanxOutlineCorrect | 141,445932626724 | 139,096778154373 | 122,041847229004 | 138,935978889465 | 0,855072463768116 | 0,855072463768116 | 0,858695652173913 | 0,855072463768116 | 236 | 236 | 237 | 236 | 0,0986878002469889 | 0,0718135600177208 | 0,0723217878344706 | 0,0779879535726924 |
DistalPhalanxTW | 87,3984756469727 | 84,7894079685211 | 74,2102661132813 | 83,2298219203949 | 0,971223021582734 | 0,985611510791367 | 1 | 1 | 135 | 137 | 139 | 139 | 0,543370170383667 | 0,433796717193542 | 0,433868234489004 | 0,422811647866321 |
DodgerLoopDay | 76,7161645889282 | 60,2037920951843 | 57,717102766037 | 64,0389869213104 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0,000000413528048991012 | 1,69705630013582 | 16953,5921857287 | |
DodgerLoopGame | 141,952054023743 | 119,208179712296 | 112,373127222061 | 117,911987543106 | 0,934782608695652 | 0,884057971014493 | 0,992753623188406 | 0,0434782608695652 | 129 | 122 | 137 | 6 | 0,939476225237557 | 0,684023086987878 | 0,672499533151708 | 0,802831756514165 |
DodgerLoopWeekend | 118,081045866013 | 96,9547860622406 | 91,096620798111 | 98,0150015354156 | 0,27536231884058 | 0,181159420289855 | 0,891304347826087 | 0,0144927536231884 | 38 | 25 | 123 | 2 | 1,53988017006912 | 1,24011161457484 | 1,5507647101006 | 1,88897104303702 |
ECG200 | 61,2902293205261 | 56,698353767395 | 51,5561871528626 | 55,2219929695129 | 0,46 | 0,44 | 0,97 | 0,97 | 46 | 44 | 97 | 97 | 0,710139009129281 | 0,64660934771234 | 0,778241488216898 | 0,848653816546795 |
ECG5000 | 2122,63024806976 | 1793,61990308762 | 1618,3946480751 | 13721,4940574169 | 0,113777777777778 | 0,102888888888889 | 0,300444444444444 | 0,222888888888889 | 512 | 463 | 1352 | 1003 | 0,833541182629037 | 0,703554360237071 | 1,65596006056754 | 1,52782742847319 |
ECGFiveDays | 447,207159042358 | 394,072671175003 | 348,706417322159 | 396,499273300171 | 0,0150987224157956 | 0,00464576074332168 | 0,994192799070848 | 0,981416957026713 | 13 | 4 | 856 | 845 | 1,11757747880796 | 1,01768430951646 | 1,57221463864785 | 1,63274423269119 |
EOGHorizontalSignal | 872,643359899521 | 704,543739318848 | 703,008269786835 | 731,633019924164 | 0,477900552486188 | 0,328729281767956 | 0,38121546961326 | 0,306629834254144 | 173 | 119 | 138 | 111 | 2,47154878782356 | 1,40263663438252 | 1,60755392596449 | 1,50244207347069 |
EOGVerticalSignal | 850,960215568542 | 684,061724424362 | 680,941100120544 | 708,742174625397 | 0,751381215469613 | 0,43646408839779 | 0,466850828729282 | 0,342541436464088 | 272 | 158 | 169 | 124 | 2,43820909147348 | 1,22944787268887 | 1,33513545105768 | 1,22536399837008 |
Earthquakes | 185,269582748413 | 150,184265613556 | 147,245531320572 | 147,744363069534 | 0,776978417266187 | 0,561151079136691 | 0,97841726618705 | 0 | 108 | 78 | 136 | 0 | 1,5936929874244 | 1,11964888393464 | 1,19592896326387 | 1,37884668320842 |
ElectricDevices | 3162,51220965385 | 3120,47955560684 | 2786,79269003868 | 3220,34281110764 | 0,328880819608352 | 0,291012838801712 | 0,400077810919466 | 0,375178316690442 | 2536 | 2244 | 3085 | 2893 | 0,303881662454776 | 0,276400145120569 | 0,365852279128329 | 0,349171260691944 |
EthanolLevel | 1603,28350234032 | 1304,27327013016 | 1300,10028028488 | 1344,33646154404 | 744 | 974 | 974 | 976 | 372 | 487 | 487 | 488 | 0,325844984312956 | 0,0882081178060971 | 0,0895616904163829 | 0,0893839478552225 |
FaceAll | 802,156518936157 | 661,109110116959 | 629,677981615067 | 736,764280557633 | 0,0325443786982249 | 0,0289940828402366 | 0,161538461538462 | 0,122485207100592 | 55 | 49 | 273 | 207 | 1,02276427247281 | 0,843687416674712 | 1,76066335245098 | 1,56420084986072 |
FaceFour | 85,9133622646332 | 67,6862142086029 | 66,3918433189392 | 68,7933642864227 | 0,102272727272727 | 0,0113636363636364 | 0,0454545454545454 | 0 | 9 | 1 | 4 | 0 | 1,77692632365695 | 1,39384260631501 | 1,97573653179484 | 1,95910046425563 |
FacesUCR | 968,448884010315 | 794,826113462448 | 759,464550733566 | 872,003445863724 | 0,0204878048780488 | 0,0146341463414634 | 0,0463414634146342 | 0,0351219512195122 | 42 | 30 | 95 | 72 | 1,12501395122089 | 1,02150891302694 | 2,310817385753 | 2,14801842854237 |
FiftyWords | 345,334555864334 | 285,850762844086 | 262,444806814194 | 277,709844112396 | 0,101098901098901 | 0,0747252747252747 | 0,173626373626374 | 0,147252747252747 | 46 | 34 | 79 | 67 | 1,61197233291981 | 1,31629594264476 | 2,52629757571196 | 2,19158761278565 |
Fish | 198,635670423508 | 168,150197982788 | 158,497475624084 | 161,141660928726 | 0,982857142857143 | 0,92 | 0,965714285714286 | 0,908571428571429 | 172 | 161 | 169 | 159 | 1,15150631264372 | 0,770578597749334 | 0,772753478288295 | 0,801619179544395 |
FordA | 1363,68219518662 | 1634,03848695755 | 1085,35299897194 | 1108,99549460411 | 0,236363636363636 | 0,243939393939394 | 0,243939393939394 | 0,240151515151515 | 312 | 322 | 322 | 317 | 0,121159312377363 | 0,0966774267817532 | 0,0938169856361659 | 0,102848452106822 |
FordB | 851,807324886322 | 1037,9631152153 | 705,133702039719 | 698,772616386414 | 0,403703703703704 | 0,406172839506173 | 0,407407407407407 | 0,406172839506173 | 327 | 329 | 330 | 329 | 0,159613658549744 | 0,121680518282339 | 0,122547377523389 | 0,136181031244572 |
FreezerRegularTrain | 2071,41788029671 | 2349,49189853668 | 1588,07217359543 | 1736,24658894539 | 0,993684210526316 | 0,993684210526316 | 0,994035087719298 | 0,994035087719298 | 2832 | 2832 | 2833 | 2833 | 0,670892136094135 | 0,270980386798414 | 0,270437037552384 | 0,271872597113438 |
FreezerSmallTrain | 2056,23001599312 | 2565,21771192551 | 1539,99007177353 | 18679,9105026722 | 0,891929824561403 | 0,882105263157895 | 0,959298245614035 | 0,958947368421053 | 2542 | 2514 | 2734 | 2733 | 0,858734808336322 | 0,601184432324954 | 0,582150639741632 | 0,667693329758048 |
Fungi | 144,111491441727 | 117,176590919495 | 112,367925167084 | 119,050228357315 | 0,0483870967741935 | 0,0053763440860215 | 0,0483870967741935 | 0,0376344086021505 | 9 | 1 | 9 | 7 | 1,33817071001704 | 1,13463547054968 | 1,47502408194644 | 1,45835823952524 |
GestureMidAirD1 | 151,380989313126 | 130,570633411407 | 121,723662376404 | 133,233058214188 | 0,215384615384615 | 0,161538461538462 | 0,3 | 0,261538461538461 | 28 | 21 | 39 | 34 | 1,76901728796206 | 1,2107482345199 | 1,95741503821582 | 1,72909043860803 |
GestureMidAirD2 | 127,406190395355 | 105,127008914948 | 98,9430661201477 | 110,527794122696 | 0,446153846153846 | 0,376923076923077 | 0,392307692307692 | 0,361538461538462 | 58 | 49 | 51 | 47 | 1,71779501245321 | 1,12946798112557 | 1,56582648867997 | 1,31422057356321 |
GestureMidAirD3 | 127,437433481216 | 109,123348712921 | 128,627262353897 | 110,569994449615 | 0,392307692307692 | 0,315384615384615 | 0,461538461538462 | 0,338461538461538 | 51 | 41 | 60 | 44 | 1,72299855188957 | 1,21419660053164 | 1,71930258269495 | 1,43287959420656 |
GesturePebbleZ1 | 198,9758207798 | 187,247720241547 | 157,511552810669 | 163,839319467545 | 0,0348837209302325 | 0,0058139534883721 | 0,0523255813953488 | 0,0290697674418605 | 6 | 1 | 9 | 5 | 2,08812636246752 | 0,953257553578822 | 2,28278046505485 | 1,31084398988597 |
GesturePebbleZ2 | 174,507826328278 | 181,054528236389 | 140,634229660034 | 145,053711175919 | 0,069620253164557 | 0,0189873417721519 | 0,0632911392405063 | 0,0316455696202531 | 11 | 3 | 10 | 5 | 2,01896679407229 | 1,18068749897214 | 2,55880857942607 | 2,21380501033301 |
GunPoint | 123,070270299911 | 106,34920835495 | 104,882761955261 | 114,532555341721 | 0,713333333333333 | 0,706666666666667 | 1 | 0,973333333333333 | 107 | 106 | 150 | 146 | 0,883119479708157 | 0,742567533966086 | 0,77250590356796 | 0,810691909968547 |
GunPointAgeSpan | 208,75291800499 | 172,491594791412 | 170,952899217606 | 186,811783313751 | 0,70253164556962 | 0,69620253164557 | 1 | 1 | 222 | 220 | 316 | 316 | 0,803241966649646 | 0,597264451035811 | 0,636246159951149 | 0,65165489683398 |
GunPointMaleVersusFemale | 193,420205593109 | 157,255529642105 | 156,828224897385 | 171,154397964478 | 0,392405063291139 | 0,392405063291139 | 0,95253164556962 | 0,844936708860759 | 124 | 124 | 301 | 267 | 1,05488648123766 | 0,926088888258872 | 1,34671833418977 | 1,41349679991179 |
GunPointOldVersusYoung | 213,169456005096 | 175,625215053558 | 174,776266336441 | 184,309647321701 | 0,707936507936508 | 0,701587301587302 | 0,996825396825397 | 0,996825396825397 | 223 | 221 | 314 | 314 | 0,821167716449574 | 0,598838045657254 | 0,637896841931604 | 0,646787593413408 |
Ham | 159,412034034729 | 157,243277311325 | 140,246518611908 | 144,06427359581 | 0,971428571428571 | 0,971428571428571 | 0,99047619047619 | 0,980952380952381 | 102 | 102 | 104 | 103 | 0,73103302809439 | 0,531984345856628 | 0,526529843107937 | 0,593710128054454 |
HandOutlines | 2005,57124018669 | 2378,13374352455 | 1495,20274400711 | 1532,75960350037 | 0,448648648648649 | 0,708108108108108 | 0,710810810810811 | 0,718918918918919 | 166 | 262 | 263 | 266 | 0,14678544582802 | 0,0260918252902279 | 0,0263908600928572 | 0,0286095064130466 |
Haptics | 654,303024530411 | 825,197165966034 | 563,873891115189 | 583,106493473053 | 0,993506493506493 | 0,961038961038961 | 0,961038961038961 | 0,944805194805195 | 306 | 296 | 296 | 291 | 0,757053630120132 | 0,455445995116711 | 0,458693065826471 | 0,451535433283514 |
Herring | 84,6533432006836 | 85,9611392021179 | 72,46177983284 | 73,7292394638062 | 1 | 1 | 1 | 1 | 64 | 64 | 64 | 64 | 0,178991383059177 | 0,113927412943113 | 0,113818960798299 | 0,130577798033951 |
HouseTwenty | 503,007250547409 | 559,940159082413 | 373,766756772995 | 381,758521556854 | 0,680672268907563 | 0,588235294117647 | 0,630252100840336 | 0,042016806722689 | 81 | 70 | 75 | 5 | 1,89706605114497 | 1,16979069137659 | 1,57620350035338 | 0,959412745311388 |
InlineSkate | 1850,96051359177 | 2753,84158730507 | 1551,52062821388 | 1567,30630230904 | 0,994545454545454 | 0,996363636363636 | 0,996363636363636 | 0,945454545454545 | 547 | 548 | 548 | 520 | 0,451677133578977 | 0,192188021885404 | 0,193467960955795 | 0,234116647579579 |
InsectEPGRegularTrain | 319,077211380005 | 376,410155534744 | 276,533558368683 | 274,648768186569 | 0,839357429718875 | 0,690763052208835 | 0,931726907630522 | 0,261044176706827 | 209 | 172 | 232 | 65 | 1,74583831791681 | 1,2318413119024 | 1,23074813616985 | 1,49209003140351 |
InsectEPGSmallTrain | 299,790716409683 | 370,708271026611 | 253,457047462463 | 255,019307374954 | 0,738955823293173 | 0,598393574297189 | 0,759036144578313 | 0,192771084337349 | 184 | 149 | 189 | 48 | 1,75129971441604 | 1,16099595865049 | 1,27769031035505 | 1,27532175013824 |
InsectWingbeatSound | 1256,48708796501 | 1389,5494594574 | 1039,48514962196 | 1047,12521338463 | 0,47020202020202 | 0,347474747474747 | 0,502020202020202 | 0,390909090909091 | 931 | 688 | 994 | 774 | 1,45280445538413 | 1,08654188601133 | 1,43940372568951 | 1,37954131711556 |
ItalyPowerDemand | 460,422135353088 | 436,49231505394 | 486,718822479248 | 476,21629357338 | 0,192419825072886 | 0,190476190476191 | 1 | 0,987366375121477 | 198 | 196 | 1029 | 1016 | 0,4557317605953 | 0,433513437183725 | 0,69718700549611 | 0,713723280588186 |
LargeKitchenAppliances | 520,911195039749 | 659,405880451202 | 449,099191427231 | 445,06986117363 | 0,517333333333333 | 448 | 0,885333333333333 | 0,706666666666667 | 194 | 168 | 332 | 265 | 2,02951699605173 | 1,34802166710561 | 1,28389014546303 | 1,37788524981525 |
Lightning2 | 93,1549007892609 | 89,5733079910278 | 81,8774135112763 | 81,337769985199 | 0,80327868852459 | 0,80327868852459 | 0,983606557377049 | 0,39344262295082 | 49 | 49 | 60 | 24 | 1,34719824000491 | 0,940774723445903 | 0,909376190368482 | 1,08742882842686 |
Lightning7 | 72,6399397850036 | 63,0323004722595 | 63,3996984958649 | 61,8032219409943 | 0,10958904109589 | 0,0547945205479452 | 0,0684931506849316 | 0,0273972602739726 | 8 | 4 | 5 | 2 | 1,70799420465946 | 1,01375418487972 | 1,98281199991416 | 1,42599173456547 |
Mallat | 4194,05002593994 | 3967,17415452003 | 3497,25160384178 | 3498,91013216972 | 0,859701492537313 | 0,133901918976546 | 0,177398720682303 | 0,0464818763326226 | 2016 | 314 | 416 | 109 | 2,56990444142465 | 1,2072157823386 | 1,23667377856782 | 1,21494070484917 |
Meat | 77,8126263618469 | 65,8193604946136 | 66,56405210495 | 64,7901511192322 | 0,966666666666667 | 1 | 1 | 1 | 58 | 60 | 60 | 60 | 0,204134867070835 | 0,137876666043539 | 0,1360369378254 | 0,148774652615 |
MedicalImages | 359,837543010712 | 328,55922627449 | 357,77831530571 | 357,214513778687 | 0,318421052631579 | 325 | 0,597368421052631 | 0,453947368421053 | 242 | 247 | 454 | 345 | 0,937077607515059 | 0,854446356751531 | 1,3561992377414 | 1,30118076875214 |
MelbournePedestrian | 914,666887998581 | 940,40143942833 | 1026,28920483589 | 1020,06875014305 | 0,122591225912259 | 0,11480114801148 | 0,412464124641246 | 0,388273882738827 | 299 | 280 | 1006 | 947 | 0,192051871027266 | 0,191170315201317 | 0,417116550678246 | 0,389618162377263 |
MiddlePhalanxOutlineAgeGroup | 118,87066411972 | 107,618723392487 | 119,046547174454 | 97,5848677158356 | 0,961038961038961 | 0,967532467532468 | 0,967532467532468 | 0,961038961038961 | 148 | 149 | 149 | 148 | 0,0945747891396115 | 0,0752964637162508 | 0,0750923543960066 | 0,0800802923789708 |
MiddlePhalanxOutlineCorrect | 143,02922129631 | 128,5665538311 | 142,837989091873 | 141,110974550247 | 0,807560137457045 | 0,824742268041237 | 0,828178694158075 | 0,831615120274914 | 235 | 240 | 241 | 242 | 0,0443824907328993 | 0,0311046211280546 | 0,0313703898864954 | 0,034113653423915 |
MiddlePhalanxTW | 85,5184681415558 | 77,691516160965 | 87,5175526142121 | 86,2579081058502 | 1 | 1 | 1 | 1 | 154 | 154 | 154 | 154 | 0,395802500775275 | 0,289551164806308 | 0,293532080639845 | 0,277389566124003 |
MixedShapesRegularTrain | 4333,19322419167 | 3633,75709319115 | 3598,01306271553 | 3739,81277632713 | 0,931546391752577 | 0,854020618556701 | 0,894020618556701 | 0,636288659793814 | 2259 | 2071 | 2168 | 1543 | 1,79038576722569 | 1,1552942526394 | 1,16828281411704 | 1,1770353770445 |
MixedShapesSmallTrain | 4292,98877239227 | 3621,60642790794 | 3586,33683872223 | 3713,03815698624 | 0,930721649484536 | 0,672164948453608 | 0,69319587628866 | 0,247835051546392 | 2257 | 1630 | 1681 | 601 | 1,7428572569709 | 0,867688759984397 | 0,884682934791874 | 0,921722912041914 |
MoteStrain | 534,546344280243 | 512,559992074966 | 2504,99770879746 | 582,362393379211 | 0,202076677316294 | 0,144568690095847 | 0,861022364217252 | 0,475239616613419 | 253 | 181 | 1078 | 595 | 0,829878203168167 | 0,712334336640827 | 1,65094620113639 | 1,72852314161337 |
NonInvasiveFetalECGThorax1 | 2793,8055999279 | 2386,86485028267 | 30889,346278429 | 2463,03751993179 | 0,840203562340967 | 0,701272264631043 | 0,792875318066158 | 0,69058524173028 | 1651 | 1378 | 1558 | 1357 | 1,96387123696727 | 1,39714420395688 | 1,47386588095152 | 1,41873208985598 |
NonInvasiveFetalECGThorax2 | 2842,39512848854 | 2356,72947096825 | 29971,4263691902 | 2428,40210390091 | 0,782697201017812 | 0,622391857506361 | 0,669211195928753 | 0,589821882951654 | 1538 | 1223 | 1315 | 1159 | 1,7671728674701 | 1,28319876338582 | 1,34564414526306 | 1,28783368100202 |
OSULeaf | 252,241909503937 | 210,507496356964 | 2185,87122344971 | 217,963332176208 | 0,648760330578512 | 0,429752066115703 | 0,586776859504132 | 0,334710743801653 | 157 | 104 | 142 | 81 | 1,75349614463531 | 1,20015574139288 | 1,43032441894466 | 1,36816297153694 |
OliveOil | 66,4931290149689 | 53,1301910877228 | 360,543924808502 | 56,4842278957367 | 0,9 | 1 | 1 | 1 | 27 | 30 | 30 | 30 | 0,577400020709256 | 0,0979373722089969 | 0,0962990304185883 | 0,0959558302391784 |
PLAID | 16009,9989583492 | 1074,57957410812 | 1093,8471224308 | 1100,00294876099 | 0,355679702048417 | 0,242085661080074 | 0,301675977653631 | 0,121042830540037 | 191 | 130 | 162 | 65 | 2,8176188195994 | 1,70827369794981 | 2,15205197543853 | 1,33067033222295 |
PhalangesOutlinesCorrect | 383,725139856339 | 348,284126996994 | 1493,31582260132 | 396,696353435516 | 0,757575757575758 | 0,782051282051282 | 0,785547785547785 | 0,789044289044289 | 650 | 671 | 674 | 677 | 0,0543728982323578 | 0,0374914454503742 | 0,0377373624325573 | 0,0411377506002834 |
Phoneme | 3480,80747509003 | 2828,05643820763 | 2988,78014302254 | 2930,41219162941 | 0,312763713080169 | 0,15295358649789 | 0,199367088607595 | 0,00896624472573837 | 593 | 290 | 378 | 17 | 3,03531466246172 | 1,43359940774873 | 1,83771317859898 | 0,42240933961331 |
PickupGestureWiimoteZ | 66,6894726753235 | 52,0630919933319 | 54,7641973495483 | 57,3809003829956 | 0,44 | 0,26 | 0,34 | 0,26 | 22 | 13 | 17 | 13 | 1,6821370570438 | 1,07009470853246 | 1,31450831538975 | 1,06275264768885 |
PigAirwayPressure | 907,003129720688 | 626,759041786194 | 648,105907201767 | 632,464380741119 | 0,908653846153846 | 0,798076923076923 | 0,793269230769231 | 0,6875 | 189 | 166 | 165 | 143 | 2,1139792197454 | 0,884436201905246 | 0,873565503607129 | 0,906133354956114 |
PigArtPressure | 9281,58382511139 | 605,011109113693 | 626,701559782028 | 620,595318794251 | 0,225961538461538 | 0,0625 | 0,0769230769230769 | 0,0192307692307693 | 47 | 13 | 16 | 4 | 4,26923754172171 | 2,59736291293805 | 2,85587779847977 | 1,73929532987573 |
PigCVP | 9279,45726561546 | 606,965629816055 | 627,32789349556 | 621,997574329376 | 0,274038461538462 | 0,0480769230769231 | 0,0625 | 0,00480769230769229 | 57 | 10 | 13 | 1 | 3,86297486403481 | 1,89354509483802 | 1,99784988571763 | 1,63939645609488 |
Plane | 361,231479883194 | 105,337946176529 | 110,054914236069 | 117,685925483704 | 0,0190476190476191 | 0 | 0,0571428571428572 | 0,0571428571428572 | 2 | 0 | 6 | 6 | 1,15356153790947 | 1,06540596718159 | 2,32783522629689 | 2,27950379566851 |
PowerCons | 590,131134033203 | 91,5797271728516 | 95,6852531433106 | 97,7696807384491 | 0,183333333333333 | 0,155555555555556 | 0,961111111111111 | 0,783333333333333 | 33 | 28 | 173 | 141 | 1,0401996977381 | 0,955818334001848 | 1,51618702943711 | 1,71134001145431 |
ProximalPhalanxOutlineAgeGroup | 390,728746891022 | 129,982848882675 | 150,128537416458 | 145,040086269379 | 0,917073170731707 | 0,931707317073171 | 0,926829268292683 | 0,926829268292683 | 188 | 191 | 190 | 190 | 0,126537551829781 | 0,0980799577518903 | 0,0983417465439486 | 0,10568310332861 |
ProximalPhalanxOutlineCorrect | 536,177778482437 | 114,700112104416 | 135,549452543259 | 129,864212751389 | 0,673539518900344 | 0,769759450171821 | 0,769759450171821 | 0,776632302405498 | 196 | 224 | 224 | 226 | 0,0364419828313628 | 0,0254182687304984 | 0,0253646377647439 | 0,0280524163396027 |
ProximalPhalanxTW | 391,542843818665 | 112,648392438889 | 123,983910322189 | 129,828912258148 | 0,819512195121951 | 0,946341463414634 | 0,965853658536585 | 0,946341463414634 | 168 | 194 | 198 | 194 | 0,307778941922914 | 0,292223473261011 | 0,298088917660084 | 0,302561559197844 |
RefrigerationDevices | 6108,56518745422 | 451,450768232346 | 446,709837675095 | 440,626751422882 | 528 | 0,357333333333333 | 0,52 | 152 | 198 | 134 | 195 | 57 | 1,92356904673829 | 1,2709477628289 | 1,56949464075528 | 1,11241535061323 |
Rock | 3221,66583991051 | 237,952889204025 | 228,852789878845 | 236,122090339661 | 0,98 | 0,86 | 0,82 | 0,48 | 49 | 43 | 41 | 24 | 1,38535286997545 | 0,588138438647857 | 0,572823721896147 | 0,603703709501832 |
ScreenType | 6082,06098270416 | 466,668653726578 | 425,390887975693 | 439,798132658005 | 0,933333333333333 | 0,906666666666667 | 0,949333333333333 | 0,813333333333333 | 350 | 340 | 356 | 305 | 0,984063465830487 | 0,594930305751658 | 0,579391551329694 | 0,60288712685881 |
SemgHandGenderCh2 | 20106,3766162395 | 1405,44079422951 | 1353,09763336182 | 1371,00403499603 | 0,993333333333333 | 0,97 | 0,988333333333333 | 0,0033333333333333 | 596 | 582 | 593 | 2 | 1,28226819031185 | 0,763573609174014 | 0,756704590209925 | 1,01466487446001 |
SemgHandMovementCh2 | 1627,36919760704 | 1067,8652741909 | 1027,38289904594 | 1020,27108573914 | 0,955555555555556 | 0,257777777777778 | 0,293333333333333 | 0,00888888888888883 | 430 | 116 | 132 | 4 | 2,19462851785585 | 1,02255815336963 | 1,05537432588861 | 0,493060881281326 |
SemgHandSubjectCh2 | 1639,55577206612 | 1055,69436860085 | 1101,41600561142 | 1010,57038259506 | 0,744444444444444 | 0,111111111111111 | 0,175555555555556 | 0 | 335 | 50 | 79 | 0 | 3,27516167856461 | 1,52304062796102 | 1,67101977808731 | 1,31967236397299 |
ShakeGestureWiimoteZ | 66,0828833580017 | 57,7719583511353 | 56,4708828926086 | 57,7001481056213 | 0,12 | 0,02 | 0,04 | 0,02 | 6 | 1 | 2 | 1 | 1,85760157298437 | 1,30369410356649 | 2,13161338033566 | 1,32892789077725 |
ShapeletSim | 281,822555541992 | 178,913248062134 | 183,822199344635 | 161,848052740097 | 0,888888888888889 | 0,00555555555555554 | 0,0111111111111111 | 0 | 160 | 1 | 2 | 0 | 1,58767817820089 | 0,937514420620682 | 0,973387958088006 | 0,627235031640263 |
ShapesAll | 939,784508228302 | 518,184254646301 | 516,648133277893 | 483,248836755753 | 0,363333333333333 | 0,281666666666667 | 0,361666666666667 | 0,263333333333333 | 218 | 169 | 217 | 158 | 1,79070021531076 | 1,4724035393034 | 1,88459790651443 | 1,72799102970979 |
SmallKitchenAppliances | 543,218329668045 | 444,257143735886 | 463,173922300339 | 422,26851773262 | 0,722666666666667 | 0,789333333333333 | 792 | 0,765333333333333 | 271 | 296 | 297 | 287 | 0,39368517455962 | 0,244806981315572 | 0,253505857880687 | 0,279306419481647 |
SmoothSubspace | 119,796482563019 | 106,21834564209 | 107,292400836945 | 109,406891345978 | 0,04 | 0,04 | 0,886666666666667 | 0,86 | 6 | 6 | 133 | 129 | 0,339359531366836 | 0,326077389737442 | 1,12109529354789 | 1,0601988580839 |
SonyAIBORobotSurface1 | 319,993726968765 | 295,1269094944 | 294,605816841125 | 311,611051082611 | 0,266222961730449 | 0,239600665557404 | 0,965058236272879 | 0,895174708818636 | 160 | 144 | 580 | 538 | 0,723223605603158 | 0,649498830307699 | 1,04235094011758 | 1,11336741763818 |
SonyAIBORobotSurface2 | 456,797441482544 | 405,164133787155 | 401,139019727707 | 453,87419295311 | 0,154249737670514 | 0,118572927597062 | 0,994753410283316 | 0,508919202518363 | 147 | 113 | 948 | 485 | 0,754437192597872 | 0,678943923885529 | 1,35269279548441 | 1,43111882253828 |
StarLightCurves | 14590,837741375 | 12845,9836494923 | 12185,7935175896 | 14837,261036396 | 0,191719281204468 | 0,161850412821758 | 0,169985429820301 | 0,157115104419621 | 1579 | 1333 | 1400 | 1294 | 0,406140744225867 | 0,350430274155578 | 0,438499392487541 | 0,365402623753122 |
Strawberry | 275,263502836227 | 216,750507354736 | 206,098024129868 | 220,318739891052 | 0,456756756756757 | 0,610810810810811 | 0,610810810810811 | 0,637837837837838 | 169 | 226 | 226 | 236 | 0,04374465758556 | 0,0309669717902056 | 0,0309945053337773 | 0,0343267781715464 |
SwedishLeaf | 347,197677135468 | 292,863086223602 | 282,059425830841 | 316,285939216614 | 0,2352 | 0,1728 | 0,4208 | 0,3024 | 147 | 108 | 263 | 189 | 0,873089366110561 | 0,752116244876339 | 1,19159124568229 | 1,07433577123071 |
Symbols | 847,381683826447 | 712,273353338242 | 677,084244966507 | 708,604474067688 | 0,201005025125628 | 0,0763819095477387 | 0,146733668341709 | 0,0432160804020101 | 200 | 76 | 146 | 43 | 1,79764486378059 | 1,35059750813381 | 1,72012768327517 | 1,64187138329479 |
SyntheticControl | 145,126955509186 | 130,619120836258 | 123,864794254303 | 139,038876771927 | 0,01 | 0,00666666666666671 | 0,16 | 0,133333333333333 | 3 | 2 | 48 | 40 | 0,674938681620007 | 0,529764505993869 | 1,81309199075086 | 1,50993327753225 |
ToeSegmentation1 | 208,946414470673 | 173,515724182129 | 164,370450019836 | 175,663953781128 | 0,241228070175439 | 0,162280701754386 | 0,723684210526316 | 0,425438596491228 | 55 | 37 | 165 | 97 | 1,46121013545525 | 1,26359666086102 | 1,75595484644406 | 1,8859945256922 |
ToeSegmentation2 | 151,255996465683 | 126,199154853821 | 119,754659175873 | 127,29496884346 | 0,246153846153846 | 0,107692307692308 | 0,492307692307692 | 0,2 | 32 | 14 | 64 | 26 | 1,58674358247218 | 1,28717219367118 | 2,05314205552426 | 2,06662942690568 |
Trace | 84,0914149284363 | 67,9376242160797 | 63,9996957778931 | 66,6693365573883 | 0,18 | 0,19 | 0,52 | 0,29 | 18 | 19 | 52 | 29 | 1,43737717127558 | 1,17073994496945 | 2,12461472639306 | 2,0523641479529 |
TwoLeadECG | 537,219780921936 | 497,33499121666 | 458,679702758789 | 514,011130094528 | 0,863037752414399 | 0,857769973661106 | 0,985074626865672 | 0,985074626865672 | 983 | 977 | 1122 | 1122 | 0,616031898765416 | 0,496564746136362 | 0,463395093292128 | 0,498785441289329 |
TwoPatterns | 1789,38928484917 | 1552,11999821663 | 1415,27201008797 | 1622,02080821991 | 0 | 0 | 0,00975000000000004 | 0,00700000000000001 | 0 | 0 | 39 | 28 | 0,0174878864503676 | 0,0123065112311458 | 0,0326995304036927 | 0,0309873998748075 |
UMD | 125,137464046478 | 109,415093898773 | 102,065370321274 | 108,98175907135 | 0,104166666666667 | 0,0694444444444444 | 0,694444444444444 | 0,520833333333333 | 15 | 10 | 100 | 75 | 1,171466540748 | 1,02509959484867 | 1,55875744884973 | 1,56406776318376 |
UWaveGestureLibraryAll | 6134,34577512741 | 5487,01812410355 | 5175,39218473435 | 5553,579423666 | 0,509491903964266 | 0,320491345616974 | 0,577051926298157 | 0,215801228364042 | 1825 | 1148 | 2067 | 773 | 2,40442456196151 | 1,76359532068128 | 1,8600669766307 | 1,71890182007245 |
UWaveGestureLibraryX | 2630,11350035667 | 2136,57634663582 | 1991,14442563057 | 2260,41037750244 | 0,163874930206589 | 0,138749302065885 | 0,410943606923506 | 0,270798436627582 | 587 | 497 | 1472 | 970 | 1,32268452084513 | 1,10072303662853 | 1,85886449322431 | 1,60065210006393 |
UWaveGestureLibraryY | 2615,91795301437 | 2109,89908385277 | 1967,16000056267 | 2250,81779551506 | 0,447236180904523 | 0,382747068676717 | 0,667783361250698 | 0,498045784477945 | 1602 | 1371 | 2392 | 1784 | 1,43566853048145 | 1,20085215108607 | 1,61809157519704 | 1,52143721378922 |
UWaveGestureLibraryZ | 2610,33816432953 | 2111,53595042229 | 1912,44640731812 | 2152,96778774261 | 0,3107202680067 | 0,272194304857621 | 0,540759352317141 | 0,417364600781686 | 1113 | 975 | 1937 | 1495 | 1,37297678310257 | 1,17616332173301 | 1,88490638701822 | 1,6467186695424 |
Wafer | 2983,89160490036 | 2466,64216637611 | 2257,70152664185 | 2568,53430914879 | 0,0295262816353018 | 0,0317975340687865 | 0,0350421804023362 | 0,0337443218689163 | 182 | 196 | 216 | 208 | 0,0258300447609246 | 0,0230955284113493 | 0,022020749504378 | 0,0234816768286178 |
Wine | 63,1184613704681 | 54,8301150798798 | 49,4335155487061 | 56,4682230949402 | 0,388888888888889 | 0,87037037037037 | 0,87037037037037 | 0,87037037037037 | 21 | 47 | 47 | 47 | 0,0136314037887887 | 0,00701879823538019 | 0,00626276486878944 | 0,00633913040862795 |
WordSynonyms | 477,89760518074 | 385,955779790878 | 356,02926325798 | 400,643586397171 | 0,170846394984326 | 0,117554858934169 | 0,217868338557994 | 0,178683385579937 | 109 | 75 | 139 | 114 | 1,57665115226267 | 1,25322771685599 | 1,96040444145389 | 1,72816556403884 |
Worms | 145,540552377701 | 130,06942820549 | 118,777658939362 | 124,814129114151 | 0,961038961038961 | 0,727272727272727 | 0,805194805194805 | 0,480519480519481 | 74 | 56 | 62 | 37 | 1,72177986358357 | 0,993043238825872 | 1,01583405415147 | 0,99389819356099 |
WormsTwoClass | 133,876647472382 | 118,182027578354 | 108,015325069427 | 114,612305402756 | 1 | 0,987012987012987 | 1 | 0,922077922077922 | 77 | 76 | 77 | 71 | 0,602866143152339 | 0,389681040576552 | 0,387858547001427 | 0,514261843242071 |
Yoga | 2512,18406438828 | 2200,55707001686 | 2008,08171796799 | 2168,71482992172 | 956 | 0,961666666666667 | 0,960666666666667 | 0,958666666666667 | 2868 | 2885 | 2882 | 2876 | 0,327349919967795 | 0,232301644872287 | 0,231904046065939 | 0,24287664951987 |
The adversarial training was done for SGM over 13 datasets.
- This file presents the ASR of InceptionTime for each dataset, with and without adversarial training.
Dataset | ASR without adv training | ASR with adv training |
---|---|---|
AllGestureWiimoteY | 0.06285714285714283 | 0 |
ArrowHead | 0.88 | 0 |
Beef | 0.5666666666666667 | 0.16666666666666663 |
BeetleFly | 0 | 0 |
BME | 0.44666666666666666 | 0.14666666666666666 |
ChlorineConcentration | 0.978125 | 0 |
Coffee | 1 | 0.1071428571428571 |
CricketX | 0.08461538461538465 | 0 |
Ham | 0.9809523809523809 | 0 |
Wine | 0.8703703703703703 | 0 |
Worms | 0.48051948051948057 | 0 |
WormsTwoClass | 0.922077922077922 | 0 |
Yoga | 0.9586666666666667 | 0 |
- This file presents the accuracy of InceptionTime for each dataset, with and without adversarial training.
Dataset | InceptionTime accuracy | InceptionTime accuracy after adv training |
---|---|---|
AllGestureWiimoteY | 0.8328571428571429 | 0.5771428571428572 |
ArrowHead | 0.8228571428571428 | 0.8285714285714286 |
Beef | 0.6666666666666666 | 0.7 |
BeetleFly | 0.75 | 0.75 |
BME | 0.9933333333333333 | 0.9866666666666667 |
ChlorineConcentration | 0.8596354166666667 | 0.5359375 |
Coffee | 1.0 | 1 |
CricketX | 0.8282051282051283 | 0.6102564102564103 |
Ham | 0.7238095238095238 | 0.6952380952380952 |
Wine | 0.7592592592592593 | 0.5555555555555556 |
Worms | 0.7532467532467533 | 0.6103896103896104 |
WormsTwoClass | 0.7922077922077922 | 0.7532467532467533 |
Yoga | 0.9053333333333333 | 0.464 |
@inproceedings{pialla2022smooth,
title={Smooth Perturbations for Time Series Adversarial Attacks},
author={Pialla, Gautier and Fawaz, Hassan Ismail and Devanne, Maxime and Weber, Jonathan and Idoumghar, Lhassane and Muller, Pierre-Alain and Bergmeir, Christoph and Schmidt, Daniel and Webb, Geoffrey and Forestier, Germain},
booktitle={Pacific-Asia Conference on Knowledge Discovery and Data Mining},
pages={485--496},
year={2022},
organization={Springer}
}
This work was funded by ArtIC project ”Artificial Intelligence for Care” (grant ANR-20-THIA-0006-01) and co-funded by R ́egion Grand Est, Inria Nancy - Grand Est, IHU of Strasbourg, University of Strasbourg and University of Haute- Alsace.
The authors would like to thank the providers of the UCR archive as well as the M ́esocentre of Strasbourg for providing access to the GPU cluster.