DL7장 음;;
2016-10-23 17:03:50

regularizer 라는 것은 반드시 weight 에 대한(7장에 설명되어 있듯 bias 는 제외) 것으로 이루어지게 되는 이유는 무엇인가?

7.1,2,3,8,12,14 중요

7.8 에서는 How early stopping acts as a regularizer 보면서 es 가 L^2 와 동등 한지 볼 것.

7.1,2,3,10,14 이해가 잘 안되는 부분이 있고,

7.4,5,6,7,9,11,12,13 쉬운데 놓치는 개념이 있을 수 있음.

대부분 설명이 L1, L2 와 이 알고리즘이 유사하다를 가지고 설명하니,

7.1,2 에서 등고선 그래프 이해 필요!

7.3 아직 안봄;

7.8 ES L square 닮은부분

7.10 SR 과 L1 닮은 부분

7.14 는 전반적;;

7.1 Parameter Norm Penalties*

L2 는 무엇인가?

- 민감하게 반응하는 방향으로는 조금만 아닌 방향으로는 많이 변화 시키게 된다.

- Linear Regression 에서 보면 cov 에 비례하는 XX^T 를 XX^T + alpha I 로 바꿈

- 등고선으로 설명한 부분 볼 것

- Quadratic 이�\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0� approximation 이 perfect?

L1 은 무엇인가?

-

L2와 L1 은 어떻게 다른가?

7.2 Norm Penalties as Contrined Optimization ???

7.3 Regularization and Under-Constraind Problems ???

X^-1 관련 이야기:

underdetermined linear equations 에서는 Moore-Penrose

inverse, sudoinverse 이야기 하면서 L square norm 안되거나 하는 것 관련 이야기????

7.4 Dataset Augmentation

b, d 같은 거가 데이터에 있을 때는 flip and 180 degree rotation 하지 마라.

그러니까.. noise 섞을 때 잘 섞어라

7.5 Noise Robust

Input 에 output 에 eW ~ N(e;0,nuI)

Output Target 에도 넣음.. label smoothing(0,1 아님 각각 e/(k-1), 1-e 로 대체).

7.6 Semi Super

both unlabeled examples from P(x) and labeled example from P(x,y) are used to estimate P(y|x) or predict y from x.

representation 을 배운다고 생각하면된다. h = f(x) 같은 클래스는 비슷한 표현 같도록함.

unsup, sup 따로 만들지 않고 한방에 훈련 가능.

generative criterion 사용하고 얼마나 섞을지 제어하면서 trade off 가능.

7.7 Multi-tasking

part of a model is shared across tasks.

dl 의 포인트로 보면, 저변에 깔린 prior belief 는 "among the factors that explain the variations observed in the data associated with the different tasks, some are shared across two or more tasks"

7.8 Early Stopping*

how Early Stopping is equivalent to L square regularization

p251-252

ES 가 정규화의 올바른 양을 결정한 다는 점 에서 weight decay 보다 좋아. wehgt decay 는 hyperparameter 찾으려고 많이 실험해야하거든.

7.9 Parameter Tying and Paramter Sharing

지금까지는 a fixed region or point 에 대해서 이야기해옴. L square 정규화는 the fixed value of zero 로 부터 deviating 된 모델 파라메터에 패널티 주면는 거였음. 여기서는 다른 방식의 prior knowledge 를 표현함. 여기서 말하는 dependency 는 모델 내가 아니고 뭔가 모델간에 parameter 인듯?

다수의 모델(여기서는 두개 예시)이 동일한 구조를 가지고 동일한 output class 로 보낸다면 각 weight 들이 연관 있을 것이고

두개의 차이의 제곱을 사용할 수 있다. L squre 처럼. supervised - unsupervised 간 짝을 이룰 수도 있나보다.

Parameter sharing 은 다른 파라매터에 가깝게 하려는게 아니라 한 부분이 동일 하도록 강제하는 것.

cnn 처럼 translation 에 invariant 한 게 필요할때 사용

parameter sharing 때문에 the number of unique model parameter 가 낮아서 네트워크가 커져도 훈련데이터가 많이 필요하지는 않다.

DK 를 활용하는 방법? 이다.

7.10 스파스 리프레젠테이션 L1 의 효과

activation function 이 스파스 하도록 activation 에 패널티를 주는 거?

sparse 라는게 그냥 0 이 많아진다? L1 이 이거 였구나 ;;;

L1 말고도 sparse 를 할 수는 있지;

데이터 x 의 sparse 한 표현 h 로 계산되는 Linear regression 에서 사용 되는 이 h 를 평균을 내면 그게 무슨의미지???

7.11 Bagging and Other Ensemble Methods

Bagging 은 다양한 모델의 결과를 평균냄.

이때 데이터는 n 은 같고 resampling 해서 얻음 당연히 중복, 소실 데이터 발생.

Boost 는 NN 레이어를 추가 하면서 함.. 짧게 설명되고 일단 bootstrap aggregating 이 더 좋다고 함;

7.12 Dropout*

Key insight : training a network with stochastic behavior and making prediction by averaging over multiple stochastic decisions implements a form of bagging with parameter sharing.

Bagging 여러개를 하게 되는 효과

차이는 단 2개

1) the models share parameters(memory efficient)

2) typically most models are not explicitly trained at all

non-output unit 을 각 unit 의 출력에 0을 곱해서 없앰(mu ~ N(1,I)로 하면 더 좋다고도 함)

그냥 막 없애다 보면 no input units or no path connecting the input the output 이지만 레이어가 커지면 �\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0��체적으로 확률이 낮아져서 괜찮다.

그러니까 몇개 안된다고 해봐야 되는 것들에 비하면 작은 비중이 됨

SGD로 훈련되는 minibatch 에서도 사용 가능

mask 씌우고 하면 조금밖에 못하는데, 한번 Forward propagation 할 비용으로 entire ensemble 을 보자.

평균은 기하평균 사용. 이유는..;;; 그냥 좋다?

그런데 다수의 확률 분포의 기하평균은 확률 분포가 된다는 보장이 없으니 모든 submodels 이 확률이 0 이 아니게 해. 그리고 재 정규화.

기하 평균은 모든 mu 에 대한 곱을 2^d 만큼 제곱근 해준 것. 2 는 0,1 이니까 그런것같고 d는 drop 되는 유닛의 수.

Weight scaling inference rule(이론적 근거 없으나 잘 작동)

We can approximate p_ensemble by evaluating p(y|x) in one model: the model with all units, but with the weights going out of unit i multiplied by the probability of including unit i.

output 의 올바른 기대값을 찾는게 중요하다.

포함확률이 1/2 면 훈련 끝나고 보면 weight 를 2로 나눠준 효과. 훈련동안 특정 unit 에 2 배 곱해도 같음.

263 페이지의 수식처럼. softmax 인 경우 정규화된다. 그리고 수식의 분모, 분자를 풀어 쓰고 각 분모 분자의 분모에 속하는 공통 성분을 없애주고 결국은 weight 를 1/2 한 결과가 나옴.

꼭 좋은 것은 아님 때에 따라 MC 가 좋기도 하니까..

장점:

- 낮은 computational, memory O(n) 임. 그냥 랜덤하게 숫자내서 곱하면 끝이고 binary number 를 저장할 공간만 있으면 되니까.

- RBM, RNN 같이 SGD 로 훈련될 수 있는 distributed representation 이면 함께 사용 가능하다.

단점:

- reduce the effective capac\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ity of a model.. 이라서 데이터 셋틀려야 하고 큰 모델 만들어야 하고 이터레이션도 추가로 필요.

- 데이터 적으면 안좋아.

Linear Regression 에서는 Drop out 이 L square weight decay 와 동일하나.. deep learning 에 있어서는 weight decay 와 동등하지 않다.

Stochasticity 가 불필요하고 불충분해서 dropout boosting 이야기함.

dropout boosting that they desied to use exactly the same mask noise as traditional dropout but lack its regularizing effect. Dropout boosting trains the entire ensemble to jointly maximize the log-likelihood on the training set.

DropConnect, Stochastic pooling 이 Dropout 영향받음..

Dropout 을 an ensemble of models that share hidden units 이라고 보면 각 히든유닛은 다르게 있던 말던 잘 되어야 하고 히든 유닛이 서로 바뀔수 있어야한다. 그래야 노이즈에 강건 하지.

hidden 에 적용하면 information content 를 destruction 하고 이게 raw values of input 을 destruction 하는 것 보다 좋다.

bn 하면 각 hidden 에 부과되는 noise 가 regularizing effect 를 가져서 dropout 를 불필요하게 만들 수 있음.

7.13 Adversarial Training

사람은 조금 바뀐 거 보면 그게 바뀌었는지 잘몰라도 NN 은 노이즈 조금만 섞으면 영 엉뚱한 대답한다.

노이즈 좀 섞은 입력을 넣음.

highly sensitive locally linear behavior 를 network 가 local\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ly constant 를 갖게 해서 줄여준다.

AT 를 보면 .. linear model 은 linear 해야해서 adversarial 에 대항 할 수 없지만.. NN 은 functions that can range from nearly linear to nearly locally constant 까지 표현할 수 있어서 training data 의 linear trend 를 표현할 수 있는 유동성을 지닌다. 또한 local perturbation 을 막는 동시에..

not true label 부여하는 virtual adversarial example.. 라벨 정보 없으면 모델이 돌려주는제일 큰 값을 활용해서한다. small 변화에 강건하게 함.

이런 접근에 근거는 different classes usually lie on disconnected manifolds, and a small perturbation should not be able to jump from one class manifold to another class manifold.(한 클래스는 한 manifold 이고 다른데 못감!)

7.14 Tangent Distance, Tangent Prop, and Manifold Tangent Classifier

미리알아야할 개념들

Singular(Geometrically)

Lagrange

underdetermined linear equations

Moore–Penrose pseudoinverse

Manifold

Tangent Distance

Multiplicative

▼ more
DL 8 장 (미완)
2016-10-18 00:59:39

간단한 걸 하는데도 오래 걸려서 Optimization 을 하게 된다.

또한 Generalization 을 위해서도!

오류함수를 줄이는데 집중해서 설명할 거고..

1) Optimization for ML 이 Pure Optimization 과 어떻게 다른지 보여줄거고.

2) Contrete Challenges that make optimization of neural networks difficult

3) Optimization algirthm 자체와 파라메터 초기화 전략들에 대한 실질적인 알고리즘을 정의함

4) Learning rate 적응, leverage information contained in the second derivatives of the 오류함수

5) 단순한 걸합쳐서 higher-level prodecure 로 형성한 것을 리뷰함

8.1 How Learning differs from Pure Optimization

P 를 원하면서 간접적(indirectly)으로 J(theta)를 줄이는 것을 함.

그리고 또 다른 점은 ML 목적 함수의 구체적인 구조에 특화 되어있다.(예를 들면 지정된 Training set 에서 나온 오류의 평균)

2가지 문제

8.1.1 Empirical Risk Minimization

진짜 분포를 모르고 훈련 셋만 있을때 ML 문제를 갖는다.

empirical risk 는 m 개의 에러의 에러의 평균. 위에서 이야기한 특화된 모양인듯.

Rather than optimizing the risk directly, we optimize the empirical risk, and "hope" that the risk decreases significantly as well.

Emprirical 은 overfitting, 0-1 loss 같은 거 때문에 미분이 잘 안되면 .. 문제다. 이런 두 문제가 의미하는 바는 We rarely use empirical risk minimization. 그래서 원래 optimize 하려는 것보다 더 다른걸 사용..

8.1.2 Surrogate Loss Functions and Early Stopping

loss function 은 최적화가 효과 적으로 안될 수 있어 예를 들면 정확하게 기대되는 binary 로스를 최소화하는게 일반적으로 intractable 한경우.. 심지어 선형 분별기에게도. 이러면 못하지.

이럴때 써로 게이트 로스펑션을 쓰겠다. which acts as a proxy but has advantages. 근사인가?

NLL 같은게 Binary(0-1) loss 의 surrogate!

ML 은 local minimum 이아니라 early stopping 에 기초한 criterion 에 수렴하는 곳에서 멈춘다.

일반적으로 0-1 로 validation 보다가 overfitting 하면 멈춤

while the surrogte loss function still has large derivative 일때도 멈춤..

8.1.3 Batch and Minibatch Algorithms

objective functions usually decomposes as a sum over the tarining examples.

(나를 슬프게한 통계학이지만 정규화 이야기가 나오면서 위로해준다. 그렇다고 안슬프다는 건 아니다;)

SE 가 작아지니 Example 이 많아지면..

더 빠르게(update 수가 아닌 total computation !) 수렴할거다.

small set 에서 하는 다른이유!

redundancy in the training set

identical 하진 않아도 gradient 에 비슷한 영향을 주는 걸 많이 볼거다.

훈련셋 전체로 훈련 하지는 않는다. more than one but less than all of the training examples.(minibatch or minibatch stochastic => now common to simply call them stochastic methods)

데이터를 볼 때 반드시 stat 들 .. 뭐 이를테면 평균 분산 이런거 생각하면서 봐야한다.

variablity 를 생각하면서 batch 의 사이즈가 줄면 variability 예를 들면 Standard Error

shuffle 은 1번 그리고 minibatch 에서는 안섞고 그대로 사용

minibatch 의 SGD면서 data reuse 없으면 global minima?(generalization error)

g 는 H 보다 더 작은 batch size 에 강건함. 만약 g가 100 이면 H^-1 g 는 batch size 10000 필요함.

H 혹은 H^-1 을 곱하는 건 기존에 존재하던 에러를 크게 하거나 이런 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0경우는 .. estimiation errors in g.

g 추정의 작은 변화가 H^-1g 를 변화하는데 큰 변화를 줄수 있다. H 가 완벽히 추정되더라도. 물론 H 는 오직 근사 되는거라..

H^-1 g 는 훨씬 더 많은 에러를 가질거임..

8.2 Challenges in Neural Network Optimization

ML 은 convex 로 최적화 문제를 보장하는 제한을 두고 세심하게 목적함수를 디자인하면서 일반화 최적화 문제를 피했는데... NN 에서는 general non-convex case 를 다뤄야한다.

convex optimization 도 복잡하다;;(Even convex optimization is not without its complications.)

8.2.1 Ill-Conditioning(최적화 기법)

convex function 을 최적할때도 문제는 발생한다.

그건바로 Hessian matrix H 의 ill-conditioning!!

테일러 급수로 표현된 부분이 양수가 되면 원하는 방향에서 반대가 되어버릴수 있다?

gg 부분은 별로안커진다고 하고 gHg 가 커질 테니 위 기준대로면 그냥 문제임 훈련동안 squared gg, gHg 를 보는 수밖에

gradient 는 안줄어들고 gHg an order of magnitue 보다 늘어남!!

결국 gradient norm 전체는 늘어남 좋은 곳에 도착해도 줄지를 않는다(critical point)

8.2.2 Local Minima(최적화 기법)

이역시 convex problem 의 대표주자

이말은 뭔가 "Any local minimal is guaranteed to be a global minimum"

local minima 는 flat 이고 acceptable?

=> 위까지는 NN이 아닌듯?

non-convex 인 NN 은 많은 local minimal!!! 있고 major problem 일 필요는 없음

multiple equivaliently parameterized latent variables 은 모두 multiple local minima 가 있는데 이는

model identifiability problem 때문임.

8.2.3 Plateaus, Saddle Points and Other Flat Regions(cost 곡면?의 모양을 Hessian 으로 설명하고 GD로 결말)

그림 8.2 를 보니 NN 문제도 convex 에 가깝고 주된 문제는 saddle point 라는 것을 알아냄

하지만 문제는 파라메터가 초기화된 지점 근처의 높은 코스트를 갖는 saddle point 인데 그림을 보면 거의 왼쪽으로 뻗은 ㄴ 자로 된 걸보면

SGD 가 여길 잘 벗어날것으로 보임; 그러니 빨리 가파른 부분 지나고 평평한 부분에서 있음

거기에 계속 있는건 high noise in the gradient, poor conditioning of the Hessian matrix 때문이거나 단순히 간접적인 arcing path 를 경유해서

the tall "mountain" visible 을 일주하기 하기 위한 필요성? 때문임.

Second order 관점에서 즉 Hessian Matrix 의 eigen value 로 오류 공간을 보면 GD 만으로 볼 수 없는 것을 볼 수 있어 좋아보임

Hessian Matrix 의 eigen value 가 saddle 에서는 positive or negative 일 수 있고 더 낮은 cost 로 갈 수록 positive가 되어감..

차원 이야기 하면서 동전 시행 하면서 모두 positive 일 확률 이 낮다는 것에 빗대어 설명함.

285 에서 (머릿속에 직관적으로 그려지지 않던) Hessian 의 eigen value 로 Second order 로 saddle도 찾고 lower cost 도 찾고 local maxima도 찾고 하는 방식을 설명하다가

286 에서 on the other hand 로 시작해서 GD가 경험적으로 saddle points 를 잘 벗어난다고 하더니,,

287 에서 GD 는 그냥 down hill 만 가지 critical point 를 찾으려고 design 된게 아니지만

Newton's Method 는 gradient zero 지점을 해결 하기 위해 de\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0sign 되었다고함.

그리고 왜 second order 방법이 GD 를 대체하지 못했는지 Dauphin et al 2014 에 saddle-free Newton method 가 second -order optimization 을 위해 소개되고

이걸 사용하면 NN 이 커져도 써먹을 수 있다.

결국 차원이 높아지면 마치 동전이 모두 앞면을 볼 수 없듯 각 차원에서의 Hessian 의 eigen value가 positive 혹은 negative 로 통일되기 힘드니

Local minima 보다는 Saddle point 가 많아지게 되고 GD는 오류 곡면 평평해지면 0 이라서 쓰기 애매한데 Second order 는 사용가능하고

Hessian 으로 하면 eigen value 를 모니터링하면서 saddle point 를 잘 벗어나고 낮은 cost 로 갈 수 있겠지만

NN 이 커지면 사용이 불가능해서 결국 GD 를 쓰게 되고 GD 도 벗어날 수 있고 Newton method 를 사용하면 gradient zero 문제를 풀 수 있고.

(Proliferation of saddle point in high dimensional space 가 presumably 왜 second order method 가 GD를 위해 사용되지 못했는지 설명해준다니;;)

결국은 convex 구조에 가까워서 GD 로 간다는 것?

Other float regions

maxima 도 minima, saddle point 처럼 zero gradient 이긴한데 다른 알고리즘은 아니어도 unmodified Newton's method 는 이것에 끌려갈 수도있음.

하지만 Maxima of many classes of random functions 은 고차원에서는 minima 가 그렇듯 드물게 나타난다.

Plateaus

constatnt value 의 넓고 평평한 지역에서는 Gradient, Hessian 모두 0 인데. 그런 곳에서는 모든 numerical optiomization algorithm 에 문제가 됨.

convex problem 에서 이런 지역은 반드시 global minima 로 구성 되어야 하지만 일반적인 최적화 문제에서 그런 지역은 objective function 의 high vlaue 에 상응 할 거다.

(high value 라서 알아서 벗어날테니 별 걱정 없다는 이야기인가? 볼 수 잇는 measure 이 GD 도 Hessian 도 다 0 인데 이걸 어떡하나;)

8.2.4 Cliffs and Exploding Gradients(GD 관련)

Cliff 는 several large weight 들이 함께 곱해지면서 생기는데 이런 곳이 자주 나오고

여기서 모두 함께 뛰어내림(jumping off of the cliff stucture altogether)

그리고 뛰어내리는 것과 별개로 우선 이 주변에가면 멀리 던져버리는데 이러면 그동안 해오던 most of the optimization work 을 잃어버린다.

그래도 이런건 gradient clipping 으로 피할 수 있다.

GD 는 infinitesimal 지역내에서 방향만 알려준다.

Cliff 는 주로 RNN 에서 step 이 많아질 때 발생한다.(Exploing gradient)

8.2.5 Long-Term Dependencies(GD 관련)

computational graph 가 아주 깊어질때 문제가 발생한다.

eigenvalue of W 의 manitude 가 1에 가까우면 그대로일지라도 1보다 크면 explode(unstable=> gradient clipping), 1보다 작으면 vanish(difficult to know which direction)

그리고 이를보면 diag(lambda)^t 에 따라 scale 된다.

결국 W의 t 승인데 이는 matrix W 의 largest eigenvalue(eigenvector) 를 찾는 power method 알고리즘과 비슷하다.

power method 라는 관점에서 보면 x^TW^t 가 결국 W 의 principal eigen vector 에 orthogonal 한 x의 모든 component 를 버린다는 것이 놀랍지 않다.(power method 볼 것)

FF 는 괜찮고 대부분 RNN 에서 발생(Sussillo 2014)

8.2.6 Inexact Gradients(GD 관련)

Gradient 나 Hessian matrix가 부정확한게.. (Training Set 이 이상해서인가?라기 보다는) Sampling 때문

아니면 objective function 이 사실상 intractable, 이럴때는 gradient 도 intractable 하다. 아마 데이터가 이상할때?

그럴때는 graident 를 근사할 수 밖에..

이런 경우는 more advanced 한 모델에서 발생.

예를들어 contrastive divergence 는 Boltzman machine 의 intractable 한 log-likelihood 의 gradient appoximating 을 위한 방법임

다양한 최적화 알고리즘이 그런 imperfections in the gradient estimatㄷ 를 위해 만들어졌고 true loss 대신에 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0surrogate loss function 을 선택하면서 피할 수 있다.

8.2.7 Poor Correspondence between Local and Global Structure()

지금 까지는 한지점에서의 loss function 의 특성에 상응했다.

non-local modex 를 사용하는 알고리즘이 개발 되면 좋겠다.

bias or varaince 끼면 objective function 의 올바른 방향으로 가는 근사에 문제 생길 수 있다.

(In these case, local descent may or may not define a reasonably short path to a valid solution, but we are not actually able to follow the local descent path.)

local descent 에 대한 이야기에서 너무 조금 씩 간다? 그러면서 제대로도 못간다? epsilon 보다 작은 delta 만큼 가서.. local information 이 좋은 가이드가 아닐 수 있다.(언제그러냐면 the function has a wide flat region 이거나 만약에 우리가 정확히 ciritical point 에 착륙 했을때

- 정확히 착륙하는 경우는 명시적으로 critical points 를 푸는 방법에서 발생, 그 방법은 Newton's method 같은 것 즉, Newton 해도 문제 풀기엔 좋지만 이런저런 문제 발생하고 이게 그중 하나 정확히 도착하고 다른데감;)

올바른 곳에서 시작할 수 있고 solution 으로 직접적으로 연결된 공간의 지역(물론 local descent 가 따라갈 수 있는..)이 존재한다면 그런 문제들을 피할 수 있다.

결국 전통적인 최적화 알고리즘을 사용하기 위한 좋은 시작점을 선택하는 것을 추천한다는 것.

8.2.8 Theoretical Limits of Optimization

The limits on the performance of any optimization algorithm.. we might design for neural networks.

Typically these results have little bearing on the use of neural entworks in practice.

몇몇 이론적인 결과들.. 은 오직 NN의 출력이 이산 값인 경우 적용됨.

하지만 대부분의 NN 유닛은 local search 를 통해서 최적화는 것을 가능케 하는 smoothly increasing values 을 출력함.

몇몇 이론 적인 결과들은 intractable 한 문제의 클래스가 존재하는 것을 보여주지만 특정 문제가 이런 클래스로 들어가는지 아닌지 말하긴 어려워..

또 다른 결과들은 주어진 사이즈의 네트워크를 위한 솔류션을 찾는게 intractable 하다고 해. 실상은 그냥 큰 NN 으로 수긍할만한한 솔류션에 도달하는 방식으로 찾아내지;;;

더우기.. NN 훈련할때 딱히 exact minimum of a function 을 찾는다기 보다는 그냥 좋은 일반화 오류를 얻기 위해서 이 값을 줄이는 것을 찾지.

최적화 알고리즘이 이 골을 달성할지는 아주 어렵지;

그냥 못한다 가아니고 the performance of optimization algorithms 의 realistic bounds 을 개발하는 것이 ML 연구의 중요한 골로 남아있어.

8.3 Basic Algirhtms(과연 Basic 일까;)

8.3.1 Stochastic Gradient Descent

내가 알던 mini batch

1 개씩이 아니고 m examples from the training set 임 그리고 각 오류에 대한 Gradient 를 평균냄

LR의 합은 1~inf 일때 무한대, LR의 제곱의 합은 1~inf 일때 무한대보다 작다. 라는게 만족되어야 SGD 가 converge 한다.

LR_t는 LR_0 의 1%? 이게 아트 인가? LR_t 는 LR_0 에 대해 상대적인 값이 매겨지니까 결국 LR_0 을 뭘로 정하는지가 문제가 된다.

LR_0 이커지면 oscillatation 이 커지고 이말은 cost function 커짐;;

Gentle 한거면 괜ㅊ낳고 d\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0rop out 을 가진 SGD 라면 아마 괜찮을듯?

최적의 LR 보다 최적의 시작 LR은 크다. 처음에 조금 보면서 best performance 보다 조금 크게..

Optimization algorithm 의 Convergence rate 를 연구하기 위한 measure 는 excess error 로아래와 같이 구한다.

excess error J(theta) - min _thata J(theta)

SGD 가 convex 문제에 주어지면 exess error 는 O(1/sqrt(k)), after k iterations, strongly convex 면 O(1/k) 임.

8.3.2 Momentum(Hinton 5, 6)

it accumulate an exponentially decaying moving average of past gradients & continues to more in their direction.

V that plays the role of velocity - it is the direction and speed at which the parameter move through parameter space

parameter 공간(?)에서의 parameter 의 방향 속도..

delta theta 대신 V 를 쓰는데.. V <- alpha V - eg 로 구한다. 속도만큼 변해라.

뉴턴 역학에서 보면 시간의 제곱으로 각시간의 지점에 대한 2 차 편미분을 하고 여기서는 그냥 제곱은 아니고 1번만 t 로 수식을 미분.

Momentum 은 numerical equation 으로 미방을 푸는 걸로 구성되고 이런 미방을 푸는건 Euler's method 로 가능함.

Euller's method는 각 그레디언트의 방향으로 작고, finite steps 을 취하는 방정식으로 정의된 dynamics 를 simulating 하는 것으로 구성된다. (뭔말인가;)

Euiler's method consists of simulating the dynamics defined by the equation by taking small finite steps in the direction fo each gradient.

그냥 내려만 가면 계속 oscillate 할 수 있으니 -v(t)에 비례하는 힘을 더함.. viscous drag 에 해당.

viscous drag 를 한이유는 수학적 편의와 값의 적절함때문(?) 다른 힘이면 다른 정수가 사용될텐데 turbulent 는 너무 약하고 dry friction 은 너무 강하고..

gradient가 0에 가까울때 local minimum 도착전에 rest

8.3.3 Nestrov Momentum(Hinton 5, 6)

V 구할때 correction factor 를 추가

즉 여기서는 v 만이아니라 gradient 를 계산할때 theta를 그냥 안쓰고 tilde{theta} <- theta + alpha V 한 걸 사용함.

나머지는 Momentum 과 동일.

convergence of the exess error from O(1/k) to O(1/k^2) 로 줄어든다.

불행하지만.. SGD 에서는 별 수렴 비율에 도움이 안됨.

8.4 Parameter Initialization Strategies

Iterative 하건 아니건 Iterative 인경우도 초기값과 상관없이 OK.

Right class of optimization 에 적용되면.

Break symmetry bet. different units.

FF, BP 의 null space 에서 input pattern, gradient pattern 을 잃지 않도록 도와준다.

The goal of (having each unit compute a different function) motivates random init of the parameters..

Output 이 input 만큼 많으면 Gram Schmidt 사용 가능 (근데 이게 뭔지..)

Weight 만 Random [bias, prediction](상수) 의 conditional variance..

어떤 분포(gaussian 인지 uniform)인지 보다 scale 이 중요!!

Larger 는 stronger symmetry breaking effect, Saturation 되기 쉬우니Gradient Clipping 과 사용하며 좋음;

SGD 는 small incremental changes expresses a prior that the final paramters should be close to the initial parameters..

GD w/ early stopping 은 weight decay 와 같지만 GD w/ early stopping 은 a loose analogy for thinking about the effect of init 에 대한 analogy 제공.

Parameter theata 를 theata _0 로 초기화 하는 건 Gaussian Prior P(theta) w/ mean theata_0 와 similar 하다.

그래서 theta_0 를 0 근처에서 선택하는 게 맞아보인다?? 일단.. Theta_0 가 커지면 어떤게 어떻게 interact 할지.. our prior 가 구체화 할거다.;;

huristic

1. m 개의 input, output V(-1/sqrt(m), 1/sqrt(m))

2. w_ij ~ V(-6...) : same activation var & same gradient var -> Linear 이긴한데.. 잘 먹힐 수 도 있는 것 같다;;

3. Initlaizing to random orthogonal matrices w/ scaling or gain factor g that account for the non-linearity applied at each layer.

=> 이것도 w/o non-linearities matrix multiplication

depth 에 독\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0립적인 iteration required to reach convergence.

4? increasing the scaling factor g 는 network network innorm of activation and gradient 이 커진다.

setting the gatin factor correctly is sufficient to train networks as deep as 1000 layers. 올바르니까.

레이어마다 다른 wgt 쓰기 때문에 feed forward entwork 커지거나 작어져도 w/ needing to use orthogonal initialization 없이! 훈련 가능

norm 을 preserve 하면 RNN 에서 문제 해결?

but not optimal performance

1) wrong criteria

2) 시작시에 부과된 property 가 후련되면서 지속 X

3) Criteria 가 맞아도 일반화에서 에러 존재.

The scale fo weight 를 hyperparameter 로 두고 이론적인 예측치 근처에 두는게 좋겠다.

초기 weight 을 동일한 표준편차로 두는 것의 단점: layer 커지면 개별 weight가 너무 작아진다. 그래서 sparse initialization 이 소개됨.

spart init 은 where each unit is initialized to have exactly k non-zero weights.

-> maxout 에 안좋은가?

hyperparameter 로 init scale of weight 를 algorith 으로 찾아가는것임.

sparse or dense init 또한 hyperparameter..

init scale 에 대한 건 single minibatch of data 에 대한 activation 의 range 나 SD를 보거나 gradient 의 range 나 SD를 보고 하는 것다.

hyper parameter 보다는 낫다. 이유는 이건 feedback from the behavior of the initial model on a single batch of data 니까..

bias 이야기.. non-zero 이어야 할때

1. output 에 대해서는 SE(하아 SE..;;)가 잘나오게(inverse of the activation of func)

2. avoid causing too much saturation at init.. 그래서 ReLU 에서는 0.1 로 정함.. 0 이아니고

3. Output unit 의 participate 를 다른게 결정.. 하는 것(?)

Variance or precision

1. Init var, precision to 1

2. 가정. 초기 wgt 들이 zero 에 가깝다고 가정 그 zero 라는 것은..

1) bias 는 wgt 의 효과를 무시하고 세팅

2) bias 를 correct marginal mean of the output 을 생성하도록 설정

3) variance parameter 를 marginal variance of the output in the training set 으로 설정.

ML로도 풀수 있고 unsuper, super 초기화 가능.

Right scale 을 갖거나 또는 different uints 들이 서로 다른 것으로 부터 다른 function 계산 하도록 설정

Right sclae 같은건 잘먹힘;;

8.5 Algorithms with Adaptive Learning Rates

LR 을 Hyper로.. 영향은 크지

cos 는 특정방향으로 예민함 momentum 이 이걸 완화! alpha 등 추가 파라메터 가생김;

sensitivity 한 방향 축에 align 되면 separate learning rate for each parameter 가능함! 그리고 자동으로 그런 LR 을 이런 course of learning 을 통해서 적응함

dltar - bar -delta 초기 시도.. : 각 LR of 각 모델 parameter 들을 적응 훈련시에. 같은 partial derivative sign 이면 LR 이 커짐 다른면 작아짐 Full Batch 에서만 통하는 방법임

아래는 mini batch 에 대한 이야기

모두 AdaGrad 를 기본으로 하고 알고리즘이 설명된다...

8.5.1 AdaGrad: Accumulated Squared Gradient 사용함

r은 0 으로 시작하고 r <- r + g inner product g, delta theta 는 - e over (delta + sqrt(r)) i.p. g

즉 scaling 개별 LR inversely proportional to the square root of the sum of all of their historical squred value partial derivative 가 큰 parameter 는 급격히 작아지고 작은 건 조금 작아짐.

Convex optimizaiton 관점에\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0서 보면 좋은데 deep 에서 premature & exessive decreas..

8.5.2 RMSProp

Ada Grad 와 비슷 Ada grad는 결구은 convex fucntion 에 대해서 로컬 컨벡스 바울에 도착! Gradient accumulation to an exponentilaly wieghted moving around..

Ada Grad LR 을 전체 history of the squared gradient 에 따라 줄이고 그래서 convex structure 가기전에너무작아질 수 있다.

RMSProp 은 이게 싫어서 exponentially decalying average 사용 해서 아주 오래된 history 지워서 convex bowl 찾으면 빨리 converge 해 마치 ada grad 가 그 bowl 에서 시작한 것처럼함.

RMSProp 은 혼자서는 r <- pr + (1-p) g i.p. g, delta theata = - e over sqrt(delta + r) i.p. g, theta <- theta + delta theta

Nestrov momentum 과 함께 라면 (delta 없고 tilde theta , V 사용)

tilde theta <- theta + alpha V(velocity), tilde theta 로 g 구하고, r <- pr + (1-p) g i.p g

v <- alpha V - e over{sqrt(r)} i.p. g, theta <- theta + V

Ada Grad 에 비하면 moving average 사용은 새로운 hyper param 인 p 사용함. 이건 control 함.

The length scale of the moving average 를 ??

8.5.3 Adam

Step size e, p1&p2[0,1), 0.9, 0.999, s 1st: momentum, r 2nd 는 uncentered..

moment varaible 이라는걸 사용함..

Adam 은 그냥 ;; 노트 정리로 볼까;;

adaptive moments

1) momentum is incorporated directly as an estimate of the first order mmoentum (w/ exponential weighing) of gradient.

가장 직접 적인 방법 momentum 을 RMSProp 에 넣는 것은 rescaled gradient 에 momentum 을 적용하는 것임. in combination w/ rescaling 에서의 momentum 의 사용은 뚜렷한 이론적 동기가 "없음"

2) Adam include bias correction

RMSProp 은 uncentered 있지만 correction 이없다. 그래서 RMSProp 은 초반에 high bais 를 가진다.

Adap 이 hypoer pram 선택에 robust 하다. LR 은 somtimes suggested default 에서 바껴야한다(?)

8.5.4 Choosing the Right Optimization Algorithm

LR Adapdation 에 포커스 해서바.. which algorithm should one choose?? depend on user's familarity.. w/ the algotihms..

for ease of hypoer parameter tuning..

8.6 Approximate Second-Order Methods

cost function 제이세타는 우선 제한된 트레이닝 셋에서 나온 기대값 즉 미니배치의 오류의 평균이라고 생각하자.

8.6.1 Newton's Method 드디어 나왔군;;

세컨 오더 gradient method.. 인기있다;

tayler 급수로 보자. 고차 derivative 없애고 세타 제로 부근에서 보자.

제이세타는 J(theata0) + (theta - theta_0)^T delta_thetaJ(theata_0) + 1/2(theta - theta_0)^T H(theta - theta_0)

크리티컬 포인트를 풀면..

Theta start = theta_0 - H^-1 delta_theta J(theta_0)

이 된다는데;; 음;;

locally qudratic 이면 한방에 minimum.. convex 이지만 qudratic 이 아니면 iteration 으로도 된다.

iterative 한 알고리즘은 p 312 에;;

대부분 convex 아니고 saddle point 임 Newtom 은 여기서 잘못갈 수 있다. 그래서 hessian regularizing 함.

typically 상수 알파를 넣음.. along the diagonal of the Hessian.

수식은 8.28

alpha 를 넣고나서 inverse 를 구한다.. (Levenberg1944 Marquard 1963)

negative eigen value of Hessian 이 여전히 relatively close to zero 가 아니면 잘 작동한다..

more extereme direction of curvature 가 있으면 the value of alpha would have to be sufficitly large to offset the negative eigen values.

strong negative curvature 가 존재하면 alpha 가 커지고 그래서 Newton's method 는 GD 보다 올 바르게 선택된 작은 step 을 만들 것 같다.

saddle 말고 NN에 쓰긴 좀 burden이.. The number of element in the H is squared in the number of parameters, so with k parameters 결국 Newton 은 inversion of a KxK(파라메터수) 행렬 이라서 O(K^3) 된다. 그것도 매 이터레이션 마다.;;;

이후는 결국 Newtom 인데 KxK^-1을 우회하는 방법들..

8.6.2 Conjugate Gradients

iteratively descending conjugate directions. the method of the steepes\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t 의 약점의 careful study;;

(line search 들이 gradient 에 연관된 방향으로 iteratively 적용되는 line search)

p.315 알고리즘 8.9

아무튼 결국 그냥하면 beta 를 구하기 위해 H 의 eightn value 를 구해야하는데;; 이러면 하나마나임

Fletchre reeves, Polak-Ribiere 가 있음;

quadratic surface 에서 the conjugate directions ensure that the gradient along the previous direction doesn't increase in magnitue 그래서 이전 방향을 따라서 minimum에 머물수 있다?

k-dimensional 에서는 결과적으로 k 번 line-search!

p.315 의 알고리즘 8.9 는 quadratic 이라는게 보장 안되면 CG가 보장 안됨

beta 구할때 polak-Ribiere 사용함.

이때 beta는 non-linear conjugate gradient descent 에 따라 0 으로 reset

line search 할때 quadratic 이면 그냥 한번에 구하는게 가능?

8.6.3 BFGS : more direct than conjugate gradient

matrix m_t 로 H^-1 을 근사하자!

이게 quasi-Newton method..

M_t 란 iterative 하게 low rank 로 refine 하고 H^-1 의 그사가 잘 되게 하려고 update 함.

한번 M_t update 되면 descent 의 방향인 p_t 는 p_t = M_tg_t 로 정해짐.

P_t 구하는게 conjugate 와 다름.. theta_t+1 = theta_t + e*(star)p_t

e* 는 똑같이 line search 로 찾음.. 이때 방향은 second order 정보를 포괄함. 단, true minimum 에 다주 가까운 점을 찾는 line search 에 의존하지 않아서 refining each linear search 에 적은 시간을 들임!

단 M_t(inverse H) 를 저장해야 되어서 메모리가 O(n^2) 필요하고 그래서 못씀?

그래서 Limited memory BFGS 사용함.. 일단 complete 저장안함

M^(t-1) 을 identify matrix 라고 가정하고 시작한다. 하지만 M 은 BFGS 와 구하는게 같다.

exact line search 하면 L-BGFS 로 정의된 방향들은 Mutually conjugate?

이런 프로시저는.. ... the minimum of line search 가 오직 근사적일때만 잘동작...?

H 에 대한 정보를 some of the vectors used to update M 을 저장가능하면서 포함.. 각 time step 마다 O(n) 이다.

결국 t-1 을 identity 로 보니까 memory less 하다는건가;; 추가 정리 필요;;;;

8.7 Optimization Strategies and Meta-Algirithms

: 노트 정리 내용 그대로 적지못하고 다시 요약함.. 내용 확인 필요;;

8.7.1 Batch Normalization

깊은 1개 노드짜리 NN을 생각해보자. 뭔가 하나만 좀 바꾸려고해도 여기저기 영향을 받을 것이다.

mean, sd 를 row 에서 공유. gradient'll never propose that acts simply.. SD 또는 mean 이 커진다고..

the norm operations remove the effect of such an action & zero out its componenet in the gradient.

=> majore innovation..

"l-1 번째 h 햇" 은 무슨게 오더라도 unit Gaussian lower layer do not have an effect in most cases!!

드문 corner case 의 lower layer 에서 weight 을 0 으로 해서 output degenerate 할 수 있고, The sign of one of the lower weight 해서

"l-1 번째 h 햇" 과 y의 관계를 flip 하는게 가능하다.

DNN w/ non-linear activation fucntion, lower layer 들은 useful하다.

final layer of the network 는 linear transformation 을 배울 수 있어서 layer 내의 unit 간 선형 관계를 제할 수 있다고 한다;;;

correlation 을 핀다는 것인가..? -> more expensive than standardizing the mean & standard devation of each individual uint.

이제부터 Power of NN

H` = (H-mu) / sigma 인데 rH`\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 + b 로 함 H` 아님!

r, beta도 학습 왜 0 으로갔다가 beta로 가나 평균을?

대답: The new parameterization can represent the same family of functions of the input as the old parameteriza tion, but the new parameterization has different learning dynamics. 오래된 parameterization 에서 mean of H 는 parametr 들의 복잡한 interaction 이 있지만 rH`+b 에서는 mean 은 beta 만으로 결정 되어서 GD 로 학습이 용이하다.

X 에 또는 WX+b 이가? Wx+b 에 bn 을 하기를 권장! Xw+ b 는 반드시 normalizaed 형태로 교체되어야한다.

beta 는 omitted beta 가 있으니까.. 그리고 non-linear 에서는 이전 layer 의 결과가 input 이라서 이전 거가 non-Gaussian 이고 linear operation 으로 표준화 하기 어렵다.(less amendable) CNN 에도 BN 적용.

8.7.2 Coordinate Descent: 나눠서 처리

나눈함수를 최소로 하면 합쳐진게 최소? 물론 아니겠지만;;먹히긴 한듯. 나누는 단위는 개별, 블록 등?

newton 써서 한방에 갈 조건 되어도 그렇지 못함.

아무튼 나눠도 Convex 안되면 못씀..

8.7.3 Polyak Averaging: kind of runnig average apporach

그냥 CD 가 아니라 먼 과거 것을 없앰? exponentally decaying running average.. 사용..

8.7.4 Supervised Pretraining(transfer learning 살짝 언급)

Greedy!!

CL과 헷갈림..;

쉬운거 하고 복잡한거 하는 건 유사.

Bengio 방식은 거의 레이어 별로 훈련을 함 그런데 이러려면 레이별로 아웃풋의 정답을 안다는 거겠지?

막판에 다시 풀 훈련 다시 할듯..

FitNets 나옴;

8.7.5 Designing Models to Aid Optimization(큰 주제 같은데 작은 절이네;;)

알고리즘 이아닌모델 디자인 사실상 80년대 이후로 이거라고 함;;

8.7.6 Continuation Methods and Curriculum Learning(CL 은 그냥 커리큘럼? )

두껍고 얕은걸로 티쳐 얇고 긴걸 학생;

쉬운거 부터 어려운걸로 학습, 모델 형태도, 데이터도;

hint 이야기 나온듯?

Prerequisite concepts

jacobian

hessian matrix(geometrically)

taylor series

power method(누승법)

eigen value, vector pair(geometrically)

Euler's method

▼ more
DL 8 장 updated
2016-10-15 09:57:16

간단한 걸 하는데도 오래 걸려서 Optimization 을 하게 된다.

또한 Generalization 을 위해서도!

오류함수를 줄이는데 집중해서 설명할 거고..

1) Optimization for ML 이 Pure Optimization 과 어떻게 다른지 보여줄거고.

2) Contrete Challenges that make optimization of neural networks difficult

3) Optimization algirthm 자체와 파라메터 초기화 전략들에 대한 실질적인 알고리즘을 정의함

4) Learning rate 적응, leverage information contained in the second derivatives of the 오류함수

5) 단순한 걸합쳐서 higher-level prodecure 로 형성한 것을 리뷰함

8.1 How Learning differs from Pure Optimization

P 를 원하면서 간접적으로 J(theta)를 줄이는 것을 함.

Rather than optimizing the risk directly, we optimize the empirical risk, and "hope" that the risk decreases significantly as well.

2가지 문제

8.1.2 Surrogate Loss Functions and Early Stopping

loss function 은 최적화가 효과 적으로 안될 수 있어 예를 들면 정확하게 기대되는 0에서 1사이의 로스를 최소화하는게 일반적으로 intractable 한경우.. 심지어 선형 분별기에게도. 이러면 못하지.

이럴때 써로 게이트 로스펑션을 쓰겠다. which acts as a proxy but has advantages. 근사인가?

NLL 같은게 Binary(0-1) loss 의 surrogate!

ML 은 local minimum 이아니라 early stopping 이 만족되는 곳에서 멈춘다.

0-1 로 validation 보다가 overfitting 하면 멈춤

while the surrogte loss function still has large derivative 일때도 멈춤..

8.1.3 Batch and Minibatch Algorithms

objective functions usually decomposes as a sum over the tarining examples.

(나를 슬프게한 통계학이지만 정규화 이야기가 나오면서 위로해준다. 그렇다고 안슬프다는 건 아니다;)

SE 가 작아지니 Example 이 많아지면..

더 빠르게(update 수가 아닌 total computation !) 수렴할거다.

small set 에서 하는 다른이유!

redundancy in the training set

identical 하진 않아도 gradient 에 비슷한 영향을 주는 걸 많이 볼거다.

훈련셋 전체로 훈련 하지는 않는다. more than one but less than all of the training examples.(minibatch or minibatch stochastic => now common to simply call them stochastic methods)

데이터를 볼 때 반드시 stat 들 .. 뭐 이를테면 평균 분산 이런거 생각하면서 봐야한다.

variablity 를 생각하면서 batch 의 사이즈가 줄면 variability 예를 들면 Standard Error

shuffle 은 1번 그리고 minibatch 에서는 안섞고 그대로 사용

minibatch 의 SGD면서 data reuse 없으면 global minima?(generalization error)

8.2 Challenges in Neural Network Optimization

ML 은 convex 로 최적화 문제를 보장하는 제한을 두고 세심하게 목적함수를 디자인하면서 일반화 최적화 문제를 피했는데... NN 에서는 general non-convex case 를 다뤄야한다.

convex optimization 도 복잡하다;;(Even convex optimization is not without its complications.)

8.2.1 Ill-Conditioning(최적화 기법)

convex function 을 최적할때도 문제는 발생한다.

그건바로 Hessian matrix H 의 ill-conditioning!!

왜 테일러 급수로 표현된 부분이 양수가 되면 문제가되나?? 늘어나서 인가..

gg 부분은 별로안커진다고 하고 gHg 가 커질 테니 위 기준대로면 그냥 문제임 훈련동안 squared gg, gHg 를 보는 수밖에

gradient 는 안줄어들고 gHg an order of magnitue 보다 늘어남!! 결국 gradient no\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0rm 전체는 늘어남 좋은 곳에 도착해도 줄지를 않는다(critical point)

8.2.2 Local Minima(최적화 기법)

이역시 convex problem 의 대표주자

이말은 뭔가 "Any local minimal is guaranteed to be a global minimum"

local minima 는 flat 이고 acceptable?

=> 위까지는 NN이 아닌듯?

non-convex 인 NN 은 많은 local minimal!!! 있고 major problem 일 필요는 없음

multiple equivaliently parameterized latent variables 은 모두 multiple local minima 가 있는데 이는

model identifiability problem 때문임.

8.2.3 Plateaus, Saddle Points and Other Flat Regions(cost 곡면?의 모양을 Hessian 으로 설명하고 GD로 결말)

그림 8.2 를 보니 NN 문제도 convex 에 가깝고 주된 문제는 saddle point 라는 것을 알아냄

하지만 문제는 파라메터가 초기화된 지점 근처의 높은 코스트를 갖는 saddle point 인데 그림을 보면 거의 왼쪽으로 뻗은 ㄴ 자로 된 걸보면

SGD 가 여길 잘 벗어날것으로 보임; 그러니 빨리 가파른 부분 지나고 평평한 부분에서 있음

거기에 계속 있는건 high noise in the gradient, poor conditioning of the Hessian matrix 때문이거나 단순히 간접적인 arcing path 를 경유해서

the tall "mountain" visible 을 일주하기 하기 위한 필요성? 때문임.

Second order 관점에서 즉 Hessian Matrix 의 eigen value 로 오류 공간을 보면 GD 만으로 볼 수 없는 것을 볼 수 있어 좋아보임

Hessian Matrix 의 eigen value 가 saddle 에서는 positive or negative 일 수 있고 더 낮은 cost 로 갈 수록 positive가 되어감..

차원 이야기 하면서 동전 시행 하면서 모두 positive 일 확률 이 낮다는 것에 빗대어 설명함.

285 에서 (머릿속에 직관적으로 그려지지 않던) Hessian 의 eigen value 로 Second order 로 saddle도 찾고 lower cost 도 찾고 local maxima도 찾고 하는 방식을 설명하다가

286 에서 on the other hand 로 시작해서 GD가 경험적으로 saddle points 를 잘 벗어난다고 하더니,,

287 에서 GD 는 그냥 down hill 만 가지 critical point 를 찾으려고 design 된게 아니지만

Newton's Method 는 gradient zero 지점을 해결 하기 위해 design 되었다고함.

그리고 왜 second order 방법이 GD 를 대체하지 못했는지 Dauphin et al 2014 에 saddle-free Newton method 가 second -order optimization 을 위해 소개되고

이걸 사용하면 NN 이 커져도 써먹을 수 있다.

결국 차원이 높아지면 마치 동전이 모두 앞면을 볼 수 없듯 각 차원에서의 Hessian 의 eigen value가 positive 혹은 negative 로 통일되기 힘드니

Local minima 보다는 Saddle point 가 많아지게 되고 GD는 오류 곡면 평평해지면 0 이라서 쓰기 애매한데 Second order 는 사용가능하고

Hessian 으로 하면 eigen value 를 모니터링하면서 saddle point 를 잘 벗어나고 낮은 cost 로 갈 수 있겠지만

NN 이 커지면 사용이 불가능해서 결국 GD 를 쓰게 되고 GD 도 벗어날 수 있고 Newton method 를 사용하면 gradient zero 문제를 풀 수 있고.

(Proliferation of saddle point in high dimensional space 가 presumably 왜 second order method 가 GD를 위해 사용되지 못했는지 설명해준다니;;)

결국은 convex 구조에 가까워서 GD 로 간다는 것?

Other floa\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t regions

maxima 도 minima, saddle point 처럼 zero gradient 이긴한데 다른 알고리즘은 아니어도 unmodified Newton's method 는 이것에 끌려갈 수도있음.

하지만 Maxima of many classes of random functions 은 고차원에서는 minima 가 그렇듯 드물게 나타난다.

Plateaus

constatnt value 의 넓고 평평한 지역에서는 Gradient, Hessian 모두 0 인데. 그런 곳에서는 모든 numerical optiomization algorithm 에 문제가 됨.

convex problem 에서 이런 지역은 반드시 global minima 로 구성 되어야 하지만 일반적인 최적화 문제에서 그런 지역은 objective function 의 high vlaue 에 상응 할 거다.

(high value 라서 알아서 벗어날테니 별 걱정 없다는 이야기인가? 볼 수 잇는 measure 이 GD 도 Hessian 도 다 0 인데 이걸 어떡하나;)

8.2.4 Cliffs and Exploding Gradients(GD 관련)

Cliff 는 several large weight 들이 함께 곱해지면서 생기는데 이런 곳이 자주 나오고

여기서 모두 함께 뛰어내림(jumping off of the cliff stucture altogether)

그리고 뛰어내리는 것과 별개로 우선 이 주변에가면 멀리 던져버리는데 이러면 그동안 해오던 most of the optimization work 을 잃어버린다.

그래도 이런건 gradient clipping 으로 피할 수 있다.

GD 는 infinitesimal 지역내에서 방향만 알려준다.

Cliff 는 주로 RNN 에서 step 이 많아질 때 발생한다.(Exploing gradient)

8.2.5 Long-Term Dependencies(GD 관련)

computational graph 가 아주 깊어질때 문제가 발생한다.

eigenvalue of W 의 manitude 가 1에 가까우면 그대로일지라도 1보다 크면 explode(unstable=> gradient clipping), 1보다 작으면 vanish(difficult to know which direction)

그리고 이를보면 diag(lambda)^t 에 따라 scale 된다.

결국 W의 t 승인데 이는 matrix W 의 largest eigenvalue(eigenvector) 를 찾는 power method 알고리즘과 비슷하다.

power method 라는 관점에서 보면 x^TW^t 가 결국 W 의 principal eigen vector 에 orthogonal 한 x의 모든 component 를 버린다는 것이 놀랍지 않다.(power method 볼 것)

FF 는 괜찮고 대부분 RNN 에서 발생(Sussillo 2014)

8.2.6 Inexact Gradients(GD 관련)

Gradient 나 Hessian matrix가 부정확한게.. (Training Set 이 이상해서인가?라기 보다는) Sampling 때문

아니면 objective function 이 사실상 intractable, 이럴때는 gradient 도 intractable 하다. 아마 데이터가 이상할때?

그럴때는 graident 를 근사할 수 밖에..

이런 경우는 more advanced 한 모델에서 발생.

예를들어 contrastive divergence 는 Boltzman machine 의 intractable 한 log-likelihood 의 gradient appoximating 을 위한 방법임

다양한 최적화 알고리즘이 그런 imperfections in the gradient estimatㄷ 를 위해 만들어졌고 true loss 대신에 surrogate loss function 을 선택하면서 피할 수 있다.

8.2.7 Poor Correspondence between Local and Global Structure()

지금 까지는 한지점에서의 loss function 의 특성에 상응했다.

non-local modex 를 사용하는 알고리즘이 개발 되면 좋겠다.

bias or varaince 끼면 objective function 의 올바른 방향으로 가는 근사에 문제 생길 수 있다.

(In these case, local descent may or may not define a reasonably short path to a valid solution, but we are not actually able to follow the local descent path.)

local descent 에 대한 이야기에서 너무 조금 씩 간다? 그러면서 제대로도 못간다? epsilon 보다 작은 delta 만큼 가서.. local information 이 좋은 가이드가 아닐 수 있다.(언제그러냐면 the function has a wide flat region 이거나 만약에 우리가 정확히 ciritical point 에 착륙 했을때

- 정확히 착륙하는 경우는 명시적으로 critical points 를 푸는 방법에서 발생, 그 방법은 Newton's method 같은 것 즉, Newton 해도 문제 풀기엔 좋지만 이런저런 문제 발생하고 이게 그중 하나 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0정확히 도착하고 다른데감;)

올바른 곳에서 시작할 수 있고 solution 으로 직접적으로 연결된 공간의 지역(물론 local descent 가 따라갈 수 있는..)이 존재한다면 그런 문제들을 피할 수 있다.

결국 전통적인 최적화 알고리즘을 사용하기 위한 좋은 시작점을 선택하는 것을 추천한다는 것.

8.2.8 Theoretical Limits of Optimization

The limits on the performance of any optimization algorithm.. we might design for neural networks.

Typically these results have little bearing on the use of neural entworks in practice.

몇몇 이론적인 결과들.. 은 오직 NN의 출력이 이산 값인 경우 적용됨.

하지만 대부분의 NN 유닛은 local search 를 통해서 최적화는 것을 가능케 하는 smoothly increasing values 을 출력함.

몇몇 이론 적인 결과들은 intractable 한 문제의 클래스가 존재하는 것을 보여주지만 특정 문제가 이런 클래스로 들어가는지 아닌지 말하긴 어려워..

또 다른 결과들은 주어진 사이즈의 네트워크를 위한 솔류션을 찾는게 intractable 하다고 해. 실상은 그냥 큰 NN 으로 수긍할만한한 솔류션에 도달하는 방식으로 찾아내지;;;

더우기.. NN 훈련할때 딱히 exact minimum of a function 을 찾는다기 보다는 그냥 좋은 일반화 오류를 얻기 위해서 이 값을 줄이는 것을 찾지.

최적화 알고리즘이 이 골을 달성할지는 아주 어렵지;

그냥 못한다 가아니고 the performance of optimization algorithms 의 realistic bounds 을 개발하는 것이 ML 연구의 중요한 골로 남아있어.

8.3 Basic Algirhtms(과연 Basic 일까;)

8.3.1 Stochastic Gradient Descent

8.3.2 Momentum(Hinton 5, 6)

8.3.3 Nestrov Momentum(Hinton 5, 6)

8.4 Parameter Initialization Strategies

8.5 Algorithms with Adaptive Learning Rates

8.5.1 AdaGrad

8.5.2 RMSProp

8.5.3 Adam

8.5.4 Choosing the Right Optimization Algorithm

8.6 Approximate Second-Order Methods

8.6.1 Newton's Method 드디어 나왔군;;

8.6.2 Conjugate Gradients 음;;

8.6.3 BFGS 헉;;

8.7 Optimization Strategies and Meta-Algirithms

8.7.1 Batch Normalization

8.7.2 Coordinate Descent

8.7.3 Polyak Averaging

8.7.4 Supervised Pretraining(그냥 생각하면 별거 아닌것 같은데 그게 아니겠지;)

8.7.5 Designing Models to Aid Optimization(큰 주제 같은데 작은 절이네;;)

8.7.6 Continuation Methods and Curriculum Learning(CL 은 그냥 커리큘럼? )

Prerequisite concepts

jacobian

hessian matrix(geometrically)

taylor series

power method(누승법)

eigen value, vector pair(geometrically)

▼ more
DL 8 장 1
2016-10-14 07:46:27

간단한 걸 하는데도 오래 걸려서 Optimization 을 하게 된다.

또한 Generalization 을 위해서도!

오류함수를 줄이는데 집중해서 설명할 거고..

1) Optimization for ML 이 Pure Optimization 과 어떻게 다른지 보여줄거고.

2) Contrete Challenges that make optimization of neural networks difficult

3) Optimization algirthm 자체와 파라메터 초기화 전략들에 대한 실질적인 알고리즘을 정의함

4) Learning rate 적응, leverage information contained in the second derivatives of the 오류함수

5) 단순한 걸합쳐서 higher-level prodecure 로 형성한 것을 리뷰함

8.1 How Learning differs from Pure Optimization

P 를 원하면서 간접적으로 J(theta)를 줄이는 것을 함.

Rather than optimizing the risk directly, we optimize the empirical risk, and "hope" that the risk decreases significantly as well.

2가지 문제

8.1.2 Surrogate Loss Functions and Early Stopping

loss function 은 최적화가 효과 적으로 안될 수 있어 예를 들면 정확하게 기대되는 0에서 1사이의 로스를 최소화하는게 일반적으로 intractable 한경우.. 심지어 선형 분별기에게도. 이러면 못하지.

이럴때 써로 게이트 로스펑션을 쓰겠다. which acts as a proxy but has advantages. 근사인가?

NLL 같은게 Binary(0-1) loss 의 surrogate!

ML 은 local minimum 이아니라 early stopping 이 만족되는 곳에서 멈춘다.

0-1 로 validation 보다가 overfitting 하면 멈춤

while the surrogte loss function still has large derivative 일때도 멈춤..

8.1.3 Batch and Minibatch Algorithms

objective functions usually decomposes as a sum over the tarining examples.

(나를 슬프게한 통계학이지만 정규화 이야기가 나오면서 위로해준다. 그렇다고 안슬프다는 건 아니다;)

SE 가 작아지니 Example 이 많아지면..

더 빠르게(update 수가 아닌 total computation !) 수렴할거다.

small set 에서 하는 다른이유!

redundancy in the training set

identical 하진 않아도 gradient 에 비슷한 영향을 주는 걸 많이 볼거다.

훈련셋 전체로 훈련 하지는 않는다. more than one but less than all of the training examples.(minibatch or minibatch stochastic => now common to simply call them stochastic methods)

데이터를 볼 때 반드시 stat 들 .. 뭐 이를테면 평균 분산 이런거 생각하면서 봐야한다.

variablity 를 생각하면서 batch 의 사이즈가 줄면 variability 예를 들면 Standard Error

shuffle 은 1번 그리고 minibatch 에서는 안섞고 그대로 사용

minibatch 의 SGD면서 data reuse 없으면 global minima?(generalization error)

8.2 Challenges in Neural Network Optimization

ML 은 convex 로 최적화 문제를 보장하는 제한을 두고 세심하게 목적함수를 디자인하면서 일반화 최적화 문제를 피했는데... NN 에서는 general non-convex case 를 다뤄야한다.

convex optimization 도 복잡하다;;(Even convex optimization is not without its complications.)

8.2.1 Ill-Conditioning

convex function 을 최적할때도 문제는 발생한다.

그건바로 Hessian matrix H 의 ill-conditioning!!

왜 테일러 급수로 표현된 부분이 양수가 되면 문제가되나?? 늘어나서 인가..

gg 부분은 별로안커진다고 하고 gHg 가 커질 테니 위 기준대로면 그냥 문제임 훈련동안 squared gg, gHg 를 보는 수밖에

gradient 는 안줄어들고 gHg an order of magnitue 보다 늘어남!! 결국 gradient norm 전체는 늘어남 좋�\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0�� 곳에 도착해도 줄지를 않는다(critical point)

8.2.2 Local Minima

이역시 convex problem 의 대표주자

이말은 뭔가 "Any local minimal is guaranteed to be a global minimum"

local minima 는 flat 이고 acceptable?

=> 위까지는 NN이 아닌듯?

non-convex 인 NN 은 많은 local minimal!!! 있고 major problem 일 필요는 없음

multiple equivaliently parameterized latent variables 은 모두 multiple local minima 가 있는데 이는

model identifiability problem 때문임.

Prerequisite concepts

jacobian

hessian

taylor series

▼ more