+ - 0:00:00
Notes for current slide
Notes for next slide

Dimension Reduction:
Autoencoders

Anastasios Panagiotelis

University of Sydney

1

Outline

  • Neural Network
2

Outline

  • Neural Network
    • An entire course could be done on neural networks, I will give only the basic idea.
2

Outline

  • Neural Network
    • An entire course could be done on neural networks, I will give only the basic idea.
  • Idea behind Autoencoder
2

Outline

  • Neural Network
    • An entire course could be done on neural networks, I will give only the basic idea.
  • Idea behind Autoencoder
    • Has the same input and output.
    • Is narrow in the middle.
2

Neural Networks

3

Autoencoders are Neural Nets

  • Many of you are probably familiar with neural networks.
4

Autoencoders are Neural Nets

  • Many of you are probably familiar with neural networks.
  • The autoencoder is a neural network with a clever trick for dimension reduction.
4

Autoencoders are Neural Nets

  • Many of you are probably familiar with neural networks.
  • The autoencoder is a neural network with a clever trick for dimension reduction.
  • Briefly cover neural nets for those without any background.
4

The meat grinder

  • Considers inputs x, a target t and some function f() such that f(x) is close to the target t
5

The meat grinder

  • Considers inputs x, a target t and some function f() such that f(x) is close to the target t
  • Consider a the analogy of a meat grinder used to make salami.

5

Inside the grinder

6

Details

  • What happens at each node?
  • First a linear combination is taken of all inputs to a node
    • Made up of weights and biases (intercepts) that need to be estimated.
  • The linear combination is passed through a non linear function
    • Sigmoid function
    • RELU
7

Training a neural network

  • Consider a loss function that compares output to target
    • Mean square error
    • 0-1 loss
    • ...
8

Training a neural network

  • Consider a loss function that compares output to target
    • Mean square error
    • 0-1 loss
    • ...
  • Find values of weights and biases that minimise the loss function over a training sample.
8

How to do this?

  • Many computational tricks for finding optimal weights
    • Automatic differentiation
    • (Stochastic) Gradient Descent
    • Use of GPUs
9

How to do this?

  • Many computational tricks for finding optimal weights
    • Automatic differentiation
    • (Stochastic) Gradient Descent
    • Use of GPUs
  • Only a different course could do this justice.
9

Trained Neural Net

10

Auto-encoders

11

Stretching the analogy

  • Consider the aim is not to make salami but dimension reduction.
12

Stretching the analogy

  • Consider the aim is not to make salami but dimension reduction.
  • The idea is to break ingredients down into protons, electrons and neutrons.
12

Stretching the analogy

  • Consider the aim is not to make salami but dimension reduction.
  • The idea is to break ingredients down into protons, electrons and neutrons.
  • A neural network can be constructed for this problem.
12

Stretching the analogy

  • Consider the aim is not to make salami but dimension reduction.
  • The idea is to break ingredients down into protons, electrons and neutrons.
  • A neural network can be constructed for this problem.
  • The trick is to use all variables as both input and output.
12

An autoencoder

13

The key idea

  • There is a "skinny" middle layer containing fewer nodes than input (and output) variables.
14

The key idea

  • There is a "skinny" middle layer containing fewer nodes than input (and output) variables.
  • Everything up to this skinny part is called "the encoder"
14

The key idea

  • There is a "skinny" middle layer containing fewer nodes than input (and output) variables.
  • Everything up to this skinny part is called "the encoder"
    • Think of this as breaking down ingredients into protons, neutrons and electrons.
14

The key idea

  • There is a "skinny" middle layer containing fewer nodes than input (and output) variables.
  • Everything up to this skinny part is called "the encoder"
    • Think of this as breaking down ingredients into protons, neutrons and electrons.
  • Everything past this skinny part is the "decoder"
14

The key idea

  • There is a "skinny" middle layer containing fewer nodes than input (and output) variables.
  • Everything up to this skinny part is called "the encoder"
    • Think of this as breaking down ingredients into protons, neutrons and electrons.
  • Everything past this skinny part is the "decoder"
    • Think of this as reconstructing the ingredients.
14

And that's it!

  • An autoencoder is simply a neural network that
15

And that's it!

  • An autoencoder is simply a neural network that
    • Has the same input and output
    • Get's "skinny" in the middle
15

And that's it!

  • An autoencoder is simply a neural network that
    • Has the same input and output
    • Get's "skinny" in the middle
  • The advantages and disadvantages are the usual advantages and disadvantages of neural networks.
15

Advantages

  • Very flexible and non-linear
16

Advantages

  • Very flexible and non-linear
  • Can borrow ideas from neural network literature
16

Advantages

  • Very flexible and non-linear
  • Can borrow ideas from neural network literature
    • Using convolutional layers for images
    • Using recurrent layers for time series
16

Advantages

  • Very flexible and non-linear
  • Can borrow ideas from neural network literature
    • Using convolutional layers for images
    • Using recurrent layers for time series
  • Plenty of software and efficient packages
16

Software

  • Can be implemented using the dimRed package.
17

Software

  • Can be implemented using the dimRed package.
  • However this merely wraps around tensorflow
17

Software

  • Can be implemented using the dimRed package.
  • However this merely wraps around tensorflow
    • Need to have reticulate and Python properly configured
17

Software

  • Can be implemented using the dimRed package.
  • However this merely wraps around tensorflow
    • Need to have reticulate and Python properly configured
    • Can be a bit time consuming and tricky.
17

Software

  • Can be implemented using the dimRed package.
  • However this merely wraps around tensorflow
    • Need to have reticulate and Python properly configured
    • Can be a bit time consuming and tricky.
    • For autoencoders probably better to use Python.
17

Disadvantages

  • Lots of tuning
    • How many layers?
    • Which activation function?
18

Disadvantages

  • Lots of tuning
    • How many layers?
    • Which activation function?
  • Lots of parameters
    • Sparsity
18

Disadvantages

  • Lots of tuning
    • How many layers?
    • Which activation function?
  • Lots of parameters
    • Sparsity
  • Lots of training data often needed
18

Questions?

19

Outline

  • Neural Network
2
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow