782 points · by singularity2001 · 8y ago · 223 comments
"In this work, we show that, contrary to expectations, a great deal of image statistics are captured by the structure of a convolutional image generator rather than by any learned capability. This is particularly true for the statistics required to solve various image restoration problems, where the image prior is required to integrate information lost in the degradation processes.
To show this, we apply untrained ConvNets to the solution of several such problems. Instead of following the common paradigm of training a ConvNet on a large dataset of example images, we fit a generator network to a single degraded image. In this scheme, the network weights serve as a parametrization of the restored image. The weights are randomly initialized and fitted to maximize their likelihood given a specific degraded image and a task-dependent observation model.
We show that this very simple formulation is very competitive for standard image processing problems such as denoising, inpainting and super-resolution. This is particularly remarkable because no aspect of the network is learned from data; instead, the weights of the network are always randomly initialized, so that the only prior information is in the structure of the network itself. To the best of our knowledge, this is the first study that directly investigates the prior captured by deep convolutional generative networks independently of learning the network parameters from images."
PS. This makes me wonder whether and to what degree the structure of the brain's connectome might be a necessary prior for AGI.
In my view this also sheds some light on the GAN's and their ability to generate "real looking images". Perhaps there is much less to generating "real looking images" then everyone attributes. E.g. in this work, the network clearly knows exactly nothing about the world and generates good looking in-paint.
Well, except the network structure itself.
I've seen an analogy in hardware that is potentially interesting to explore.
There is a technique in A/D converters (ADC) where input signal noise can be reduced by RMS averaging the sequence of digital outputs. This increases the effective resolution of the ADC, while lowering the effective sampling frequency of the input signal.
In the case that the input noise of a precision ADC is very low, the digital averaging has no effect on effective resolution. Surprisingly, in this case you can actually inject a "hand-crafted" noise source into the input, and still realize the resolution improvements from digital averaging. The key is to find the right amount of noise to randomize the quantization noise.
In the case of the ADC, the structure of the quantizing hardware is known, as is the characteristics of quantization noise. This allows for a guassian noise to be injected with the input source (might be analogous to a "prior"). From there, one can balance the input injection noise with the output digital averaging to get an optimal increase in output resolution.
This technique is explained well in this paper: http://www.analog.com/en/analog-dialogue/articles/adc-input-...
Fractal image compression is inherently pretty simple in concept: Find portions of the image that are similar to transformed other portions of the image. Store the things needed to transform one portion into the other, and patch together enough of those to cover the whole thing. Then you can throw out the image itself. You only need the ways in which the parts can be transformed into the others (affine transformations along with brightness/contrast shifts usually). Once you have those, you can literally start with _any_ source image and iterating the application of the transformations are guaranteed to result in something very close to the original image.
A CNN 'rediscovering' this technique feels intuitively like a very natural thing to occur, and the iterative images presented there smack of early iterations of a fractal image 'decoding' from a blank source image. The connection, of course, could be utterly specious and I am just guessing. I am intrigued, however, as I've been wanting to investigate using deep learning to perform VHS video capture cleanup as a side project for awhile now.
At least a "learned", context-aware approach can prevent this from happening in theory.
But as a brush in a photo editor program it would be great. Then a used can 'mark' what areas need to be smoothed and the result will be great.
> This makes me wonder whether and to what degree the structure of the brain's connectome might be a necessary prior for AGI.
Convnets have been invented to speed up learning (reusing parameters). The human brain (afaik) doesn't contain such speedup. Instead it relies on massive parallellism of neurons, and thus trains all "filters" separately instead of reusing them. Therefore, I suppose this approach would not apply to humans.
Convnets are a method to speed up learning by sharing filter-coefficients. In other words, one could just as well train the network by replacing the convnets by fully-connected layers, except that of course training would take a lot longer.
If one views convnets as purely a computational optimization, then the approach of the paper can be considered a "hack" that only works because of this optimization.
network = new NeuralNetwork()
targetOutput = readFile('./images/zebra-500x500-corrupted.jpg')
input = generateNoise(500, 500)
while(iterationCount < overfitThreshold) {
networkOutput = network.getOutput(input)
loss = getLoss(targetOutput, networkOutput)
network.backPropogate(loss)
iterationCount++
}
writeFile('./images/zebra-500x500-denoised.jpg', networkOutput)I'll try.
Instead of the common approach that tries to search for image pixels to minimize e.g. a denoising objective, they realize that they can instead search for the weights of an image generator network such that the generated image matches the objective.
They argue that the structure of the network then constitutes some prior knowledge over what a natural image should look like.
My (probably wrong) interpretation: since a convolutional neural network essentially works by looking for some spatial patterns at different resolutions, their optimization process boils down to finding the high and mid-resolution patterns that best match the input image, and then re-using that information to fill in the missing information (or replacing "noise" that does not match the extracted pattern).
This means that for these problems the solution is encoded entirely in the network structure and not the weights.
We could use linear regression as an analogy: y = b f(x).
This is akin to saying that for some class of problems, it's the case that you can get as good of a solution from the function you pick alone (x^2, log(x)) as you could from picking a function and then computing the best coefficient. Note this isn't true for linear regression for any meaningful problems, but I feel like it's a decent analogy.
Well, I wouldn't mix up AGI and AGI by deep learning, and more important I would emphasise that this is a good prior for images. The fundamental insight in CNNs and eventually in this work is that there is a correlation between pairs of nearby pixels. We have something similar for video and audio processing, but nothing remotely similar for other more abstract intelligence tasks.
I do not think intelligence is a consequence of structure. Transparency is a consequence of how light interacts with objects. There is no "transparent gold". And being transparent is not something we can program gold to do.
Programming is the application of an electric field across a silicon surface: this can no more transmute silicon into gold as it can into a nervous system.
Consciousness is a biological activity. It is not something wood, silicon, sand, metal, glass, water, etc. can do by virtue of moving around in an interesting pattern. To me, this is akin to believing magic, or to thinking that the issue with Bug's Bunny's consciousness is that the ink wasnt laid out in the right way. Rather, there isnt any.
As scientists we should begin very clearly by identifying the target phenomenon. Line up everything in the known universe that is conscious and you will find that it engages in a highly specific biochemical activity that requires a whole set of highly specific chemical interactions.
To believe these can be achieved by applying an electric field across some silicon seems like the victorian superstition that a person could be raised from the dead by doing likewise.
Rather, all we are able to do is imitate in the weakest sense. People fooled by chatbots are no more enlightened than the early victorians who were shocked to watch the movie of a train coming at them. Fooling people is a very easy thing to do. And esp. in the area of consciousness when "alertness to things that might be conscious" seems a deep psychological preoccupation of almost every animal to the point of absurdity (eg. being scared at the wind).
In the first category (empirical evidence),
- The discrete leap from non-LSTM RNN to LSTM network performance on NLP was essentially due to a "better factoring of the problem": breaking out the primitive operations that equate to an RNN having "memory" had a substantial effect on how well it "remembered."
- The leap in NMT from LSTM seq2seq to attention-based methods (the Transformer by Google) is another example. Long-distance correlations made yet another leap because they are simply modeled more directly by the architecture than in the LSTM.
- The relation network by DeepMind is another excellent example of a drop-in, "pure" architectural intuition-motivated replacement that increased accuracy from the 66% range to the 90% range on various tasks. Again, this was through directly modeling and weight-tying relation vectors through the architecture of the network.
- The capsule network for image recognition is yet another example. By shifting the focus of the architecture from arbitrarily guaranteeing only positional invariance to guaranteeing other sorts, the network was able to do much better at overlapping MNIST. Again, a better factoring of the problem.
These developments all illustrate that picking the architecture and the numerical guarantees baked into the "factoring" of the architecture (for example, weight tying, orthogonality, invariance, etc.) can have and has had a profound effect on performance. There is no reason to believe this trend won't continue.
In fact, there are some very interesting ways to think about the principles behind network structure -- I can't say for sure that it has any predictive power yet, but types are one intuitively appealing way to look at it: http://colah.github.io/posts/2015-09-NN-Types-FP/
Unfortunately there is no reason to think that you can substract the 'in a body living in a world we recognize' part and end up with anything like the same property. All those associations come from perceptive inputs, and result in motive outputs, with the biofeedback that occurs being of profoundly fundamental importance (heck, put a pen in your mouth which causes your mouth to 'smile' and you will 'feel happier'). While of course there is definitely a possibility that a machine-based intelligence could be conscious, it would doubtless have to be very different from anything we could recognize, derived as it would be from its own input, output, and the feedback between the two.
I don't think you can do other things like labeling by using the same method
> contrary to expectations,
ingore the weasel words
> a great deal of image statistics are captured by the structure of a convolutional image generator rather than by any learned capability.
> To show this, we apply untrained ConvNets to the solution of several such problems. Instead of following the common paradigm of training a ConvNet on a large dataset of example images, we fit a generator network to a single degraded image.
How is that _untrained_, if they are training it on an image? Is a generator network different from a ConvNet?
> This is particularly remarkable because no aspect of the network is learned from data;
but they just said "we fit a generator network to a single degraded image"
As others have commented, they appear to be training on all the parts of a single complex image, and using that training to repair local deviations from the global average. This may be better than classical denoising algorithms because the NN can model the image structure better than other approaches, but this doesn't seem like a novel use of NNs.
David Mumford particularly did some great work on this sort of thing a couple of decades ago, along with many others. I hope when people are rushing around trying to apply convolutional nets to everything they aren't losing these insights.
This paper is pointing out that you can encode a structural prior in a CNN - but knowing the "great old techniques" will help you design the right network architecture to do that.
SVMs were a surprise when they came out, no so much a generalization as a challenge (at least at first)
This approach takes other photos of the same scene to extend a cropped pic (see also MS PhotoSynth): http://grail.cs.washington.edu/projects/sq_photo_uncrop/
This uses a GAN to fill in missing parts of a pic. Those parts could be on the edge of the picture (although the paper doesn't explore that): http://hi.cs.waseda.ac.jp/~iizuka/projects/completion/data/c...
http://graphics.cs.cmu.edu/people/efros/research/EfrosLeung....
Note also that this finding strongly suggests that neural net architecture actually is quite important, possibly even more important than having more data -- which contradicts the conventional wisdom!
A typical toddler (say 12 months' old) has spent 4000-5000 hours with open eyes. Even if you assume a low frame rate (10fps), resolution (1080p), and a 1000:1 compression ratio, that's still 1TB of training data.
So what makes this result possible is not the architecture of NN in CNN but rather architecture of C. That allows us to get multiple samples from single image. The rest is just that actual content of the image is easier to learn then the noise.
Brain is almost nothing like CNN.
Also why most papers in deep learning are network architecture innovation.
The filters learned by the first layer of CNNs is usually of the same type, Gabor filters. Not a coincidence.
That was twenty years ago. What's old is new?
It seems that the current accepted method is to train a network with distorted images as the input and the correct undistorted images as the targets. Then after training you can feed a new distorted image into the trained network and get the estimated "fixed" image.
However this team actually uses the distorted image as both the input and the target to the net. So if they were to let the training go on for too long the network will produce an exact copy of the distorted input image. But for some reason, the structure of the network means that the estimated output learns realistic features first, and then overfits to the noise afterwords. So if you stop the training early, you get an image that incorporates realistic features from the distorted image, but hasn't had time to "learn" the noisy features.
It won't. The objective (min (E(x, x0) + R(x)) they are trying to optimize (over output images x) amounts to a combination of:
- The output image x should "look like" the input image x0, this is the error term E(x, x0);
- The output image x should be "regular", this is the regularization term R(x).
The latter term prevents overfitting: R should be chosen such that noisy images for example are considered irregular (high R(x)).
But w.r.t. the regularization term, what I thought they meant by "we replace the regularizer R(x) with the implicit prior captured by the neural network" at the end of pg 2 was that they let the natural behavior of a neural network during optimization serve as the regularization, without need for an explicit regularization term. Not entirely sure though.
Why does this happen? What characteristics does the network structure have that cause this effect?
At first, I thought the machine learning algorithm was able to just bridge the gap in images from nothing...
CSI time: Enhance ... enhance... enhance!
So in this paper, they carefully chose a certain structure, set the weights randomly, and then what happened after that? I understand that they did not then train it with a training data set, but I'm not quite getting what they did with the single distorted image.
So by structure you should also include the demand that the prediction of any NxN patch of the image should be roughly equal to the prediction of any other NxN patch of the image.
Do they run some kind of optimizer to learn the optimal CNN structure or does some person sit down and pick structures to include in it?
Meaning number of hidden layers, nodes per layer, and their connectivity with each other and with the input and output layers?
I wonder if anyone has looked at what Mumford-Shaw implications would look like projected onto a CNN?
Sussman attains enlightenment
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky.
“I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied.
“Why is the net wired randomly?”, asked Minsky.
“I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes.
“Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.
The gist as I remember it was that he theorized that the cortex is composed of assemblies of neurons formed in development (in the womb, potentially with epi-genetic factors). Each assembly, just by chance of it's structure, is likely good at something. Over time, assemblies take up the tasks they happen to be good at and further specialize with experience.
Basically, a generator neural network has two things which affect its output: an input and some parameters (weights).
Let's use the setting of the task for denoising images. They use a network who's output is to is the denoised image, and compare it to the noisy image to get a score for how good the denoised output was.
Now the strange thing is, for the input of the network, they just use random garbage. The only thing they move around to try get a good denoising score are the parameters of the network (not the input).
They find that by only adjusting the parameters, even with fixed random crap inputs, if they find the parameter setting which minimizes the noise, they actually still get great looking results.
This suggests that the networks they tested this method with (other researchers work who do well on this task) are based much more in the inherent structure of the network, rather than the model refinement from training on thousands of images, since even given random crap, they generates good results, as long as the parameters are tuned well to the noisy image.
min_x E(x; x0) + R(x)
mean?I thought that E(x; x0) would denote the error/difference between original and corrupted images, and R(x) be the (searched-for) correction. But this doesn't seem to make sense with the next parts of their explanation.
R(x) is a regularization term to avoid overfitting. For example, in the denoising example, it could be a measure of the variation in color of x. Clearly, just taking x = x0, the squared error (E(x; x0)) is 0, but it will have high R(x) because of all the noise. That's why they try to minimize both quantities combined, so we get min_x E(x; x0) + R(x), to get close to the objective but also not overfit.
and they pose x = f_theta(z), where f_theta is a neural net.
So they can avoid overfitting by stopping the training at the right moment.
So they're not really trying to minimize E(x, x0), but rather to get a small enough value, so that they obtain good results. A too small value means overfitting.
Seems impossible that it guesses correctly.
Why doesn’t it paint everything white? Are these actually transparent images or are they somehow tagged?
[0]https://helpx.adobe.com/photoshop/using/content-aware-patch-...
The idea of not running the simulation `past` the realistic interpretation and using that result makes sense but the results are way beyond what I would have expected!
Great work on the write up.
Very cool work though.
I'm assuming that this impressive feat has a disadvantage (over the traditional example intensive technique of training a CNN with something like ImageNet) in the form of taking a long time to generate the corrected image.
With that assumption in mind, could this new technique be reversed? As in feeding in sharp images, getting back out corrupted ones, for the purposes of generating data sets where there isn't much data to begin with?
You could then take that data and use it to train a more traditional CNN to sort of amortize the results of the technique in the paper and have the process happening faster.
https://en.m.wikipedia.org/wiki/Generative_adversarial_netwo...
Is that correct?
I haven't read the paper yet but it seems to me that it shows you can use overfitting for output interpolation with great results.
Same should be possibile for example for interpolation of video images instead od pixels.
Recursive geometric patterns perhaps?
I suppose this is no different really than the extent to which images are edited anyway now, in that many images are never really a fastidiously accurate representation of the original scene, but interesting to consider none the less.
So, the novel thing here is that an encoder-decoder network applied to an image can learn enough from a source image to be useful. In some ways that's obvious, but the effectiveness of it on reconstruction tasks is certainly surprising.
I have two problems, though. One is that I would take the reconstruction results with a grain of salt. The examples are clearly lab queens, where the occluded regions are not particularly interesting/challenging.
Two is the conclusion the authors reach. Somehow the authors go from the novel discovery I describe above, to saying that somehow the architecture of the network is a prior.
Well ... I mean, yeah a network's architecture _is_ a prior. But it's not actually significant.
See, in the dark ages of machine learning we had only fully connected networks. They sucked. They'd always overfit and underperform or were impossible to train. Then we finally got convolutional networks, and suddenly a whole slew of machine learning problems became easier and that hurdled us into the current renaissance.
But, you see, convolutional networks weren't the _only_ reason for the dawn of this new age. Rather it was three major things: 1) Convolutional layers, 2) more data, 3) more computing power.
Some time after the "discovery" of convolutional layers we found out that, hey, our old fully connected networks actually _do_ work. If you give them enough data and enough computational power, you can get them to perform as well as state of the art convolution networks. The great thing about fully connected networks is that they assume nothing. That means A) you can theoretically get better results and B) you don't have to spend time designing an architecture.
So we already know that architecture isn't ultimately important. You can have a giant, fully connected network, and it _will_ work, if you feed it enough data and have the computational power necessary to train such a beast.
Convolutional layers are just simplifications which make training easier. They are priors in the sense that we know a fully connected layer in image applications would just devolve into a convolutional layer anyway, so we might as well start with a convolution layer. That "design" is the prior. But it's not mandatory; the network would still function without that "prior".
So ... I'm not sure how the authors are taking their research and using it to come to the conclusion that their results are because of some magical property imbued into the network by the "priors" of the architecture.
They apparently tried other architectures and got poor results, and so they use that to claim that architecture is the only reason their technique works.
That's like if you started with ResNet for a classification problem, tried other architectures, saw that they performed worse, and then published a paper saying that Residual Networks somehow embody the fundamental forces of natural images in their architecture, and that's why they work. When the truth is that ResNets aren't special, they are just easier to train.
Another example from the annals of machine learning history: time and time again when there is a breakthrough in architectures, it's usually followed a few years later by a simplification of the architecture. For example we started with networks like VGG which are these big, hand crafted architectures. Slowly over time architectures have become _less_ exotic, instead opting to simply define a basic building block repeated N times.
The reason for this is because in the intervening years we gather more training data, better training techniques, and more computational power. So we can instead use a more homogeneous architecture which has _less_ assumptions (less priors) and at the end of the day we get _better_ results.
I'll repeat that. We put _less_ priors into our networks and we get better results.
So on the one hand we have _all_ of machine learning history telling us that priors in architectures are _bad_. On the other hand we have this paper which makes some really weird logical leap from "we tried a few architectures, they were worse, so architecture is _key_ to machine learning and it's important because we need good priors built into the architecture."
Anyone remember hand crafted feature vectors? I do. Those were priors. Guess what happened when we got rid of them and used generic networks feeding directly from the raw data? Oh right, all of modern machine learning...
As far as I know this is incorrect. Can you point to a paper that shows this? If by "easier to train" you mean that the models do not overfit training data, then that's the whole point of using correct priors / hypothesis classes.
I'm not sure what bugs you in this paper, but the point is that they decouple the prior architecture from the training/optimization mechanism, and that seems interesting.
>The reason for this is because in the intervening years we gather more training data, better training techniques, and more computational power. So we can instead use a more homogeneous architecture which has _less_ assumptions (less priors) and at the end of the day we get _better_ results.
>I'll repeat that. We put _less_ priors into our networks and we get better results.
Is move from VGG-like architectures a question of moving to using less priors or just move to different priors that work better?
In addition, I'd claim that a choice of training method also imbues the whole ML system with prior knowledge. If we add a dropout layer, we wish to enforce a particular regularization scheme on the model because we know that we need to regularize to model to avoid overfitting. If we choose to use a particular optimizer instead of another, we use it because we know it has desirable properties on particular objective objection.
>So we already know that architecture isn't ultimately important. You can have a giant, fully connected network, and it _will_ work, if you feed it enough data and have the computational power necessary to train such a beast.
I'm slightly unclear about your argument here. What is the point of training the fully connected network for a long time and with massive datasets to get equivalent results and structure as convnets if we already do know that convolutional structure with weight sharing is a good fit for natural images? Deep learning has been casted as a magical black box that produces impressive results "yet the scientists don't know why!" by the press. On the contrary, these results suggest there might be less magic in neural net models as the recent hype would suggest.
> The examples are clearly lab queens, where the occluded regions are not particularly interesting/challenging.
To me they look quite like the standard examples used in inpainting and denoising articles.
Let's say you want to start a war, and need some evidence of chemical weapons. Now, you can drop in some images of chemical weapons and claim a GAN found them. Sample press releases:
"We believe this photo was retouched to hide the chemical weapons. Using a GAN, we recovered clear photographic proof of the chemical weapons."
"We believe they are using this tin-roofed building to hide the chemical weapons. Using a GAN on our own satellite images, we recovered clear photographic proof of the chemical weapons."
The technique outlined above is useful because we as humans can eyeball the results and say "the improvement on that blurry zebra photo is great!", but we know that it's an improvement based on a networks hueristics that's good enough for us, not an exact replica of the information lost through noise and compression.