欺骗神经网络

Well not that I would like to mock AI more given we all may be slave to the mighty Skynet one day, I came across a method to generate an adversarial example using Fast Gradient Signed Method (FGSM) attack described in Explaining and Harnessing Adversarial Examples by Goodfellow et al. We are going to see the first and one of the most famous attacks.

远的不说,我想嘲笑AI更给予我们都可能是从威猛天网有一天,我碰到一个方法来使用快速梯度签名法(FGSM)攻击产生敌对例子说明解释和治理对抗式的例子由Goodfellow 等。 我们将看到第一个也是最著名的攻击。

让我们从对抗示例开始。 (Let’s begin with Adversarial Example..)

Machine learning models, including state-of-the-art neural networks, are vulnerable to adversarial examples. That is, these machine learning models mis-classify examples that are only slightly different from correctly classified examples drawn from the data distribution.

机器学习模型(包括最新的神经网络)容易受到对抗性示例的攻击。 也就是说,这些机器学习模型对示例进行了错误分类,这些示例与从数据分布中得出的正确分类的示例仅稍有不同。

These examples are created with a purpose for a network to misclassify. They are indistinguishable to Human eye, but a neural network fails to classify them. As you can see in the above figure, we started with a picture of labrador with a confidence of 41%. Upon adding some noise, our predictions moved to Saluki. These noise are known as perturbations. We are going to use Fast Gradient Signed Method (FGSM)

创建这些示例的目的是使网络分类错误。 它们对于人眼是无法区分的,但是神经网络无法对它们进行分类。 如上图所示,我们从拉布拉多的图片开始,置信度为41%。 添加一些噪音后,我们的预测转移到了Saluki。 这些噪声被称为扰动 。 我们将使用快速渐变符号方法(FGSM)

但是首先,什么是快速梯度签名方法(FGSM)? (But First, What is Fast Gradient Signed Method (FGSM)?)

The fast gradient sign method works by using the gradients of the neural network to create an adversarial example. For an input image, the method uses the gradients of the loss with respect to the input image to create a new image that maximizes the loss. This new image is called the adversarial image. we can summarize using the following:

快速梯度符号方法通过使用神经网络的梯度来创建对抗性示例而起作用。 对于输入图像,该方法使用损失相对于输入图像的梯度来创建使损失最大化的新图像。 该新图像称为对抗图像。 我们可以使用以下内容进行总结:

here x is the original image | epsilon is a variable to tune the perturbations | the equation is the gradient of the loss w.r.t. to image
x是原始图片| epsilon是用于微调变量的变量| 方程是损失到图像的梯度

We choose to take gradient w.r.t input as we need to create the image that maximizes the loss. We can see how much each pixel contributes to the loss and use to create perturbation to add to them. This is pretty fast, since we are not training our model. We are just using the gradient to create a new image and predicting again to see the result.

我们选择采用梯度wrt输入,因为我们需要创建最大化损耗的图像。 我们可以看到每个像素对损耗有多大贡献,并使用它们来创建扰动来增加损耗。 这非常快,因为我们没有训练模型。 我们只是使用渐变来创建新图像,然后再次进行预测以查看结果。

因此,让我们开始尝试一下。 (So Let’s start and try fooling one.)

We will try to fool MobileNetV2 model, pretrained on ImageNet. Let’s move ahead with some important modules while implementing this. For source code you can refer here or here.

我们将尝试愚弄ImageNet上预训练的 MobileNetV2模型。 在实现此功能时,让我们继续一些重要的模块。 对于源代码,您可以在这里 这里参考

建立对抗形象 (Creating the Adversarial Image)

We will be needing perturbations to add to image to create one. To get perturbations, we will be using gradients. You can refer to the code below:

我们将需要扰动来添加到图像以创建一个。 为了获得扰动,我们将使用渐变。 您可以参考以下代码:

Implementing discussed strategy to get perturbations
实施讨论的策略以获取干扰

现在,我们将其添加并亲自查看结果 (Now Let’s add these and see for ourselves the result)

The below code is used to add the perturbations to images with various values of epsilon. Read through the code with comments.

以下代码用于将扰动添加到具有各种epsilon值的图像上。 阅读带注释的代码。

We will be getting something as below after running the above piece of code. Remember this does not require training.

运行以上代码后,我们将获得如下内容。 请记住,这不需要培训。

Output for the display image functions
显示图像功能的输出

好吧,那很快… (Okay, That was quick…)

So this was easy and quick to learn and implement. Whole idea was to understand the concept of creating attacks. You can read through various attacks and implement them.

因此,这很容易快速学习和实施。 整个想法是理解创建攻击的概念。 您可以通读并实施各种攻击。

If you have any issues, feel free to drop us a mail or response and We will be glad to help you out.

如果您有任何问题,请随时给我们发送邮件或回复,我们将很高兴为您提供帮助。

翻译自: https://medium.com/thenoobengineer/can-a-neural-network-be-fooled-c75ed37ceb8

欺骗神经网络


http://www.taodudu.cc/news/show-1874023.html

相关文章:

  • 图像增强python_Python图像增强简介(第1部分)
  • jio tomcat_透过Jio Glass看
  • 用于无人驾驶技术的车道线_自动驾驶汽车可用于查找车道的4种技术
  • q-learning_教计算机如何通过Q-Learning玩Snake
  • 深度强化学习从入门到大师_深度学习大师的经验教训
  • 自然语言处理 入门_自然语言处理入门指南
  • 变形金刚图纸_变形金刚救援
  • 传感器数据 数据库_丰富的数据,不良的数据:充分利用传感器
  • 使用高德地图打车软件实现_强化学习:使用Q学习来打车!
  • aws fargate_使用AWS Fargate部署PyCaret和Streamlit应用程序-无服务器基础架构
  • ai-人工智能的本质和未来_带有人工智能的动画电子设备-带来难以想象的结果...
  • 世界第一个聊天机器人源代码_这是世界上第一个“活着”的机器人
  • pytorch深度学习入门_立即学习AI:01 — Pytorch入门
  • 深度学习将灰度图着色_使用DeOldify着色和还原灰度图像和视频
  • 深度神经网络 卷积神经网络_改善深度神经网络
  • 采矿协议_采矿电信产品推荐
  • 机器人控制学习机器编程代码_机器学习正在征服显式编程
  • 强化学习在游戏中的作用_游戏中的强化学习
  • 你在想什么?
  • 如何识别媒体偏见_面部识别,种族偏见和非洲执法
  • openai-gpt_GPT-3 101:简介
  • YOLOv5与Faster RCNN相比。 谁赢?
  • 句子匹配 无监督_在无监督的情况下创建可解释的句子表示形式
  • 科技创新 可持续发展 论坛_可持续发展时间
  • Pareidolia — AI的艺术教学
  • 个性化推荐系统_推荐系统,个性化预测和优点
  • 自己对行业未来发展的认知_我们正在建立的认知未来
  • 汤国安mooc实验数据_用漂亮的汤建立自己的数据集
  • python开发助理s_如何使用Python构建自己的AI个人助理
  • 学习遗忘曲线_级联相关,被遗忘的学习架构

欺骗神经网络_可以欺骗神经网络吗?相关推荐

  1. 多层感知机 深度神经网络_使用深度神经网络和合同感知损失的能源产量预测...

    多层感知机 深度神经网络 in collaboration with Hsu Chung Chuan, Lin Min Htoo, and Quah Jia Yong. 与许忠传,林敏涛和华佳勇合作. ...

  2. 循环神经网络_漫谈循环神经网络:LSTM、GRU

    知乎视频​www.zhihu.com 简单循环神经网络的局限性 循环神经网络横向结构也是借助激活函数进行传递的: 上图是循环神经网络按时间步展开,而如果一次处理的时间步过长,即从左到右的层数很深,那么 ...

  3. 神经网络 卷积神经网络_如何愚弄神经网络?

    神经网络 卷积神经网络 Imagine you're in the year 2050 and you're on your way to work in a self-driving car (pr ...

  4. xml文件 卷积神经网络_理解卷积神经网络中的输入与输出形状(Keras实现)

    即使我们从理论上理解了卷积神经网络,在实际进行将数据拟合到网络时,很多人仍然对其网络的输入和输出形状(shape)感到困惑.本文章将帮助你理解卷积神经网络的输入和输出形状. 让我们看看一个例子.CNN ...

  5. rbf神经网络_基于RBF神经网络的监督控制(09)

    1.RBF监督控制 基于RBF神经网络的监督控制系统,其控制思想是:初始阶段采用PD反馈控制,然后过渡到神经网络控制.在控制过程中,如出现较大的误差,则PD控制起主导作用,神经网络控制起调节作用. 图 ...

  6. 循环神经网络 递归神经网络_了解递归神经网络中的注意力

    循环神经网络 递归神经网络 I recently started a new newsletter focus on AI education. TheSequence is a no-BS( mea ...

  7. hopfileld神经网络_图卷积神经网络

    大概一个月前,老师给我分的方向是图神经网络.研一已经快过完了,我自己还没有确定好自己的研究方向.只知道自己想做技术,但是具体什么技术并没有想法,既然老师给分了这个方向,再加上自身也觉得图神经网络在推荐 ...

  8. 径向基函数神经网络_基于RBF神经网络的网络安全态势感知预测研究

    点击上方"网络空间安全学术期刊"关注我们 基于RBF神经网络的网络安全态势 感知预测研究 钱建, 李思宇 摘要 针对网络安全态势的感知问题,结合巨龙山和者磨山风电场的运行情况,文章 ...

  9. 人工神经网络_用人工神经网络控制猴子大脑,MIT科学家做到了

    机器之心报道 机器之心编辑部 MIT 的三位科学家成功地用自己创建的人工神经网络控制了猴子大脑皮层的神经活动. 三位研究者分别是 MIT 大脑与行为科学系主任 James DiCarlo.MIT 博士 ...

  10. pytorch卷积神经网络_资源|卷积神经网络迁移学习pytorch实战推荐

    点击上方"AI遇见机器学习",选择"星标"公众号 重磅干货,第一时间送达 一.资源简介 这次给大家推荐一篇关于卷积神经网络迁移学习的实战资料,卷积神经网络迁移学 ...

最新文章

  1. html给文字加动态效果,20种配合场景的CSS3鼠标滑过文字动画特效
  2. 有理贝塞尔曲线(Rational Bezier Curves)
  3. HTML5 速查列表
  4. Python 100例(上)
  5. 【ASP.NET开发】.NET三层架构简单解析
  6. log4j2 无日志记录_在Log4j2中更好地执行非日志记录器调用
  7. 使用JSF的面向服务的UI
  8. oracle其他盘添加表空间吗,oracle增加表空间的四种方法
  9. Python工具整合,为程序员和新手准备的 8 大 Python 工具
  10. HDU2159 FATE(二维背包、带限制条件的背包问题)
  11. ubuntu 16.04 x86_64中arm-none-linux-gnueabi-不起作用时的解决方案
  12. Konomi与去中心化借贷协议bZx合作推动DeFi生态发展
  13. mysql的唯一索引UNIQUE
  14. Android ExpandableListView示例教程
  15. matlab 视频制作,利用Matlab制作AVI视频基础教程
  16. 如何利用极致业务基础平台做一个通用企业ERP之十一销售出库单设计
  17. 操作 神通数据库_神通数据库OGDCProvider使用手册.PDF
  18. 【Java8 新特性 3】java8 supplier
  19. 无限条码扫描枪,手机充当扫描器
  20. PMP/高项 05-项目进度管理

热门文章

  1. 兴趣爱好-常用的10种算法
  2. javascript--this机制
  3. sublime 添加 ConvertToUTF-8
  4. table中强制不换行
  5. 2007以学习软件设计开始
  6. Leap 使用注意事项
  7. CHI 2016 2017 Paper Shared Gaze for Remote Collaboration
  8. unity 闪烁的gui button
  9. Unity中的Time
  10. Atitit 图片验证码功能设计文档总结目录1.1. 使用图片验证码img src标签设置图片。。验证码图片有png,jpg,svg等格式。。 11.2. Php png图像 11.3. P