{"id":171327,"date":"2024-03-12T10:17:13","date_gmt":"2024-03-12T09:17:13","guid":{"rendered":"https:\/\/liora.io\/en\/?p=171327"},"modified":"2026-02-12T11:41:16","modified_gmt":"2026-02-12T10:41:16","slug":"adversarial-training-what-you-didnt-know-yet","status":"publish","type":"post","link":"https:\/\/liora.io\/en\/adversarial-training-what-you-didnt-know-yet","title":{"rendered":"Adversarial Training: What you didn&#8217;t know yet"},"content":{"rendered":"\n<p><strong>Adversarial Training: Since the 2010s, thanks to advances in Machine Learning, especially Deep Learning with deep neural networks, errors have become increasingly rare. Today, they are even very exceptional. However, these models sometimes still make mistakes, without researchers succeeding in developing effective defense systems.<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/liora.io\/en\/adversarial-examples-definition-and-importance-in-machine-learning\">Adversarial Examples<strong>,<\/strong> or contradictory examples,<\/a> are among those inputs that the model misclassifies. Faced with this, a defense technique called Adversarial Training has been developed. But how does this defense technique work? Is it really effective?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-an-adversarial-example\">What is an Adversarial Example?<\/h2>\n\n\n\n<p>Adversarial Training is a technique that has been<a href=\"https:\/\/liora.io\/en\/gan-machine-learning-putting-fictitious-faces-into-practice\"> developed to protect Machine Learning models<\/a> from Adversarial Examples. Let&#8217;s briefly recall what Adversarial Examples are. These are inputs that are very slightly and cleverly perturbed (such as an image, text, or sound) in a way that is imperceptible to humans but will be<a href=\"https:\/\/liora.io\/en\/unlock-your-future-dive-into-machine-learning-engineer-training\"> misclassified by a machine learning model.<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\" style=\"margin-top:var(--wp--preset--spacing--columns);margin-bottom:var(--wp--preset--spacing--columns)\"><a href=\"https:\/\/openai.com\/blog\/adversarial-example-research\/\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/sites\/9\/2023\/09\/unnamed-1.png\" alt=\"\" style=\"width:1000px;height:auto\" \/><\/a><\/figure>\n\n\n\n<p>What is <strong>astonishing about these attacks<\/strong> is the model&#8217;s confidence in its incorrect prediction. The example above illustrates this well: while the model only has a confidence rate of 57.7% for the correct prediction, it will exhibit a very high confidence rate of 99.3% for the incorrect prediction.<\/p>\n\n\n\n<p>These attacks are very problematic. For example, an article published in Science in 2019 by researchers from Harvard and MIT demonstrates how medical AI systems could be vulnerable to adversarial attacks. That&#8217;s why it&#8217;s necessary to defend against them. This is where<strong> Adversarial Training<\/strong> comes in. It, along with &#8216;Defensive Distillation,&#8217; is the primary technique to protect against these attacks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-does-adversarial-training-work\">How does Adversarial Training work?<\/h2>\n\n\n\n<p>How does this technique work? It involves retraining the Machine Learning model with numerous Adversarial Examples. Indeed, during the training phase of a predictive model, if the input is misclassified by the <a href=\"https:\/\/liora.io\/en\/machine-learning-what-is-it-and-why-does-it-change-the-world\">Machine Learning model,<\/a> the algorithm learns from its mistakes and adjusts its parameters to avoid making them again.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\" style=\"margin-top:var(--wp--preset--spacing--columns);margin-bottom:var(--wp--preset--spacing--columns)\"><a href=\"https:\/\/www.futura-sciences.com\/tech\/definitions\/intelligence-artificielle-deep-learning-17262\/\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/sites\/9\/2023\/09\/unnamed-1.jpeg\" alt=\"\" style=\"width:1000px;height:auto\" \/><\/a><\/figure>\n\n\n\n<p>Thus, after initially training the model, the model&#8217;s creators generate numerous<strong> Adversarial Examples.<\/strong> They expose their own model to these contradictory examples to prevent it from making these mistakes again. While this method defends <a href=\"https:\/\/liora.io\/en\/tensor-flow-all-about-googles-machine-learning-framework\">Machine Learning models<\/a> against some Adversarial Examples, does it generalize the model&#8217;s robustness to all Adversarial Examples? The answer is no. This approach is generally insufficient to stop all attacks because the range of possible attacks is too wide and cannot be generated in advance. Thus, it often becomes a race between hackers generating new adversarial examples and designers protecting against them as quickly as possible.<\/p>\n\n\n\n<p>In a more general sense, it is very difficult to protect models against adversarial examples because it is nearly impossible to construct a theoretical model of how these examples are created. It would involve <strong>solving particularly complex optimization problems<\/strong>, and we do not have the necessary theoretical tools. All strategies tested so far fail because they are not adaptive: they may block one type of attack but leave another vulnerability open to an attacker who knows the defense used. Designing a defense capable of protecting against a powerful and adaptive attacker is an <strong>important research area.<\/strong><\/p>\n\n\n\n<p>In conclusion, <strong>Adversarial Training generally fails to protect Machine Learning<\/strong> models against Adversarial Attacks. If we were to highlight one reason, it&#8217;s because this technique provides defense against a specific set of attacks without achieving a generalized method. Do you want to learn more about the challenges of artificial intelligence? Interested in mastering the <a href=\"https:\/\/liora.io\/en\/all-about-deep-learning\">Deep Learning techniques<\/a> discussed in this article? Find out about our Machine Learning Engineer training.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center wp-container-core-buttons-is-layout-a89b3969\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/liora.io\/en\/courses\/data-ai\/data-engineer\">Become a Machine Learning Engineer<\/a><\/div>\n<\/div>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What is an Adversarial Example?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Adversarial Examples are inputs that have been slightly and cleverly perturbed in ways imperceptible to humans but cause a machine learning model to misclassify them with high confidence.\u00a0([turn0view0][turn0search8])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How does Adversarial Training work?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Adversarial Training works by retraining a machine learning model on both original and adversarially perturbed examples so the model learns from its errors and adjusts its parameters to reduce vulnerability to these attacks.\u00a0([turn0view0][turn0search8])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Does Adversarial Training make models fully robust?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"No \u2014 while Adversarial Training can help defend against specific adversarial examples used during training, it generally cannot guarantee robustness against all possible adversarial attacks due to the vast range of potential perturbations.\u00a0([turn0view0][turn0search5])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Why are adversarial attacks a concern in machine learning?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Adversarial attacks are concerning because even tiny perturbations to input data \u2014 often imperceptible to humans \u2014 can cause models to make highly confident incorrect predictions, which poses risks in safety\u2011critical applications.\u00a0([turn0search8])\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What are the limitations of Adversarial Training?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"A key limitation of Adversarial Training is that it tends to defend only against known adversarial examples and may struggle to generalize to unseen perturbations, making complete robustness difficult to achieve.\u00a0([turn0search5])\"\n      }\n    }\n  ]\n}\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Adversarial Training: Since the 2010s, thanks to advances in Machine Learning, especially Deep Learning with deep neural networks, errors have become increasingly rare. Today, they are even very exceptional. However, these models sometimes still make mistakes, without researchers succeeding in developing effective defense systems. Adversarial Examples, or contradictory examples, are among those inputs that the [&hellip;]<\/p>\n","protected":false},"author":82,"featured_media":171329,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"editor_notices":[],"footnotes":""},"categories":[2433],"class_list":["post-171327","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-ai"],"acf":[],"_links":{"self":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/171327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/comments?post=171327"}],"version-history":[{"count":3,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/171327\/revisions"}],"predecessor-version":[{"id":206586,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/171327\/revisions\/206586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media\/171329"}],"wp:attachment":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media?parent=171327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/categories?post=171327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}