4 ms·
If I am remember correctly, residual layer has form of x+nonlin(Mx+b), not one you provided. I also found (in my "learn DL" experiments) that for ReLU the x -
by thesz 7y ago
If I am remember correctly, residual layer has form of x+nonlin(Mx+b), not one you provided.
I also found (in my "learn DL" experiments) that for ReLU the x - relu(Mx + b) version works better (trains faster and achieves better accuracy).
- sdenton4 7y agoCorrect; the idea is to take Identity + Tweak, so the Relu should hit the 'tweak.'
- srean 7y agoHey sdenton did you work on or publish that harmonic analysis of correlations that you had mentioned long time ago. I am still quite curious about that. If polishing it for ICML etc is too much of a downer, you can upload it to arxiv. I would love to read that.
- sdenton4 7y agoHey, send me an email (should be in my profile, or easy to guess: it's a gmail account) and I'll see what I can dig up. :) I've admittedly been pretty terrible about actually publishing... But definitely have notes and slide decks that could probably be put together into Something.
- bonoboTP 7y agoPlus or minus shouldn't make any difference as long as your input distribution is symmetric around zero. A simple transformation shows you can get the same effect by just flipping the input the output and the weights. The weights are initialized from a symmetric distribution, so the only difference may come from having the input nonevenly distributed around zero. y = x - relu(Mx + b) -y = -x + relu((-M)(-x) + b) y' = x' + relu(M'x' + b) Have you tried normalizing your input to have zero mean?
- thesz 7y agoReLU(-x) is not equal to ReLU(x). The output after ReLU is all non-negatives. So subtraction, actually, does a correction on input. Yes, I tried normalization on input values and normalization and cross-correlation reduction of outputs of affine transformations. They all have separate positive effects on speed of training and final accuracy.
- bonoboTP 7y agoI know relu(-x) is not relu(x). I think the equations I wrote are correct. My point is, your version is not fundamentally different because we can get your effect by using the standard version and flipping the input to the network, the M matrix and then the output will come out with the sign flipped as well. If you put a sign-flipped fully conn layer and a softmax on this (for example) the result will be the same. The only reason that yours might be better is an asymmetric distribution of x o around 0. If you flip the sign on x, you should get the same benefits. To summarize: your net is not exactly the same as the usual one, but if you train your version on x and I train the usual version with -x, our results will be indistinguishable.
- thesz 7y agoNo, you can't "flip" input because it is, most probably, output of ReLUs which are all non-negative. In that case you have to learn flipping and all that correction at the Mx+b part, which is, let's say, in the range of tens of thousands of parameters.
- bonoboTP 7y agoI meant the input input. The first input. Just flip the fist input to the net. Then the flip will automatically cascade through all layers. The M matrices are initialized from a distribution that is symmetric around zero. They don't need to be explicitly flipped, it's not a "correction" in that sense. As long as you only have this type of modules and normal non-residual ReLU layers, it will be equivalent. The net is not equivalent but if you include the random init in your analysis, then you can see there will be a bijection. I don't think I can explain this well over comments, think about what happens if you initialize your net from scratch. "Self-contained though experiment: Does it make a difference if you multiply all weights by -1 directly after init? " Once that is clear in itself, think of what happens if you init and flip all your very first inputs, the inputs that you feed to the start of the network.