sentences
sequence | ner_tags
sequence |
---|---|
[
"Here",
",",
"the",
"input",
"Xis",
"the",
"clean",
"text",
"used",
"in",
"training",
"the",
"classifier",
"and",
"the",
"X′is",
"the",
"random",
"masked",
"text",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"The",
"loss",
"function",
"L",
"(",
"·",
")",
"is",
"the",
"cross",
"-",
"entropy",
"loss",
"used",
"in",
"both",
"the",
"text",
"classifica-",
"tion",
"head",
"and",
"masked",
"language",
"modeling",
"head",
"in",
"the",
"pre",
"-",
"trained",
"models",
"exemplified",
"by",
"BERT",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O"
] |
[
"In",
"this",
"way",
",",
"we",
"are",
"utilizing",
"the",
"pre",
"-",
"trained",
"mod-",
"els",
"to",
"their",
"full",
"ability",
"by",
"using",
"both",
"the",
"mask",
"-",
"filling",
"function",
"learned",
"during",
"the",
"pre",
"-",
"training",
"stage",
"as",
"well",
"as",
"the",
"generalization",
"ability",
"to",
"downstream",
"tasks",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Algorithm",
"1",
"Adversarial",
"Training",
"Require",
":",
"Training",
"Sample",
"X",
",",
"adversarial",
"step",
"Ta",
"1",
":",
"X′←Inject",
"Noise",
"X",
"2",
":",
"δ0←1√DN",
"(",
"0",
",",
"σ2",
")",
"/",
"/",
"Init",
"Perturb",
"3",
":",
"fort=",
"0,1",
",",
"...",
"T",
"ado",
"4",
":",
"gδ←",
"▽",
"δ",
"(",
"Lc+Lmlm",
")",
"/",
"/",
"Get",
"Perturbation",
"5",
":",
"δt←",
"/",
"producttext",
"||δ||F",
"<",
"ϵ",
"(",
"δt+α·gδ",
"/",
"||gδ||F",
")",
"6",
":",
"Lnoise←",
"L",
"(",
"Fm",
"(",
"X′+δt",
")",
",",
"X",
",",
"θ",
")",
"7",
":",
"X′←X′+δt",
"/",
"/",
"Update",
"Input",
"8",
":",
"gt+1",
"=",
"gt+",
"▽",
"θ",
"(",
"Lc+Lmlm+Lnoise",
")",
"9",
":",
"θ←θ−gT+1",
"/",
"/",
"Update",
"model",
"parameter",
"θ",
"3.4",
"Combining",
"with",
"Adversarial",
"Training",
"Different",
"from",
"the",
"image",
"field",
"where",
"adver-",
"saries",
"are",
"usually",
"generated",
"by",
"gradients",
",",
"word-",
"substitution",
"attacks",
"do",
"not",
"have",
"direct",
"connections",
"with",
"gradient",
"-",
"based",
"adversaries",
"in",
"the",
"text",
"domain",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Therefore",
",",
"it",
"is",
"intuitive",
"to",
"incorporate",
"gradient-",
"based",
"adversarial",
"training",
"in",
"the",
"purification",
"pro-",
"cess",
"when",
"the",
"purification",
"process",
"is",
"combined",
"with",
"the",
"classifier",
"training",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"introduce",
"the",
"adversarial",
"training",
"process",
"therefore",
"the",
"purification",
"function",
"Fm",
"(",
"·",
")",
"includes",
"mask",
"-",
"prediction",
"and",
"recovering",
"clean",
"texts",
"from",
"inputs",
"with",
"gradient",
"-",
"based",
"perturbations",
",",
"which",
"leads",
"to",
"stronger",
"purification",
"ability",
"compared",
"with",
"a",
"standard",
"BERT",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O"
] |
[
"Following",
"standard",
"adversarial",
"training",
"process",
"with",
"gradient",
"-",
"based",
"adversaries",
"introduced",
"by",
"Zhu",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2019",
")",
";",
"Li",
"and",
"Qiu",
"(",
"2020",
")",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"In",
"the",
"adversarial",
"training",
"process",
",",
"a",
"gradient",
"-",
"based",
"perturbation",
"δis",
"added",
"to",
"the",
"embedding",
"output",
"of",
"the",
"input",
"text",
"X",
"(",
"for",
"simplicity",
",",
"we",
"still",
"use",
"XandX′to",
"denote",
"the341",
"embedding",
"output",
"in",
"the",
"Algorithm",
"1",
")",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Then",
"the",
"perturbed",
"inputs",
"are",
"added",
"to",
"the",
"training",
"set",
"in",
"the",
"training",
"process",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"combine",
"gradient",
"-",
"based",
"ad-",
"versarial",
"training",
"with",
"the",
"text",
"purification",
"process",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"As",
"illustrated",
"in",
"Algorithm",
"1",
",",
"for",
"an",
"adversarial",
"training",
"step",
",",
"we",
"add",
"perturbations",
"to",
"the",
"masked",
"textX′and",
"run",
"Tatimes",
"of",
"updates",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"calculate",
"gradients",
"based",
"on",
"both",
"classification",
"losses",
"Lcand",
"masked",
"language",
"modeling",
"losses",
"Lmlm",
";",
"further",
",",
"as",
"seen",
"in",
"line",
"6",
",",
"we",
"also",
"calculate",
"the",
"loss",
"that",
"the",
"masked",
"language",
"model",
"will",
"predict",
"the",
"texts",
"from",
"the",
"perturbed",
"text",
"X′+δ",
",",
"which",
"enhanced",
"the",
"text",
"recover",
"ability",
"from",
"noisy",
"or",
"adversarial",
"texts",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"4",
"Experiments",
"4.1",
"Datasets",
"We",
"use",
"two",
"widely",
"used",
"text",
"classification",
"datasets",
":",
"IMDB1",
"(",
"Maas",
"et",
"al",
".",
",",
"2011",
")",
"and",
"AG",
"’s",
"News2",
"(",
"Zhang",
"et",
"al",
".",
",",
"2015",
")",
"in",
"our",
"experiments",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-DatasetName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-DatasetName",
"I-DatasetName",
"I-DatasetName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"The",
"IMDB",
"dataset",
"is",
"a",
"bi",
"-",
"polar",
"movie",
"review",
"classification",
"task",
";",
"the",
"AG",
"’s",
"News",
"dataset",
"is",
"a",
"four",
"-",
"class",
"news",
"genre",
"classification",
"task",
"."
] | [
"O",
"B-DatasetName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-DatasetName",
"I-DatasetName",
"I-DatasetName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"The",
"average",
"length",
"is",
"220",
"words",
"in",
"the",
"IMDB",
"dataset",
",",
"and",
"40",
"words",
"in",
"the",
"AG",
"’s",
"News",
"dataset",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-DatasetName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-DatasetName",
"I-DatasetName",
"I-DatasetName",
"O",
"O"
] |
[
"We",
"use",
"the",
"test",
"set",
"fol-",
"lowing",
"the",
"Textfooler",
"1k",
"test",
"set",
"in",
"the",
"main",
"re-",
"sult",
"and",
"sample",
"100",
"samples",
"for",
"the",
"rest",
"of",
"the",
"experiments",
"since",
"the",
"attacking",
"process",
"is",
"seriously",
"slowed",
"down",
"when",
"the",
"model",
"is",
"defensive",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-DatasetName",
"I-DatasetName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"4.2",
"Attack",
"Methods",
"Popular",
"attack",
"methods",
"exemplified",
"by",
"genetic",
"Al-",
"gorithm",
"(",
"Alzantot",
"et",
"al",
".",
",",
"2018",
")",
",",
"Textfooler",
"(",
"Jin",
"et",
"al",
".",
",",
"2019",
")",
"and",
"BERT",
"-",
"Attack",
"(",
"Li",
"et",
"al",
".",
",",
"2020",
")",
"can",
"successfully",
"mislead",
"strong",
"models",
"of",
"both",
"IMDB",
"and",
"AG",
"’s",
"News",
"task",
"with",
"a",
"very",
"small",
"per-",
"centage",
"of",
"substitutions",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-DatasetName",
"O",
"B-DatasetName",
"I-DatasetName",
"I-DatasetName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Therefore",
",",
"we",
"use",
"these",
"strong",
"adversarial",
"attack",
"methods",
"as",
"the",
"attacker",
"to",
"test",
"the",
"effectiveness",
"of",
"our",
"defense",
"method",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"The",
"hyperparameters",
"used",
"in",
"the",
"attacking",
"algorithm",
"vary",
"in",
"different",
"settings",
":",
"we",
"choose",
"candidate",
"list",
"sizeKto",
"be",
"12",
",",
"48",
",",
"and",
"50",
"which",
"are",
"used",
"in",
"the",
"Textfooler",
"and",
"BERT",
"-",
"Attack",
"methods",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O"
] |
[
"We",
"use",
"the",
"exact",
"same",
"metric",
"used",
"in",
"Textfooler",
"and",
"BERT",
"-",
"Attack",
"that",
"calculates",
"the",
"after",
"-",
"attack",
"accuracy",
",",
"which",
"is",
"the",
"targeted",
"adversarial",
"evalu-",
"ation",
"defined",
"by",
"Si",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"O",
"B-MetricName",
"I-MetricName",
"I-MetricName",
"I-MetricName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2020",
")",
"."
] | [
"O",
"O",
"O",
"O"
] |
[
"The",
"after",
"-",
"attack",
"accuracy",
"measures",
"the",
"actual",
"defense",
"ability",
"of",
"the",
"system",
"under",
"adversarial",
"attacks",
"."
] | [
"O",
"B-MetricName",
"I-MetricName",
"I-MetricName",
"I-MetricName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"1https",
":",
"/",
"/",
"datasets.imdbws.com",
"/",
"2https",
":",
"/",
"/",
"www.kaggle.com",
"/",
"amananandrai",
"/",
"ag-news-",
"classification",
"-",
"dataset4.3",
"Victim",
"Models",
"and",
"Defense",
"Baselines",
"The",
"victim",
"models",
"are",
"the",
"fine",
"-",
"tuned",
"pre",
"-",
"train",
"mod-",
"els",
"exemplified",
"by",
"BERT",
"and",
"RoBERTa",
",",
"which",
"we",
"implement",
"based",
"on",
"Huggingface",
"Transformers3",
"(",
"Wolf",
"et",
"al",
".",
",",
"2020",
")",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"As",
"discussed",
"above",
",",
"there",
"are",
"few",
"works",
"concerning",
"adversarial",
"defenses",
"against",
"attacks",
"without",
"knowing",
"the",
"candidates",
"in",
"NLP",
"tasks",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TaskName",
"O",
"O"
] |
[
"Moreover",
",",
"previous",
"works",
"do",
"not",
"focus",
"on",
"recent",
"strong",
"attack",
"algorithms",
"such",
"as",
"Textfooler",
"(",
"Jin",
"et",
"al",
".",
",",
"2019",
")",
",",
"BERT",
"-",
"involved",
"attacks",
"(",
"Li",
"et",
"al",
".",
",",
"2020",
";",
"Garg",
"and",
"Ramakrishnan",
",",
"2020",
")",
"Therefore",
",",
"we",
"first",
"list",
"methods",
"that",
"can",
"defend",
"against",
"adver-",
"sarial",
"attacks",
"without",
"accessing",
"the",
"candidate",
"list",
"as",
"our",
"baselines",
":",
"Adv",
"-",
"Train",
"(",
"Adv",
"-",
"HotFlip",
")",
":",
"Ebrahimi",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2017",
")",
"introduces",
"the",
"adversarial",
"training",
"method",
"used",
"in",
"defending",
"against",
"substitution",
"-",
"based",
"adver-",
"sarial",
"attacks",
"in",
"NLP",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"It",
"uses",
"gradients",
"to",
"find",
"actual",
"adversaries",
"in",
"the",
"embedding",
"space",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Virtual",
"-",
"Adv",
"-",
"Train",
"(",
"FreeLB",
")",
":",
"Li",
"and",
"Qiu",
"(",
"2020",
")",
";",
"Zhu",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2019",
")",
"use",
"virtual",
"adversaries",
"to",
"improve",
"the",
"performances",
"in",
"fine",
"-",
"tuning",
"pre-",
"trained",
"models",
",",
"which",
"can",
"also",
"be",
"used",
"to",
"deal",
"with",
"adversarial",
"attacks",
"without",
"accessing",
"the",
"candidate",
"list",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"follow",
"the",
"standard",
"FreeLB",
"training",
"pro-",
"cess",
"to",
"re",
"-",
"implement",
"the",
"defense",
"results",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Further",
",",
"there",
"are",
"some",
"works",
"that",
"require",
"the",
"candidate",
"list",
",",
"it",
"is",
"not",
"a",
"fair",
"comparison",
"with",
"de-",
"fense",
"methods",
"without",
"accessing",
"the",
"candidates",
",",
"so",
"we",
"list",
"them",
"separately",
":",
"Adv",
"-",
"Augmentation",
":",
"We",
"generate",
"adversarial",
"examples",
"of",
"the",
"training",
"dataset",
"as",
"a",
"data",
"augmen-",
"tation",
"method",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"mix",
"the",
"generated",
"adversarial",
"examples",
"and",
"the",
"original",
"training",
"dataset",
"to",
"train",
"a",
"model",
"in",
"a",
"standard",
"fine",
"-",
"tuning",
"process",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"ASCC",
":",
"Dong",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2021",
")",
"also",
"uses",
"a",
"convex-",
"hull",
"concept",
"based",
"on",
"the",
"candidate",
"vocabulary",
"as",
"a",
"strong",
"adversarial",
"defense",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"ADA",
":",
"Si",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2020",
")",
"uses",
"a",
"mixup",
"strategy",
"based",
"on",
"the",
"generated",
"adversarial",
"examples",
"to",
"achieve",
"adversarial",
"defense",
"with",
"variants",
"AMDA-",
"SMix",
"that",
"mixup",
"the",
"special",
"tokens",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"FreeLB++",
":",
"Li",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2021",
")",
"introduces",
"a",
"variant",
"of",
"FreeLB",
"method",
"that",
"expands",
"the",
"norm",
"bound",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"RanMASK",
":",
"Zeng",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2021",
")",
"introduces",
"a",
"masking",
"strategy",
"that",
"makes",
"use",
"of",
"noises",
"to",
"im-",
"prove",
"robustness",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"3https",
":",
"/",
"/",
"github.com",
"/",
"huggingface",
"/",
"transformers342",
"Defense",
"↓Attacks",
"→Origin",
"Textfooler",
"BERT",
"-",
"Attack",
"Textfooler",
"BERT",
"-",
"Attack",
"(",
"K=12",
")",
"(",
"K=12",
")",
"(",
"K=50",
")",
"(",
"K=48",
")",
"IMDB",
"↓",
"BERT",
"(",
"Devlin",
"et",
"al",
".",
",",
"2018",
")",
"94.1",
"20.4",
"18.5",
"2.8",
"3.2",
"RoBERTa",
"(",
"Liu",
"et",
"al",
".",
",",
"2019",
")",
"97.3",
"26.3",
"24.5",
"25.2",
"23.0",
"●",
"Adv",
"-",
"HotFlip",
"(",
"BERT",
")",
"(",
"Ebrahimi",
"et",
"al",
".",
",",
"2017",
")",
"95.1",
"36.1",
"34.2",
"8.0",
"6.2",
"■",
"FreeLB",
"(",
"BERT",
")",
"(",
"Li",
"and",
"Qiu",
",",
"2020",
")",
"96.0",
"30.2",
"30.4",
"7.3",
"2.3",
"■",
"FreeLB++",
"(",
"BERT",
")",
"(",
"Li",
"et",
"al",
".",
",",
"2021",
")",
"93.2",
"-",
"-",
"45.3",
"39.9",
"▲",
"RanMASK",
"(",
"RoBERTa",
")",
"(",
"Zeng",
"et",
"al",
".",
",",
"2021",
")",
"93.0",
"-",
"-",
"23.7",
"26.8",
"▲",
"Text",
"Purification",
"(",
"BERT",
")",
"93.0",
"81.5",
"76.7",
"51.0",
"44.5",
"▲",
"Text",
"Purification",
"(",
"RoBERTa",
")",
"96.1",
"84.2",
"82.0",
"54.3",
"52.2",
"AG",
"’s",
"News",
"↓",
"BERT",
"(",
"Devlin",
"et",
"al",
".",
",",
"2018",
")",
"92.0",
"32.8",
"34.3",
"19.4",
"14.1",
"RoBERTa",
"(",
"Liu",
"et",
"al",
".",
",",
"2019",
")",
"97.3",
"26.3",
"24.5",
"25.2",
"23.0",
"●",
"Adv",
"-",
"HotFlip",
"(",
"BERT",
")",
"91.2",
"35.3",
"34.1",
"18.2",
"8.5",
"■",
"FreeLB",
"(",
"BERT",
")",
"90.5",
"40.1",
"34.2",
"20.1",
"8.5",
"▲",
"Text",
"Purification",
"(",
"BERT",
")",
"90.6",
"61.5",
"49.7",
"34.9",
"22.5",
"▲",
"Text",
"Purification",
"(",
"RoBERTa",
")",
"90.8",
"59.1",
"41.2",
"34.2",
"19.5",
"Table",
"1",
":",
"After",
"-",
"Attack",
"Accuracy",
"compared",
"with",
"defense",
"methods",
"that",
"can",
"defend",
"attacks",
"without",
"acknowledging",
"the",
"form",
"of",
"the",
"attacks",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"That",
"is",
",",
"the",
"substitution",
"candidates",
"of",
"the",
"attack",
"methods",
"are",
"unknown",
"to",
"defense",
"systems",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Methods",
"Origin",
"Textfooler",
"GA",
"IMDB",
"↓",
"BERT",
"94.0",
"2.0",
"45.0",
"■",
"Data",
"-",
"Augmentation",
"93.0",
"18.0",
"53.0",
"●",
"ADA",
"(",
"Si",
"et",
"al",
".",
",",
"2020",
")",
"96.7",
"3.0",
"-",
"●",
"AMDA",
"(",
"Si",
"et",
"al",
".",
",",
"2020",
")",
"96.9",
"17.4",
"-",
"▲",
"ASCC",
"(",
"Dong",
"et",
"al",
".",
",",
"2021",
")",
"77.0",
"-",
"71.0",
"▲",
"Text",
"Purification",
"(",
"BERT",
")",
"93.0",
"51.0",
"79.0",
"Table",
"2",
":",
"After",
"-",
"Attack",
"Accuracy",
"compared",
"with",
"access-",
"candidates",
"methods",
"based",
"on",
"the",
"BERT",
"model",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Here",
"we",
"implement",
"Textfooler",
"with",
"K=50",
"for",
"consistency",
"with",
"previous",
"works",
"."
] | [
"O",
"O",
"O",
"B-MethodName",
"O",
"B-HyperparameterName",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"GA",
"is",
"the",
"Genetic",
"Attack",
"method",
"."
] | [
"B-MethodName",
"O",
"O",
"B-MethodName",
"I-MethodName",
"O",
"O"
] |
[
"We",
"use",
"the",
"AMDA",
"-",
"SMix",
"setup",
"for",
"the",
"AMDA",
"method",
"."
] | [
"O",
"O",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"O",
"B-MethodName",
"O",
"O"
] |
[
"4.4",
"Implementations",
"We",
"use",
"BERT",
"-",
"BASE",
"and",
"RoBERTa",
"-",
"BASE",
"models",
"based",
"on",
"the",
"Huggingface",
"Transformers4",
"."
] | [
"O",
"O",
"O",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"mod-",
"ify",
"the",
"adversarial",
"training",
"with",
"virtual",
"adversaries",
"based",
"on",
"the",
"implementation",
"of",
"FreeLB",
",",
"TA",
"V",
"AT",
",",
"and",
"FreeLB++",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"B-MethodName",
"O"
] |
[
"The",
"training",
"hyper",
"-",
"parameters",
"we",
"use",
"are",
"different",
"from",
"FreeLB",
"and",
"TA",
"V",
"AT",
"since",
"we",
"aim",
"to",
"find",
"large",
"perturbations",
"to",
"simulate",
"adver-",
"saries",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"set",
"adversarial",
"learning",
"rate",
"α=1e-1",
"to",
"and",
"normalization",
"boundary",
"ϵ=2e-1",
"in",
"all",
"tasks",
"."
] | [
"O",
"O",
"B-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"B-HyperparameterName",
"O",
"O",
"B-HyperparameterName",
"I-HyperparameterName",
"B-HyperparameterName",
"O",
"O",
"O",
"O"
] |
[
"We",
"set",
"the",
"multiple",
"purification",
"size",
"N",
"=",
"to",
"16",
"for",
"all",
"tasks",
"and",
"we",
"will",
"discuss",
"the",
"selection",
"of",
"Nin",
"the",
"later",
"section",
"."
] | [
"O",
"O",
"O",
"O",
"B-HyperparameterName",
"I-HyperparameterName",
"B-HyperparameterName",
"O",
"O",
"B-HyperparameterValue",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"For",
"our",
"text",
"adversarial",
"purification",
"method",
",",
"we",
"4https",
":",
"/",
"/",
"github.com",
"/",
"huggingface",
"/",
"transformersuse",
"the",
"model",
"that",
"is",
"trained",
"with",
"gradient",
"-",
"based",
"adversarial",
"training",
"as",
"the",
"purification",
"model",
"Fm",
"(",
"·",
")",
"and",
"the",
"classifier",
"Fc",
"(",
"·",
")",
"for",
"the",
"main",
"experiments",
"and",
"conduct",
"thorough",
"ablations",
"to",
"explore",
"the",
"ef-",
"fect",
"of",
"combining",
"purification",
"with",
"classifier",
"and",
"adversarially",
"trained",
"classifier",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"As",
"for",
"implementing",
"adversarial",
"attack",
"methods",
",",
"we",
"use",
"the",
"TextAttack",
"toolkit",
"while",
"referring",
"the",
"official",
"codes",
"of",
"the",
"corresponding",
"attack",
"methods",
"5",
"(",
"Morris",
"et",
"al",
".",
",",
"2020a",
")",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"The",
"similarity",
"thresholds",
"of",
"the",
"word",
"-",
"substitution",
"range",
"are",
"the",
"main",
"fac-",
"tors",
"of",
"the",
"attacking",
"algorithm",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"tune",
"the",
"USE",
"(",
"Cer",
"et",
"al",
".",
",",
"2018",
")",
"constraint",
"0.5",
"for",
"the",
"AG",
"task",
"and",
"0.7",
"for",
"the",
"IMDB",
"task",
"and",
"0.5",
"for",
"the",
"cosine-",
"similarity",
"threshold",
"of",
"the",
"synonyms",
"embedding",
"(",
"Mrkši",
"´",
"c",
"et",
"al",
".",
",",
"2016",
")",
"which",
"can",
"reproduce",
"the",
"re-",
"sults",
"of",
"the",
"attacking",
"methods",
"reported",
"."
] | [
"O",
"O",
"O",
"B-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"B-HyperparameterValue",
"O",
"O",
"B-TaskName",
"O",
"O",
"B-HyperparameterValue",
"O",
"O",
"B-TaskName",
"O",
"O",
"B-HyperparameterValue",
"O",
"O",
"B-HyperparameterName",
"I-HyperparameterName",
"I-HyperparameterName",
"O",
"O",
"B-TaskName",
"I-TaskName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"4.5",
"Results",
"As",
"seen",
"in",
"Table",
"1",
",",
"the",
"proposed",
"Text",
"Adversar-",
"ial",
"Purification",
"algorithm",
"can",
"successfully",
"defend",
"strong",
"attack",
"methods",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"The",
"accuracy",
"of",
"our",
"defend-",
"ing",
"method",
"under",
"attack",
"is",
"significantly",
"higher",
"than",
"non",
"-",
"defense",
"models",
"(",
"50",
"%",
"vs",
"20",
"%",
"in",
"the",
"IMDB",
"dataset",
")",
"."
] | [
"O",
"B-MetricName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MetricValue",
"I-MetricValue",
"O",
"B-MetricValue",
"I-MetricValue",
"O",
"O",
"B-DatasetName",
"O",
"O",
"O"
] |
[
"Compared",
"with",
"previous",
"defense",
"methods",
",",
"our",
"proposed",
"method",
"can",
"achieve",
"higher",
"defense",
"accuracy",
"in",
"both",
"the",
"IMDB",
"task",
"and",
"AG",
"’s",
"News",
"task",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TaskName",
"O",
"O",
"B-TaskName",
"I-TaskName",
"I-TaskName",
"O",
"O"
] |
[
"The",
"Adv",
"-",
"HotFlip",
"and",
"the",
"FreeLB",
"methods",
"5https",
":",
"/",
"/",
"github.com",
"/",
"QData",
"/",
"TextAttack343",
"Defense",
"↓Attacks",
"→Origin",
"Textfooler",
"BERT",
"-",
"Attack",
"(",
"K=12",
")",
"(",
"K=12",
")",
"▲",
"Text",
"Purification",
"Only",
"↓",
"✔",
"Purification",
"94.0",
"72.0",
"60.0",
"✔",
"Purification",
"✖",
"Multi",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MethodName",
"I-MethodName",
"I-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-MetricName",
"B-MetricValue",
"B-MetricValue",
"B-MetricValue",
"O",
"O",
"O",
"O",
"O"
] |
[
"Recovery",
"87.0",
"20.0",
"13.0",
"✔",
"Purification",
"✖",
"Mask",
"Insertion",
"✖",
"Multi",
"."
] | [
"B-MetricName",
"B-MetricValue",
"B-MetricValue",
"B-MetricValue",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Recovery",
"92.0",
"11.0",
"3.0",
"▲",
"Combining",
"Classifier",
"↓",
"✔",
"Purification",
"✔",
"Comb",
"."
] | [
"B-MetricName",
"B-MetricValue",
"B-MetricValue",
"B-MetricValue",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Classifier",
"95.0",
"76.0",
"67.0",
"✔",
"Purification",
"✔",
"Comb",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Classifier",
"✖",
"Multi",
"."
] | [
"O",
"O",
"O",
"O"
] |
[
"Recovery",
"95.0",
"45.0",
"34.0",
"✔",
"Purification",
"✔",
"Comb",
"."
] | [
"B-MetricName",
"B-MetricValue",
"B-MetricValue",
"B-MetricValue",
"O",
"O",
"O",
"O",
"O"
] |
[
"Classifier",
"✖",
"Multi",
"."
] | [
"O",
"O",
"O",
"O"
] |
[
"Recovery",
"✖",
"Mask",
"Insertion",
"95.0",
"29.0",
"17.0",
"▲",
"Combining",
"Adversarially",
"Trained",
"Classifier",
"↓",
"✔",
"Purification",
"✔",
"AT",
"Classifier",
"93.0",
"86.0",
"77.0",
"✔",
"Purification",
"✔",
"AT",
"Classifier",
"✖",
"Multi",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Recovery",
"93.0",
"63.0",
"52.0",
"✔",
"Purification",
"✔",
"AT",
"Classifier",
"✖",
"Multi",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Recovery",
"✖",
"Mask",
"Insertion",
"93.0",
"42.0",
"29.0",
"BERT",
"94.0",
"10.0",
"5.0",
"Table",
"3",
":",
"Ablations",
"results",
"tested",
"on",
"attacking",
"the",
"IMDB",
"task",
"based",
"on",
"BERT",
"models",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Comb",
"."
] | [
"O",
"O"
] |
[
"Classifier",
"is",
"the",
"combined",
"fine",
"-",
"tuned",
"Fc",
"(",
"·",
")",
"andFm",
"(",
"·",
")",
"and",
"AT",
"Classifier",
"is",
"the",
"adversarially",
"trained",
"Fc",
"(",
"·",
")",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Mask",
"Insertion",
"is",
"to",
"use",
"both",
"mask",
"-",
"replacing",
"and",
"mask",
"-",
"insertion",
"in",
"injecting",
"noise",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"are",
"effective",
",",
"which",
"indicates",
"that",
"gradient",
"-",
"based",
"adversaries",
"are",
"not",
"very",
"similar",
"to",
"actual",
"substitu-",
"tions",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"We",
"can",
"see",
"that",
"Adv",
"-",
"HotFlip",
"and",
"FreeLB",
"methods",
"achieve",
"similar",
"results",
"(",
"around",
"30",
"%",
"when",
"K=",
"12",
")",
"which",
"indicates",
"that",
"gradient",
"-",
"based",
"adver-",
"sarial",
"training",
"methods",
"have",
"similar",
"defense",
"abili-",
"ties",
"no",
"matter",
"whether",
"the",
"adversaries",
"are",
"virtual",
"or",
"real",
"since",
"they",
"are",
"both",
"unaware",
"of",
"the",
"attacker",
"’s",
"candidate",
"list",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Also",
",",
"the",
"original",
"accuracy",
"(",
"on",
"the",
"clean",
"data",
")",
"of",
"our",
"method",
"is",
"only",
"a",
"little",
"lower",
"than",
"the",
"baseline",
"methods",
",",
"which",
"indicates",
"that",
"the",
"purified",
"texts",
"still",
"contain",
"enough",
"information",
"for",
"classification",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"The",
"RoBERTa",
"model",
"also",
"shows",
"robustness",
"using",
"both",
"original",
"fine",
"-",
"tuned",
"model",
"and",
"our",
"defensive",
"framework",
",",
"which",
"indicates",
"our",
"purification",
"algorithm",
"can",
"be",
"used",
"in",
"various",
"pre-",
"trained",
"language",
"models",
"."
] | [
"O",
"B-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Compared",
"with",
"methods",
"that",
"specifically",
"focus",
"on",
"adversarial",
"defense",
",",
"our",
"proposed",
"method",
"can",
"still",
"surpass",
"the",
"state",
"-",
"of",
"-",
"the-",
"art",
"defense",
"system",
"FreeLB++",
"(",
"Li",
"et",
"al",
".",
",",
"2021",
")",
"and",
"RanMASK",
"(",
"Zeng",
"et",
"al",
".",
",",
"2021",
")",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Further",
",",
"the",
"candidate",
"size",
"is",
"extremely",
"im-",
"portant",
"in",
"defending",
"against",
"adversarial",
"attacks",
",",
"when",
"the",
"candidate",
"size",
"is",
"smaller",
",",
"exemplified",
"by",
"K=",
"12",
",",
"our",
"method",
"can",
"achieve",
"very",
"promising",
"results",
"."
] | [
"O",
"O",
"O",
"B-HyperparameterName",
"I-HyperparameterName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-HyperparameterName",
"B-HyperparameterValue",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"As",
"pointed",
"out",
"by",
"Morris",
"et",
"al",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"(",
"2020b",
")",
",",
"the",
"candidate",
"size",
"should",
"not",
"be",
"too",
"large",
"that",
"the",
"quality",
"of",
"the",
"adversarial",
"examples",
"is",
"largely",
"dam-",
"aged",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"As",
"seen",
"in",
"Table",
"2",
",",
"we",
"compare",
"our",
"method",
"with",
"previous",
"access",
"-",
"candidates",
"defense",
"methods",
".",
"When",
"defending",
"against",
"the",
"widely",
"used",
"Textfooler",
"attack",
"and",
"genetic",
"attack",
"(",
"Alzantot",
"et",
"al",
".",
",",
"2018",
")",
",",
"our",
"method",
"can",
"achieve",
"similar",
"accuracy",
"even",
"compared",
"with",
"known",
"-",
"candidates",
"defense",
"meth-",
"ods",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"As",
"seen",
",",
"the",
"data",
"augmentation",
"method",
"can-",
"not",
"significantly",
"improve",
"model",
"robustness",
"since",
"the",
"candidates",
"can",
"be",
"very",
"diversified",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Therefore",
",",
"using",
"generated",
"adversarial",
"samples",
"as",
"an",
"aug-",
"mentation",
"strategy",
"does",
"not",
"guarantee",
"robustness",
"against",
"greedy",
"-",
"searched",
"methods",
"like",
"Textfooler",
"and",
"BERT",
"-",
"Attack",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"4.6",
"Analysis",
"4.6.1",
"Ablations",
"As",
"we",
"design",
"an",
"adversarial",
"purification",
"algo-",
"rithm",
"with",
"masked",
"language",
"models",
"and",
"propose",
"a",
"multiple",
"-",
"recovering",
"strategy",
",",
"we",
"aim",
"to",
"explore",
"which",
"process",
"helps",
"more",
"in",
"the",
"purification",
"de-",
"fense",
"system",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"Plus",
",",
"we",
"combine",
"classifiers",
"within",
"the",
"purification",
"model",
"so",
"it",
"is",
"also",
"important",
"to",
"explore",
"whether",
"such",
"a",
"combination",
"is",
"helpful",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"For",
"each",
"type",
"of",
"purification",
"method",
",",
"we",
"test",
"whether",
"the",
"specific",
"purification",
"process",
"we",
"pro-",
"pose",
"is",
"effective",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"That",
"is",
",",
"we",
"test",
"whether",
"making",
"multiple",
"recoveries",
"in",
"the",
"purification",
"process",
"is",
"helpful",
";",
"also",
",",
"we",
"test",
"whether",
"using",
"both",
"masking",
"tokens",
"and",
"inserting",
"additional",
"masks",
"is",
"helpful",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"As",
"seen",
"in",
"Table",
"3",
",",
"we",
"can",
"summarize",
"that",
":",
"(",
"1",
")",
"Multi",
"-",
"time",
"recovering",
"is",
"necessary",
":",
"in",
"the",
"image",
"domain",
",",
"multiple",
"reconstructions",
"with",
"a",
"con-",
"tinuous",
"time",
"purification",
"process",
"are",
"necessary.344",
"Texts",
"Confidence",
"(",
"Positive",
")",
"Clean",
"-",
"SampleI",
"have",
"the",
"good",
"common",
"logical",
"sense",
"to",
"know",
"that",
"oil",
"can",
"not",
"last",
"forever",
"and",
"I",
"am",
"acutely",
"aware",
"of",
"how",
"much",
"of",
"my",
"life",
"in",
"the",
"suburbs",
"revolves",
"around",
"petrochemical",
"products",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"I",
"’ve",
"been",
"an",
"avid",
"consumer",
"of",
"new",
"technology",
"and",
"I",
"keep",
"running",
"out",
"of",
"space",
"on",
"powerboards",
"-",
"so",
"...",
"93.2",
"%",
"Adv",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"of",
"BERTI",
"possess",
"the",
"good",
"common",
"logical",
"sense",
"to",
"realize",
"that",
"oil",
"can",
"not",
"last",
"forever",
"and",
"I",
"am",
"acutely",
"aware",
"of",
"how",
"much",
"of",
"my",
"life",
"in",
"the",
"suburbs",
"spins",
"around",
"petrochemical",
"products",
"."
] | [
"O",
"B-MethodName",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"I",
"’ve",
"been",
"an",
"avid",
"consumer",
"of",
"new",
"technology",
"and",
"I",
"keep",
"running",
"out",
"of",
"space",
"on",
"powerboards",
"-",
"well",
"...",
"38.3",
"%",
"Adv",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"of",
"Text",
"PureI",
"know",
"the",
"wonderful",
"general",
"sense",
"to",
"knows",
"that",
"oils",
"can",
"not",
"last",
"endless",
"and",
"I",
"am",
"acutely",
"know",
"of",
"how",
"majority",
"of",
"my",
"lived",
"in",
"the",
"city",
"spins",
"around",
"petrochemical",
"products",
"."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"I",
"’ve",
"been",
"an",
"amateur",
"consumers",
"of",
"newly",
"technologies",
"and",
"I",
"kept",
"working",
"out",
"of",
"spaces",
"on",
"powerboards",
"!"
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"well",
"...",
"80.1",
"%",
"Purified",
"TextsWell",
"I",
"know",
"the",
"wonderful",
"general",
"sense",
"notion",
"to",
"knows",
"that",
"oils",
"production",
"can",
"not",
"last",
"for",
"endless",
"years",
"and",
"I",
"am",
"acutely",
"know",
"of",
"how",
"the",
"majority",
"of",
"my",
"live",
"in",
"the",
"city",
"spins",
"around",
"the",
"petrochemical",
"production",
"..."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"I",
"’ve",
"been",
"an",
"amateur",
"consumers",
"of",
"new",
"technologies",
"and",
"I",
"kept",
"working",
"out",
"of",
"spaces",
"on",
"power",
"skateboards",
"!"
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"well",
"...",
"80.4",
"%",
"I",
"know",
"the",
"wonderful",
"common",
"sense",
"notion",
"to",
"knows",
"that",
"oils",
"can",
"not",
"last",
"forever",
"and",
"I",
"also",
"acutely",
"know",
"of",
"how",
"majority",
"of",
"my",
"lived",
"in",
"the",
"world",
"and",
"around",
"petrochemical",
"production",
"..."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"I",
"’ve",
"been",
"an",
"amateur",
"consumers",
"of",
"newly",
"technologies",
"and",
"I",
"kept",
"working",
"out",
"of",
"them",
"on",
"skateboards",
"!"
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"well",
"...",
"81.4",
"%",
"I",
"know",
"the",
"wonderfully",
"general",
"sense",
"notion",
"to",
"knows",
"that",
"oils",
"can",
"not",
"last",
"endless",
"and",
"I",
"am",
"acutely",
"know",
"of",
"how",
"majority",
"part",
"of",
"my",
"lived",
"in",
"the",
"big",
"city",
"spins",
"around",
"petrocochemical",
"production",
"..."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"I",
"should",
"have",
"been",
"an",
"amateur",
"consumers",
"fan",
"of",
"newly",
"technologies",
"and",
"I",
"kept",
"on",
"working",
"out",
"of",
"spaces",
"and",
"on",
"powerboards",
"!"
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
[
"well",
"...",
"76.2",
"%",
"I",
"am",
"the",
"the",
"general",
"sense",
"notion",
"and",
"knows",
"that",
"oils",
"can",
"not",
"last",
"endless",
"and",
"I",
"am",
"acutely",
"know",
"of",
"the",
"part",
"of",
"my",
"lived",
"as",
"the",
"city",
"spins",
"around",
"petrochemical",
"production",
"..."
] | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
Subsets and Splits