Abstract

In this article we focus on two supervised visual reasoning tasks whose labels encode a semantic relational rule between two or more objects in an image: the MNIST Parity task and the colorized Pentomino task. The objects in the images undergo random translation, scaling, rotation and coloring transformations. Thus these tasks involve invariant relational reasoning. We observed uneven performance of various deep convolutional neural network (CNN) models on these two tasks. For the MNIST Parity task, we report that the VGG19 model soundly outperforms a family of ResNet models. Moreover, the family of ResNet models exhibits a general sensitivity to random initialization for the MNIST Parity task. For the colorized Pentomino task, now both the VGG19 and ResNet models exhibit sluggish optimization and very poor test generalization, hovering around 30% test error. The CNN models we tested all learn hierarchies of fully distributed features and thus encode the distributed representation prior. We are motivated by a hypothesis from cognitive neuroscience which posits that the human visual cortex is modularized (as opposed to fully distributed), and that this modularity allows the visual cortex to learn higher order invariances. To this end, we consider a modularized variant of the ResNet model, referred to as a Residual Mixture Network (ResMixNet) which employs a mixture-of-experts architecture to interleave distributed representations with more specialized, modular representations. We show that very shallow ResMixNets are capable of learning each of the two tasks well, attaining less than 2% and 1% test error on the MNIST Parity and the colorized Pentomino tasks respectively. Most importantly, the ResMixNet models are extremely parameter efficient: generalizing better than various non-modular CNNs that have over 10x the number of parameters. These experimental results support the hypothesis that modularity is a robust prior for learning invariant relational reasoning.


이번 논문에서는 두 가지 이상의 객체에서 의미적 relational rule을 레이블로 인코딩하는 supervised visual reasoning 작업인 MNIST Parity, Colorized Pentomino에 대해 다룬다.

이미지에서의 각 객체는 회전, 크기, 색 변환이 랜덤하게 이루어진다.

이러한 작업들은 invariant relational reasoning이 포함된다.

두 가지 작업에서 CNN의 고르지 않으며, 다양한 성능을 발견했다.

MNIST Parity 작업에서는 VGG19 모델이 ResNet모델보다 우수한 성능을 보여주었다.

또한, ResNet 계열은 MNIST Parity 작업의 랜덤 초기화에서 민감하게 반응한다.

Colorized Pentomino 작업의 경우, VGG19와 ResNet 모두 최적화가 느리고 일반화가 약하며 약 30%의 테스트 오류를 보여준다.

우리가 테스트한 CNN 모델은 모두 완전히 분산된 계층적 구조를 학습하고, 이러한 표현을 인코딩합니다.

우리는 인간의 시각 피질이 모듈화되고(완전히 분배되는 것과 대조해서), 이는 더 높은 수준의 invariance를 배울 수 있다고 인식하는 신경 과학의 가설에서 시작한다.

ResMixNet 모델을 제안한다. 이는 mixture-of-experts를 통해 더욱 특화되고, 모듈화된 표현을 동시에 사용할 수 있다.

우리는 매우 얕은 ResMixNet이 두 작업에서 각각 2%, 1%의 테스트 오류를 보여주며, 매우 잘 학습할 수 있다는 것을 확인했다.

더욱 중요한 것은, ResMixNet은 매우 효율적인 수의 파라미터를 가진다: 10배가 넘는 매개변수를 가진 모듈화되지 않은 CNN보다 더 좋다.

이러한 실험적 결과는 invariant relational reasoning를 학습하기 위해 모듈화가 중요한 요소라는 것을 보여준다.


요약

  • 기존의 CNN은 discriminative한 표현을 잘 학습하지만, i.i.d.의 조건때문에 adversarial한 공격에 취약하다.
  • 주요한 CNN은 분산된 feature를 계층적으로 매우 잘 학습할 수 있다. 이번 논문에서는 invariant relational rule을 살펴보기 위해 두 가지 데이터셋을 사용한다.
  • 먼저, MNIST Parity Dataset은 (64, 64)의 크기로 해당 이미지에 크기, 회전, 색깔을 랜덤으로 하여 숫자가 그려지게 된다. 이미지에 포함된 숫자가 만약 짝수이거나 홀수일 때, 같은 짝수(홀수)이면 1, 다르면 0을 레이블로 할당한다.

  • Colorized Pentomino Dataset은 동일하게 (64, 64)로 다음 그림과 같이 랜덤하게 그림을 생성한다. 만약 이미지에 포함된 도형의 모양이 같으면 0, 다르면 1을 레이블로 할당한다.

  • 두 가지 작업의 차이점은 MNIST는 curve한 특성이 있지만, Pentomino 같은 경우는 완전히 사각형의 특징만 가지고 있으며, 둘의 레이블은 각각 AND gate와 XOR gate 문제와 닮아있다. 학습 시에 MNIST의 curve한 특성이 매우 도움이 되기 때문에 Pentomino의 학습이 더 어렵다고 주장하고 있다.
  • 사용하는 모델은 이미지의 레이블이 변경되지 않는 상태에서 이미지 내부의 랜덤하게 생성된 도형을 잘 인식할 수 있어야 한다. 하지만 회전, 크기와 같은 invariant한 속성이 많을수록 inference problem이 존재한다.
  • 이러한 invariant한 속성을 모듈화시켜 각자 특화될 수 있도록 하는 ResMixNet을 제안한다.

  • 모델의 첫 단은 Conv로 구성하여 low-level의 feature를 공유할 수 있도록 한다. 다음으로는 M이라고 해서 Experts를 쌓아놓은 형태의 단순한 모델이다. G(Gater)는 단순히 4개의 Conv를 쌓고, 여기서 나온 가중치와 E(Experts)에서 나온 가중치를 matrix 곱해서 최종 결과를 만들어낸다.
  • MNIST Parity Dataset에서는 특이하게 VGG 모델이 다른 ResNet 계열보다 성능이 좋은 것을 확인할 수 있다.

  • Pentomino에서는 제안한 모델이 좋은 성능을 보여주었다.

  • CIFAR 데이터셋에서는 차이가 거의 나지 않거나, 떨어지는 현상을 보여주었다. 논문에서 그 이유로는 CIFAR-100은 비슷한 특징을 가지는 클래스가 많기 때문이라고 하면서, 제안한 모델은 high-level의 특징을 잘 학습하지 못하는 것 같다라고 한다.(비슷한 특징을 가지는 클래스일수록, 상당히 구체적인 특징을 잘 잡아낼 수 있어야한다.)

 

 

 

Reference

Jo, J., Verma, V., & Bengio, Y. (2018). Modularity Matters: Learning Invariant Relational Reasoning Tasks. arXiv preprint arXiv:1806.06765.
https://www.youtube.com/watch?v=dAGI3mlOmfw&list=PLWKf9beHi3Tg50UoyTe6rIm20sVQOH1br&index=93

Abstract

Humans and animals learn much better when the examples are not randomly presented but organized in a meaningful order which illustrates gradually more concepts, and gradually more complex ones. Here, we formalize such training strategies in the context of machine learning, and call them “curriculum learning”. In the context of recent research studying the difficulty of training in the presence of non-convex training criteria (for deep deterministic and stochastic neural networks), we explore curriculum learning in various set-ups. The experiments show that significant improvements in generalization can be achieved. We hypothesize that curriculum learning has both an effect on the speed of convergence of the training process to a minimum and, in the case of non-convex criteria, on the quality of the local minima obtained: curriculum learning can be seen as a particular form of continuation method (a general strategy for global optimization of non-convex functions).


인간과 동물은 무작위로 제시되지 않고, 간단한 것에서 점점 더 많은 개념과 복잡한 것을 의미있는 순서로 구성된 예제를 볼 때 더 학습을 잘한다.

우리는 머신러닝의 맥락에서 이러한 교육 전략을 공식화하고, 이를 커리큘럼 학습이라고 부른다.

non-convex 학습 기준(심층 결정론과 확률적 신경망)에서 학습의 어려움을 연구하는 최근 연구의 맥락에서,  우리는 다양한 셋업을 다루는 커리큘럼 학습을 탐구한다.

실험은 일반화에서 상당한 성능 향상을 보여주었다.

우리는 커리큘럼 학습이 학습 과정의 빠른 수렴과 non-convex의 조건하에서 local minima에 빠질 수 있는 확률이 낮아지는 효과를 가지고 있다고 가정한다.: 커리큘럼 학습은 (non-convext 함수의 전역 최적화를 위한 일반적 전략) 특정 형태의 연속 방법으로 볼 수 있다.


요약

  • 커리큘럼 학습은 일반적으로 사람이 초급 수준의 학습부터 대학 수준의 학습내용까지 긴 기간을 가지고 학습하는 경우를 의미하는데, 이를 머신러닝의 학습에 적용해보자는 것이다.
  • 커리큘럼 학습은 일반화와 빠른 수렴 속도의 장점을 가진다.
  • 논문에서 언급하고 있는 continuation method는 non-convex에서 좋은 local-minima를 찾기 위한 방법이다. 이 방법은 커리큘럼 학습과 같이 먼저 초기의 objective function을 쉽게 정의하고, 차츰 objective function을 어렵게 만들어 문제를 해결하는 방법이다. 이때 local minima는 계속 유지한다.
  • 다시, 커리큘럼 학습은 다시 쉽게 설명해서 처음에는 모델한테 쉬운 샘플만 보여주다가 점차 어려운 샘플을 보여주는 것이다. 학습 시에 전체 데이터를 한번에 학습시키는 것보다 쉬운 것과 어려운 것을 정의하여 [쉬운 것->어려운 것] 순으로 학습하라는 의미이다.
  • 쉬운 샘플을 정의하는 방법은 두 가지를 제시하고 있다. 첫 번째는 노이즈의 개수로 판단하는 것이고, 두 번째는 가우시안 분포의 바운더리에서 margin 거리를 활용하는 방법이 있다. margin 거리가 가까울수록 쉽고, 멀수록 어려운 샘플이라고 정의한다.
  • 실험에서는 shape recognition을 보여주고 있는데, 쉬운 샘플로는 정확한 모양의 원, 정사각형 등만 사용하고(Basic Shape), 어려운 샘플로는 직사각형, 타원 등이 포함된 것을 사용한다(Geom Shape).

 

Reference

Bengio, Y., Louradour, J., Collobert, R., & Weston, J. (2009, June). Curriculum learning. In Proceedings of the 26th annual international conference on machine learning (pp. 41-48).
https://www.youtube.com/watch?v=fQtuWEuwXrA&list=PLWKf9beHi3Tg50UoyTe6rIm20sVQOH1br&index=85

ABSTRACT

We introduce techniques for rapidly transferring the information stored in one neural net into another neural net. The main purpose is to accelerate the training of a significantly larger neural net. During real-world workflows, one often trains very many different neural networks during the experimentation and design process. This is a wasteful process in which each new model is trained from scratch. Our Net2Net technique accelerates the experimentation process by instantaneously transferring the knowledge from a previous network to each new deeper or wider network. Our techniques are based on the concept of functionpreserving transformations between neural network specifications. This differs from previous approaches to pre-training that altered the function represented by a neural net when adding layers to it. Using our knowledge transfer mechanism to add depth to Inception modules, we demonstrate a new state of the art accuracy rating on the ImageNet dataset.


이 논문은 한 가지 신경망이 담고 있는 정보를 다른 신경망으로 빠른 속도로 전이할 수 있는 방법을 소개한다.

주요 목적은 상당히 큰 신경망의 학습 속도를 가속화하는 것이다.

실제 업무에서 설계 과정과 실험동안 많은 신경망을 학습한다.

새로운 모델을 scratch에서부터 학습하는 것은 매우 소모적인 프로세스이다.

Net2Net 테크닉은 이전에 사용했던 신경망에서 더욱 깊고 와이드한 네트워크로 정보를 이전하는 실험 과정을 가속화한다.

이 기술은 신경망의 구성요소 간의 변환을 보존하는 기능을 기반으로 한다.

모델에 층을 추가할 때 신경망의 기능적 요소들이 변경되는 이전의 사전 학습과는 다른 방법이다.

이 방법을 사용하여 ImageNet 데이터셋에서 훌륭한 성능을 얻었다.


요약

  • 이 논문은 사전 학습된 작은 크기의 신경망의 정보를 좀 더 깊고 넓은 신경망에 전이 학습하려는 방법을 제안한다.
  • 기존의 문제를 해결할 때, 여러 가지 네트워크를 실험해보아야하고 실제로 이를 scratch부터 학습하는 것은 매우 시간이 많이 소모된다. 따라서 이 논문은 이전 네트워크의 정보를 더 큰 네트워크를 학습할 때 사용해볼 수는 없을까?에 대한 질문에서 시작된다.

  • 기존에 존재하던 방법인 FitNets는 이와 같은 방법을 수행할 수 있지만, 트레이닝이 필요하다는 단점이 존재한다. FitNets는 이전 네트워크의 feature map을 target으로 학습하는 네트워크이다.
  • 논문의 방법은 네트워크 구조에 제약을 주고, 트레이닝없이 transfer를 하는 것이다.
  • 네트워크를 더욱 와이드하게 구성할 경우, Teacher Net의 노드 중 하나를 랜덤하게 골라 사용하고, 늘어난 수만큼 가중치를 1/n 해준다.

  • 네트워크를 더욱 깊게 구성하는 경우, 간단하게 밑의 그림처럼 새 네트워크를 끼워서 Identity Mapping을 사용하는 방식이다. 대신 ReLU는 괜찮지만, sigmoid는 사용이 불가능하다.(시그모이드의 단점 때문?)

 

 

Reference

https://www.youtube.com/watch?v=btsZOMsyH_o&list=PLWKf9beHi3Tg50UoyTe6rIm20sVQOH1br&index=78
Chen, T., Goodfellow, I., & Shlens, J. (2015). Net2net: Accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641.

ABSTRACT

Neural networks are both computationally intensive and memory intensive, making them difficult to deploy on embedded systems with limited hardware resources. To address this limitation, we introduce “deep compression”, a three stage pipeline: pruning, trained quantization and Huffman coding, that work together to reduce the storage requirement of neural networks by 35× to 49× without affecting their accuracy. Our method first prunes the network by learning only the important connections. Next, we quantize the weights to enforce weight sharing, finally, we apply Huffman coding. After the first two steps we retrain the network to fine tune the remaining connections and the quantized centroids. Pruning, reduces the number of connections by 9× to 13×; Quantization then reduces the number of bits that represent each connection from 32 to 5. On the ImageNet dataset, our method reduced the storage required by AlexNet by 35×, from 240MB to 6.9MB, without loss of accuracy. Our method reduced the size of VGG-16 by 49× from 552MB to 11.3MB, again with no loss of accuracy. This allows fitting the model into on-chip SRAM cache rather than off-chip DRAM memory. Our compression method also facilitates the use of complex neural networks in mobile applications where application size and download bandwidth are constrained. Benchmarked on CPU, GPU and mobile GPU, compressed network has 3× to 4× layerwise speedup and 3× to 7× better energy efficiency.


신경망은 계산 및 메모리 집약적인 특성 떄문에 하드웨어 자원이 제한되어 있는 임베딩 환경에서 작동시키기가 어렵다.

이러한 제한점을 해결하기 위해, 정확도 손실 없이 35배에서 49배 저장 요구를 감소하는 작업을 수행하는 허프만 코딩, 프루닝, 학습 양자화의 세 가지 단계를 가지는 "deep compression"을 소개한다.

이 방법은 먼저 중요한 연결만 학습하도록 네트워크를 프루닝합니다.

다음으로 가중치 공유를 위해 가중치를 양자화하고, 마지막으로 허프만 코딩을 적용한다.

위의 두 가지 단계 이후에 나머지 연결과 양자화된 것들의 미세 조정을 위해 네트워크를 재학습합니다.

프루닝은 연결의 수를 9배에서 13배 감소시키고, 양자화는 각 연결을 나타내는 비트 수를 32에서 5로 줄입니다.

이미지넷 데이터셋에서 이 방법은 정확도 손실 없이 알렉스넷의 저장요구를 35배 줄였다.(240MB -> 6.9MB)

또한, 정확도 손실 없이 VGG-16 모델의 크기를 49배 감소시켰다.(552MB -> 11.3MB)

이는 off-chip DRAM memory이 아닌 on-chip SRAM에서의 모델 피팅을 가능케 한다.

우리의 압축 방법은 애플리케이션 크기와 다운로드 대역폭이 제한된 모바일 앱에서 복잡한 신경망 사용을 가능하게 한다.

CPU, GPU, 모바일 GPU에서 압축된 네트워크는 3 ~ 4배 빠른 속도와 3 ~ 7배 향상된 에너지 효율성을 나타낸다.


요약

  • 논문에서 제안하는 방법의 과정은 Pruning -> Quantization -> huffman coding이다.

  • 허프만 코딩은 확률에 따라 비트의 수가 달라진다는 점과 효과적인 디코딩 방법을 적용한다는 것이다.
  • 프루닝은 의미없는 네트워크 간 연결을 전부 끊어버리는 것을 의미한다. 이 같은 방법을 반복하면서 정확도를 유지하도록 한다.
  • Quantization은 일정 값으로 나누거나 대표값을 저장하는 것을 의미한다. 여기서는 대표값의 인덱스를 저장하여 비트수를 감소시킨다. 이러한 대표값은 quantization 과정의 동일 인덱스는 전부 동일 대표값을 사용하게 된다. 예를 들어, 밑의 그림에서 index 1은 전부 파란색 값을 사용하는 것과 같은 경우이다.

  • Quantization의 초기화는 uniform init이 가장 좋은 결과를 보여주는데, 그 이유는 다른 초기화 같은 경우는 크거나 작은 가중치를 고려하지 않는 결과가 발생하기 때문에 이 부분에서 정확도 감소가 일어난다고 한다.
  • 프루닝 또는 quantization만 사용한 경우보다 동시에 사용한 경우의 weight distribution이 좋게 나타나서 정확도 손실이나 모델 압축 측면에서 효과적이다.

 

 

Reference

Han, S., Mao, H., & Dally, W. J. (2015). Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149.
https://www.youtube.com/watch?v=9mFZmpIbMDs&list=PLWKf9beHi3Tg50UoyTe6rIm20sVQOH1br&index=72

Abstract

We propose Efficient Neural Architecture Search (ENAS), a fast and inexpensive approach for automatic model design. In ENAS, a controller discovers neural network architectures by searching for an optimal subgraph within a large computational graph. The controller is trained with policy gradient to select a subgraph that maximizes the expected reward on a validation set. Meanwhile the model corresponding to the selected subgraph is trained to minimize a canonical cross entropy loss. Sharing parameters among child models allows ENAS to deliver strong empirical performances, while using much fewer GPUhours than existing automatic model design approaches, and notably, 1000x less expensive than standard Neural Architecture Search. On the Penn Treebank dataset, ENAS discovers a novel architecture that achieves a test perplexity of 55.8, establishing a new state-of-the-art among all methods without post-training processing. On the CIFAR-10 dataset, ENAS finds a novel architecture that achieves 2.89% test error, which is on par with the 2.65% test error of NASNet (Zoph et al., 2018).


우리는 빠르고 계산 비용이 저렴한 자동화 모델 ENAS를 제안한다.

ENAS에서 컨트롤러는 거대한 계산 그래프에서 최적화된 그래프를 찾아 신경망 아키텍처를 발견한다.

컨트롤러는 검증셋에서의 보상을 최대화하는 서브그래프를 선택하는 정책 그래디언트를 통해 학습된다.

서브그래프에 해당하는 모델은 표준 크로스엔트로피 손실 함수를 최소화하도록 학습한다.

하위 모델간에 매개변수를 공유하는 것은 ENAS가 기존의 자동 모델 설계 방법보다 강력하고, 훨씬 적은 GPU를 사용하며, 1000 배 이상 비용이 저렴하다.

Penn Treebank 데이터셋에서 ENAS는 어떠한 전처리를 거치지 않고 가장 좋은 성능을 달성하였다.

CIFAR-10 데이터셋에서도 ENAS는 NASNet 2.65%에 가까운 2.89%의 테스트 에러를 보여주었다.


요약

  • NAS의 방식은 컨트롤러가 하이퍼파라미터를 예측해서 이를 반환해주고, 반환된 하이퍼파라미터를 통해 metric을 산출한 뒤, 이를 reward로 책정하여 강화학습을 통해 모델을 결정하는 방식
  • 기존의 NAS는 GPU 시간을 너무 많이 쓰고, 비효율적이라는 문제점이 존재한다. 또, 컨트롤러(RNN)가 뱉어내는 모델마다 새로 학습하기 때문에 병목 현상을 발생시키고 있다.
  • 이 논문에서 제안하는 ENAS는 RNN이 뱉어내는 모델의 파라미터를 공유하도록 해서 학습시간을 줄여보자는 것이다.

  • 위 그림에서 각 노드는 모델 구성에 결정할 하이퍼파라미터에 대한 정보를 담고 있고, 각 엣지는 어떤 노드로 연결될지를 의미한다. 각 노드안에서 사용한 파라미터는 다음 번에도 사용된다.
  • 첫 번째 노드 선택은 고정, 이후 노드 선택은 랜덤, 마지막 노드 선택은 남은 노드를 전부 선택하여 결과를 평균내는 방식으로 진행한다.
  • 큰 방식은 전체 모델 구조를 정한 뒤, 노드를 정해서 세부 구조를 정하는 방식.
  • 크게 다른 것은 없고, CNN 모델을 구성하는 경우에도 위와 같은 방식을 사용하여 모델을 구성한다는 것을 계속해서 설명한다.

 

 

Reference

Pham, H., Guan, M. Y., Zoph, B., Le, Q. V., & Dean, J. (2018). Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268.
https://www.youtube.com/watch?v=fbCcJaSQPPA&list=PLWKf9beHi3Tg50UoyTe6rIm20sVQOH1br&index=69