CPSC 340: Machine Learning and Data Mining. Deep Learning Fall 2016

Similar documents
11. Neural Network Regularization

CS 6501: Deep Learning for Computer Graphics. Training Neural Networks II. Connelly Barnes

Improving the way neural networks learn Srikumar Ramalingam School of Computing University of Utah

Lecture 2 Notes. Outline. Neural Networks. The Big Idea. Architecture. Instructors: Parth Shah, Riju Pahwa

Deep Neural Networks Optimization

COMP 551 Applied Machine Learning Lecture 16: Deep Learning

Deep Learning. Volker Tresp Summer 2014

Machine Learning. Deep Learning. Eric Xing (and Pengtao Xie) , Fall Lecture 8, October 6, Eric CMU,

CPSC 340: Machine Learning and Data Mining. Logistic Regression Fall 2016

Deep Learning with Tensorflow AlexNet

Deep Learning for Computer Vision II

Lecture 20: Neural Networks for NLP. Zubin Pahuja

Deep Learning. Vladimir Golkov Technical University of Munich Computer Vision Group

Perceptron: This is convolution!

CPSC 340: Machine Learning and Data Mining. Deep Learning Fall 2018

CPSC 340: Machine Learning and Data Mining. Principal Component Analysis Fall 2016

Natural Language Processing CS 6320 Lecture 6 Neural Language Models. Instructor: Sanda Harabagiu

CMU Lecture 18: Deep learning and Vision: Convolutional neural networks. Teacher: Gianni A. Di Caro

Natural Language Processing with Deep Learning CS224N/Ling284. Christopher Manning Lecture 4: Backpropagation and computation graphs

CS489/698: Intro to ML

CENG 783. Special topics in. Deep Learning. AlchemyAPI. Week 11. Sinan Kalkan

Deep Learning. Practical introduction with Keras JORDI TORRES 27/05/2018. Chapter 3 JORDI TORRES

Lecture : Training a neural net part I Initialization, activations, normalizations and other practical details Anne Solberg February 28, 2018

Neural Networks for Machine Learning. Lecture 15a From Principal Components Analysis to Autoencoders

Deep Learning for Computer Vision

The exam is closed book, closed notes except your one-page cheat sheet.

COMP9444 Neural Networks and Deep Learning 5. Geometry of Hidden Units

CPSC 340: Machine Learning and Data Mining. More Linear Classifiers Fall 2017

Deep Learning Workshop. Nov. 20, 2015 Andrew Fishberg, Rowan Zellers

Inception Network Overview. David White CS793

CPSC 340: Machine Learning and Data Mining. Feature Selection Fall 2016

Neural Network Optimization and Tuning / Spring 2018 / Recitation 3

Machine Learning. The Breadth of ML Neural Networks & Deep Learning. Marc Toussaint. Duy Nguyen-Tuong. University of Stuttgart

A Simple (?) Exercise: Predicting the Next Word

Neural Networks for unsupervised learning From Principal Components Analysis to Autoencoders to semantic hashing

Deep Learning. Visualizing and Understanding Convolutional Networks. Christopher Funk. Pennsylvania State University.

CNN Basics. Chongruo Wu

Restricted Boltzmann Machines. Shallow vs. deep networks. Stacked RBMs. Boltzmann Machine learning: Unsupervised version

CPSC 340: Machine Learning and Data Mining. Principal Component Analysis Fall 2017

CPSC 340: Machine Learning and Data Mining. Multi-Dimensional Scaling Fall 2017

Dynamic Routing Between Capsules

Lecture : Neural net: initialization, activations, normalizations and other practical details Anne Solberg March 10, 2017

All You Want To Know About CNNs. Yukun Zhu

COMP9444 Neural Networks and Deep Learning 7. Image Processing. COMP9444 c Alan Blair, 2017

Global Optimality in Neural Network Training

Machine Learning. MGS Lecture 3: Deep Learning

Deep neural networks II

Optimization in the Big Data Regime 5: Parallelization? Sham M. Kakade

1 Training/Validation/Testing

Neural Network Neurons

CSC 578 Neural Networks and Deep Learning

An Introduction to NNs using Keras

Fuzzy Set Theory in Computer Vision: Example 3, Part II

Keras: Handwritten Digit Recognition using MNIST Dataset

Akarsh Pokkunuru EECS Department Contractive Auto-Encoders: Explicit Invariance During Feature Extraction

CPSC 340: Machine Learning and Data Mining. Robust Regression Fall 2015

Efficient Deep Learning Optimization Methods

Computer Vision: Homework 5 Optical Character Recognition using Neural Networks

A Quick Guide on Training a neural network using Keras.

Tutorial on Keras CAP ADVANCED COMPUTER VISION SPRING 2018 KISHAN S ATHREY

Gradient Descent Optimization Algorithms for Deep Learning Batch gradient descent Stochastic gradient descent Mini-batch gradient descent

More on Neural Networks. Read Chapter 5 in the text by Bishop, except omit Sections 5.3.3, 5.3.4, 5.4, 5.5.4, 5.5.5, 5.5.6, 5.5.7, and 5.

CSE 559A: Computer Vision

EE 511 Neural Networks

Neural Networks. Single-layer neural network. CSE 446: Machine Learning Emily Fox University of Washington March 10, /10/2017

Machine Learning With Python. Bin Chen Nov. 7, 2017 Research Computing Center

Neural Networks. CE-725: Statistical Pattern Recognition Sharif University of Technology Spring Soleymani

CS 179 Lecture 16. Logistic Regression & Parallel SGD

SEMANTIC COMPUTING. Lecture 8: Introduction to Deep Learning. TU Dresden, 7 December Dagmar Gromann International Center For Computational Logic

CIS581: Computer Vision and Computational Photography Project 4, Part B: Convolutional Neural Networks (CNNs) Due: Dec.11, 2017 at 11:59 pm

3D model classification using convolutional neural network

Deep Convolutional Neural Networks. Nov. 20th, 2015 Bruce Draper

SEMANTIC COMPUTING. Lecture 9: Deep Learning: Recurrent Neural Networks (RNNs) TU Dresden, 21 December 2018

Simple Model Selection Cross Validation Regularization Neural Networks

ImageNet Classification with Deep Convolutional Neural Networks

Deep Learning Applications

Deep Learning & Neural Networks

Deep Learning Cook Book

Research on Pruning Convolutional Neural Network, Autoencoder and Capsule Network

Parallelization in the Big Data Regime 5: Data Parallelization? Sham M. Kakade

Ensemble methods in machine learning. Example. Neural networks. Neural networks

HW Assignment 3 (Due by 9:00am on Mar 6)

LSTM: An Image Classification Model Based on Fashion-MNIST Dataset

Knowledge Discovery and Data Mining. Neural Nets. A simple NN as a Mathematical Formula. Notes. Lecture 13 - Neural Nets. Tom Kelsey.

Knowledge Discovery and Data Mining

Introduction to Deep Learning

Multi-layer Perceptron Forward Pass Backpropagation. Lecture 11: Aykut Erdem November 2016 Hacettepe University

Index. Umberto Michelucci 2018 U. Michelucci, Applied Deep Learning,

Stacked Denoising Autoencoders for Face Pose Normalization

CS 4510/9010 Applied Machine Learning. Neural Nets. Paula Matuszek Fall copyright Paula Matuszek 2016

Autoencoders. Stephen Scott. Introduction. Basic Idea. Stacked AE. Denoising AE. Sparse AE. Contractive AE. Variational AE GAN.

CPSC 340: Machine Learning and Data Mining. More Regularization Fall 2017

Smart Content Recognition from Images Using a Mixture of Convolutional Neural Networks *

Multinomial Regression and the Softmax Activation Function. Gary Cottrell!

The Mathematics Behind Neural Networks

The exam is closed book, closed notes except your one-page (two-sided) cheat sheet.

Machine Learning 13. week

Model Generalization and the Bias-Variance Trade-Off

Practical Methodology. Lecture slides for Chapter 11 of Deep Learning Ian Goodfellow

Advanced Video Analysis & Imaging

Transcription:

CPSC 340: Machine Learning and Data Mining Deep Learning Fall 2016

Assignment 5: Due Friday. Assignment 6: Due next Friday. Final: Admin December 12 (8:30am HEBB 100) Covers Assignments 1-6. Final from last year and list of topics will be posted. Closed-book, cheat sheet: 4-pages each double-sided.

Last Time: Deep Learning https://en.wikibooks.org/wiki/sensory_systems/visual_signal_processing

Autoencoders Autoencoders are an unsupervised deep learning model: Use the inputs as the output of the neural network. Middle layer could be latent features in non-linear latent-factor model. Can do outlier detection, data compression, visualization, etc. http://inspirehep.net/record/1252540/plots

https://www.cs.toronto.edu/~hinton/science.pdf Autoencoders

Denoising Autoencoder Denosing autoencoders add noise to the input: Learns a model that can remove the noise. http://inspirehep.net/record/1252540/plots

Deep Learning Practicalities This lecture focus on deep learning practical issues: Backpropagation to compute gradients. Stochastic gradient training. Regularization to avoid overfitting. Next lecture: Special W restrictions to further avoid overfitting.

Last Time: Backpropagation with 1 Hidden Layer Squared loss our objective function with 1 layer and 1 example: Gradient with respect to element of vector w. Gradient with respect to element of matrix W. Only r i changes if you aren t using squared error.

Last Time: Backpropagation with 1 Hidden Layer Squared loss our objective function with 1 layer and 1 example: Gradient with respect to elements of vector w and W : Backpropagation algorithm: Forward propagation computes z i = h(w c x i ) then w T z i. Backpropagation step 1: use r i to get gradient of w. Backpropagation step 2: use r i and v c to get gradient of W.

Backpropagation with 2 Hidden Layer General objective function with 2 layers and 1 example: Gradient with respect to element of vector w : Gradient with respect to element of matrix W (2) : Gradient with respect to element of matrix W (1) :

Last Time: Backpropagation with 3 Hidden Layers General objective function with 3 layers and 1 example: Gradients have the form: Backpropagation algorithm: Forward propagation computes r and z (m) for all m. Backpropagation step 1: use r to get gradient of w. Backpropagation step 2: use a c to get gradient of W (3). Backpropagation step 3: use b c to get gradient of W (2). Backpropagation step 4: use d c to get gradient of W (1).

Last Time: Backpropagation with 3 Hidden Layers Backpropagation algorithm: Forward propagation computes r and z (m) for all m. Backpropagation step 1: use r to get gradient of w. Backpropagation step 2: use a c to get gradient of W (3). Backpropagation step 3: use b c to get gradient of W (2). Backpropagation step 4: use d c to get gradient of W (1). Cost of backpropagation: Forward pass dominated by multiplications by W (1), W (2), W (3), and w. If have m layers and all z i have k elements, cost would be O(dk + mk 2 ). Backward pass has same cost. For multi-class or multi-label classification, replace w by matrix. Softmax loss is called cross entropy in neural network papers.

ImageNet challenge: Last Time: ImageNet Challenge Use millions of images to recognize 1000 objects. ImageNet organizer visited UBC summer 2015. Besides huge dataset/model/cluster, what is the most important? 1. Image transformations (translation, rotation, scaling, lighting, etc.). 2. Optimization. Why would optimization be so important? Neural network objectives are highly non-convex (and worse with depth). Optimization has huge influence on quality of model.

Stochastic Gradient Training Standard training method is stochastic gradient (SG): Choose a random example i. Use backpropagation to get gradient with respect to all parameters. Take a small step in the negative gradient direction. Challenging to make SG work: Often doesn t work as a black box learning algorithm. But people have developed a lot of tricks/modifications to make it work. Highly non-convex, so are the problem local mimina? Some empirical/theoretical evidence that local minima are not the problem. If the network is deep and wide enough, we think all local minima are good. But it can be hard to get SG to even find a local minimum.

Parameter Initialization Parameter initialization is crucial: Can t initialize weights in same layer to same value, or they will stay same. Can t initialize weights too large, it will take too long to learn. A traditional random initialization: Initialize bias variables to 0. Sample from standard normal, divided by 10 5 (0.00001*randn). Performing multiple initializations does not seem to be important. Popular approach from 10 years ago: Initialize with deep unsupervised model (like autoencoders).

Parameter Initialization Parameter initialization is crucial: Can t initialize weights in same layer to same value, or they will stay same. Can t initialize weights too large, it will take too long to learn. Also common to standardize data: Subtract mean, divide by standard deviation, whiten, standardize y i. More recent initializations try to standardize initial z i : Use different initialization in each layer. Try to make variance of z i the same across layers. Use samples from standard normal distribution, divide by sqrt(2*ninputs). Use samples from uniform distribution on [-b,b], where

Setting the Step-Size Stochastic gradient is very sensitive to the step size in deep models. Common approach: manual babysitting of the step-size. Run SG for a while with a fixed step-size. Occasionally measure error and plot progress: If error is not decreasing, decrease step-size.

Setting the Step-Size Stochastic gradient is very sensitive to the step size in deep models. More automatic method is Bottou trick: 1. Grab a small set of training examples (maybe 5% of total). 2. Do a binary search for a step size that works well on them. 3. Use this step size for a long time (or slowly decrease it from there). Several recent methods using a step size for each variable: AdaGrad, RMSprop, Adam.

Setting the Step-Size Stochastic gradient is very sensitive to the step size in deep models. Bias step-size multiplier: use bigger step-size for the bias variables. Momentum: Add term that moves in previous direction: Batch size (number of random examples) also influences results. Another recent trick is batch normalization: Try to standardize the hidden units within the random samples as we go.

Vanishing Gradient Problem Consider the sigmoid function: Away from the origin, the gradient is nearly zero. The problem gets worse when you take the sigmoid of a sigmoid: In deep networks, many gradients can be nearly zero everywhere.

Rectified Linear Units (ReLU) Replace sigmoid with hinge-like loss (ReLU): The gradient is zero or x i, depending on the sign. Fixes vanishing gradient problem. Gives sparser of activations. Not really simulating binary signal, but could be simulating rate coding.

Deep Learning and the Fundamental Trade-Off Neural networks are subject to the fundamental trade-off: As we increase the depth, training error decreases. As we increase the depth, training error no longer approximates test error. We want deep networks to model highly non-linear data. But increasing the depth leads to overfitting. How could GoogLeNet use 22 layers? Many forms of regularization and keeping model complexity under control.

Standard Regularization We typically add our usual L2-regularizers: L2-regularization is called weight decay in neural network papers. Could also use L1-regularization. Hyper-parameter optimization: Try to optimize validation error in terms of λ 1, λ 2, λ 3, λ 4. Unlike linear models, typically use multiple types of regularization.

Early Stopping Second common type of regularization is early stopping : Monitor the validation error as we run stochastic gradient. Stop the algorithm if validation error starts increasing. http://cs231n.github.io/neural-networks-3/

Dropout Dropout is a more recent form of regularization: On each iteration, randomly set some x i and z i to zero (often use 50%). Encourages distributed representation rather than using specific z i. http://www.cs.toronto.edu/~rsalakhu/papers/srivastava14a.pdf

Convolutional Neural Networks Typically use multiple types of regularization: L2-regularization. Early stopping. Dropout. Often, still not enough to get deep models working. Deep computer vision models are all convolutional neural nets: The W (m) are very sparse and have repeated parameters ( tied weights ). Drastically reduces number of parameters (speeds up training).

Summary Autoencoders are unsupervised neural net latent-factor models. Parameter initialization is crucial to neural net performance. Optimization and step size are crucial to neural net performance. Regularization is crucial to neural net performance: L2-regularizaiton, early stopping, dropout. Next time: Convolutions, convolutional neural networks, and rating selfies.