反转神经网络的目标

Inversing the goal of neural networks

我正在研究神经网络,或者更具体地说,目前正在研究图像 class化。当我阅读时,我想知道以下是否已经完成/是否可行。如果有人能指出一些来源或想法,我将不胜感激!

在传统的神经网络中,您有图像的训练数据集和网络中神经元的权重。目标是优化权重,以便 class 图像化对于训练数据是准确的,并且新图像尽可能好。

我想知道你是否可以扭转这一局面: 给定一个神经网络及其神经元的权重,生成一组与网络分离的 classes 相对应的图像,即该特定网络能够 [=25] 的图像类型的原型=]很好地证明。

在我看来,它会按如下方式工作(我确信这不太可能实现,但只是为了让大家理解这个想法): 想象一个神经网络能够 class 化包含标签猫、狗和两者都不包含的图像。 我想要的是 "inverse",即一张猫的图像,一张狗的图像和一张 "furthest away" 来自其他两个 classes 的图像。 我认为这可以通过生成图像并最小化一个特定 class 的损失函数,同时最大化所有其他 classes 的损失函数来完成。

Deep Dream 就是这样Google形象化的"dreaming"吗?

我希望你明白我的意思,如果没有我会回答任何问题。

Is this kind of how Google Deep Dream visualizes what it is "dreaming"?

差不多,看起来,至少它背后的人是这样解释的:

One way to visualize what goes on [in a neural network layer] is to turn the network upside down and ask it to enhance an input image in such a way as to elicit a particular interpretation. Say you want to know what sort of image would result in “Banana.” Start with an image full of random noise, then gradually tweak the image towards what the neural net considers a banana (see related work [...]). By itself, that doesn’t work very well, but it does if we impose a prior constraint that the image should have similar statistics to natural images, such as neighboring pixels needing to be correlated.

Source - 整个博客 post 值得一读。

我想你可以从Karpathy的博客中了解主流的做法: http://karpathy.github.io/2015/03/30/breaking-convnets/

普通 ConvNet 训练:"What happens to the score of the correct class when I wiggle this parameter?"

创建欺骗图像:"What happens to the score of (whatever class you want) when I wiggle this pixel?"

用图像愚弄分类器与您的要求非常接近。为了您的目标,您需要为损失函数添加一些正则化以避免完全误导的结果 - 绝对最小损失可能是非常扭曲的图片。