Natural Language Processing
|
|
- Kathleen Allison
- 5 years ago
- Views:
Transcription
1 Natural Language Processing Pushpak Bhattacharyya CSE Dept, IIT Patna and Bombay Recurrent Neural Network 1
2 NLP-ML marriage 2
3 An eample SMS complaint n I have purchased a 80 litre Videocon fridge about 4 months ago when the freeze go to sleep that time compressor give a sound (khat khat khat khat...) what is possible fault over it is normal I can't understand please help me give me a suitable answer. 3
4 Significant words (in red): after stop word removal n I have purchased a 80 litre Videocon fridge about 4 months ago when the freeze go to sleep that time compressor give a sound (khat khat khat khat...) what is possible fault over it is normal I can't understand please help me give me a suitable answer. 4
5 SMS classification Action complaint Emergency Hidden neurons 1 2 SMS feature vector: input neurons 5
6 Feedforward Network and Backpropagation 6
7 Gradient Descent Technique n Let E be the error at the output layer E = 1 2 p n j= 1 i= 1 ( t i o i ) 2 j n t i = target output; o i = observed output n i is the inde going over n neurons in the outermost layer n j is the inde going over the p patterns (1 to p) n E: XOR: p=4 and n=1 7
8 Backpropagation algorithm i w ji j... Output layer (m o/p neurons) Hidden layers. Input layer (n i/p neurons) n Fully connected feed forward network n Pure FF network (no jumping of connections over layers) 8
9 General Backpropagation Rule General weight updating rule: Where Δw = ηδ ji jo i δ j = ( t j o j ) o j (1 o j ) for outermost layer = ( w δ kj k ) o j (1 o j ) o k net layer i for hidden layers 9
10 How does it work? n Input propagation forward and error propagation backward (e.g. XOR) w 1 =1 θ = 0.5 w 2 =
11 Recurrent Neural Network (1 min recap) 11
12 Sequence processing m/c 12
13 E.g. POS Tagging VBD NNP NN Purchased Videocon machine 13
14 E.g. Sentiment Analysis I Decision on a piece of tet h 0 h 1 c 1 a 11 a 12 a 13 a 14 o 1 o 2 o 3 o 4 14
15 I like h 0 h 1 h 2 c 2 a 21 a 22 a 23 a 24 o 1 o 2 o 3 o 4 15
16 I like the h 0 h 1 h 2 h 3 c 3 a 31 a32 a33 a 34 o 1 o 2 o 3 o 4 16
17 I like the camera h 0 h 1 h 2 h 3 h 4 c 4 a 41 a42 a 43 a 44 o 1 o 2 o 3 o 4 17
18 I like the camera <EOS > h 0 h 1 h 2 h 3 h 4 h 5 Positive sentiment c 5 a 51 a52 a 53 a 54 o 1 o 2 o 3 o 4 18
19 Most famous Ancient RNN Hopfield Net 19
20 Hopfield net n Inspired by associative memory which means memory retrieval is not by address, but by part of the data; Same idea can be used for sentence completion n Consists of N neurons fully connected with symmetric weight strength w ij = w ji n No self connection. So the weight matri is 0- diagonal and symmetric. n Each computing element or neuron is a linear threshold element with threshold = 0. 20
21 Connection matri of the network, 0-diagonal and symmetric j n 1 n 2 n 3... n k n 1 n 2 i n 3... w ij n k 0 diagonal 21
22 Eample w 12 = w 21 = 5 w 13 = w 31 = 3 w 23 = w 32 = 2 At time t=0 s 1 (t) = 1 s 2 (t) = -1 s 3 (t) = 1 Unstable state: Neuron 1 will flip. A stable pattern is called an attractor for the net. 22
23 State Vector n Binary valued vector: value is either 1 or -1 X = < n n > n e.g. Various attributes of a student can be represented by a state vector height 1 3 address 5 roll number 2 hair color Ram = 1 ~(Ram) =
24 Concept of Energy n Energy at state s is given by the equation: E( s) = [ w w w1 n1n + w + + w n 2 n +! + w ( n 1) n ( n 1) n] 24
25 Energy Consideration At time t = 0, state of the neural network is: s(0) = <1, -1, 1> n E(0) = -[(5*1*-1)+(3*1* 1)+(2*-1*1)] = The state of the neural network under stability is <-1, -1, -1> E(stable state) = - -[(5*-1*-1)+(3*-1* -1)+(2*-1*-1)] =
26 The Hopfield net has to converge in the asynchronous mode of operation n As the energy E goes on decreasing, it has to hit the bottom, since the weight and the state vector have finite values. n That is, the Hopfield Net has to converge to an energy minimum. n Hence the Hopfield Net reaches stability. 26
27 Hopfield Net: an o(n 2 ) algorithm n Consider the energy epression E = w + w + + w [ K 1n 1 n + w + w + K + w n 2 E has [n(n-1)]/2 terms Nature of each term w ij is a real number i and j are each +1 or -1 M + w ( n 1) n ( n 1) n] n 27
28 No. of steps taken to reach stability n E gap = E high - E low E high E gap E low 28
29 The energy gap n In general, E high E gap = ma( w ma, w min ) * n*(n-1) E low 29
30 #steps to stable state: o(n 2 ) n It is possible to reach the minimum independent of n. n Hence in the worst case, the number of steps taken to cover the energy gap is less than or equal to [ma( w ma, w min ) * n * (n-1)] / constant n Thus stability has to be attained in O(n 2 ) steps 30
31 Training of Hopfield Net n Early Training Rule proposed by Hopfield n Rule inspired by the concept of electron spin n Hebb s rule of learning n If two neurons i and j have activation i and j respectively, then the weight w ij between the two neurons is directly proportional to the product i j i.e. w ij i j 31
32 Hopfield Rule n Training by Hopfield Rule n Train the Hopfield net for a specific memory behavior n Store memory elements n How to store patterns? 32
33 Hopfield Rule n To store a pattern make < n, n-1,., 3, 2, 1 > w ij = 1 ( n 1) i j Storing pattern is equivalent to Making that pattern the stable state 33
34 Hopfield Net for Optimization n Optimization problem n Maimizes or minimizes a quantity n Hopfield net used for optimization n Hopfield net and Traveling Salesman Problem n Hopfield net and Job Scheduling Problem 34
35 The essential idea of the correspondence n In optimization problems, we have to minimize a quantity. n Hopfield net minimizes the energy n THIS IS THE CORRESPONDENCE 35
36 Hopfield net and Traveling Salesman problem n We consider the problem for n=4 cities n In the given figure, nodes represent cities and edges represent the paths between the cities with associated distance. D d CD C d DA d AC d BD d BC A d AB B 36
37 Traveling Salesman Problem n Goal n Come back to the city A, visiting j = 2 to n (n is number of cities) eactly once and minimize the total distance. n To solve by Hopfield net we need to decide the architecture: n How many neurons? n What are the weights? 37
38 Constraints decide the parameters 1. For n cities and n positions, establish city to position correspondence, i.e. Number of neurons = n cities * n positions 2. Each position can take one and only one city 3. Each city can be in eactly one position 4. Total distance should be minimum 38
39 Architecture n n n * n matri where rows denote cities and columns denote positions cell(i, j) = 1 if and only if i th city is in j th position n Each cell is a neuron n n 2 neurons, O(n 4 ) connections city(i) pos(α) 39
40 Epressions corresponding to constraints n We equate constraint energy: E Problem = E network (*) Where, E problem = E 1 +E 2 +E 3 +E 4 and E network is the well known energy epression for the Hopfield net n Find the weights from (*). 40
41 Finding weights for Hopfield Net applied to TSP n E problem = E 1 + E 2 where E 1 is the equation for n cities, each city in one position and each position with one city. E 2 is the equation for distance 41
42 Epressions for E 1 and E 2 E A n n n n 2 = [ ( i α 1) ( i α 1) ] 2 α = 1 i= 1 i= 1 α = 1 E 1 n n n 2 = dij i α ( j, α j, α 1) 2 i= 1 j= 1 α = 1 42
43 Eplanatory eample Fig. 1 shows two possible directions in which tour can take place Fig. 1 city pos For the matri alongside, iα = 1, if and only if, i th city is in position α
44 Kinds of weights n Row weights: w 11,12 w 11,13 w 12,13 w 21,22 w 21,23 w 22,23 w 31,32 w 31,33 w 32,33 n Column weights w 11,21 w 11,31 w 21,31 w 12,22 w 12,32 w 22,32 w 13,23 w 13,33 w 23,33 44
45 Cross weights w 11,22 w 11,23 w 11,32 w 11,33 w 12,21 w 12,23 w 12,31 w 12,33 w 13,21 w 13,22 w 13,31 w 13,32 w 21,32 w 21,33 w 22,31 w 23,33 w 23,31 w 23,32 45
46 Epressions ] 1) ( 1) ( 1) ( 1) ( 1) ( 1) [( = + = A E E E E problem 13 June, LG:nlp:rnn:pushpak
47 Epressions (contd.) )...] ( ) ( ) ( ) ( ) ( ) ( [ d d d d d d E = 13 June, LG:nlp:rnn:pushpak
48 E network...] [ , , , , , , , , ,12 w w w w w w w w w E network = 13 June, LG:nlp:rnn:pushpak
49 Find row weight n To find, w 11,12 = -(co-efficient of ) in E network n Search in E problem w 11,12 = -A contribute...from E 1. E 2 cannot 49
50 Find column weight n To find, w 11,21 = -(co-efficient of ) in E network n Search co-efficient of in E problem w 11,21 = -A contribute...from E 1. E 2 cannot 50
51 Find Cross weights n To find, w 11,22 = -(co-efficient of ) n Search from E problem. E 1 cannot contribute n Co-eff. of in E 2 (d 12 + d 21 ) / 2 Therefore, w 11,22 = -( (d 12 + d 21 ) / 2) 51
52 Find Cross weights n To find, w 11,33 = -(co-efficient of ) n Search for in E problem w 11,33 = -( (d 13 + d 31 ) / 2) 52
53 Summary n Row weights = -A n Column weights = -A n Cross weights = - ( (d ij + d ji ) / 2), j = i ± 1 53
54 Recurrent Neural Network Acknowledgement: 1. By Denny Britz 2. Introduction to RNN by Jeffrey Hinton lectures.html 54
55 Sequence processing m/c 55
56 E.g. POS Tagging VBD NNP NN Purchased Videocon machine 56
57 E.g. Sentiment Analysis I Decision on a piece of tet h 0 h 1 c 1 a 11 a 12 a 13 a 14 o 1 o 2 o 3 o 4 57
58 I like h 0 h 1 h 2 c 2 a 21 a 22 a 23 a 24 o 1 o 2 o 3 o 4 58
59 I like the h 0 h 1 h 2 h 3 c 3 a 31 a32 a33 a 34 o 1 o 2 o 3 o 4 59
60 I like the camera h 0 h 1 h 2 h 3 h 4 c 4 a 41 a42 a 43 a 44 o 1 o 2 o 3 o 4 60
61 I like the camera <EOS > h 0 h 1 h 2 h 3 h 4 h 5 Positive sentiment c 5 a 51 a52 a 53 a 54 o 1 o 2 o 3 o 4 61
62 Back to RNN model 62
63 Notation: input and state n t is the input at time step t. For eample, could be a one-hot vector corresponding to the second word of a sentence. n s t is the hidden state at time step t. It is the memory of the network. n s t = f(u. t +Ws t-1 ) U and W matrices are learnt n f is a function of the input and the previous state n Usually tanh or ReLU (approimated by softplus) 63
64 Tanh, ReLU (rectifier linear unit) and Softplus tanh = e e + e e tanh = f ( ) = ma(0, ) g ( ) = ln(1 + e ) 64
65 Notation: output n o t is the output at step t n For eample, if we wanted to predict the net word in a sentence it would be a vector of probabilities across our vocabulary n o t =softma(v.s t ) 65
66 Operation of RNN n RNN shares the same parameters (U, V, W) across all steps n Only the input changes n Sometimes the output at each time step is not needed: e.g., in sentiment analysis n Main point: the hidden states!! 66
67 The equivalence between feedforward nets and recurrent nets w1 w4 time= 3 w1 w2 W3 W4 w2 w3 Assume that there is a time delay of 1 in using each connection. The recurrent net is just a layered net that keeps reusing the same weights. time= 2 time= 1 time= 0 w1 w2 W3 W4 w1 w2 W3 W4 67
68 Reminder: Backpropagation with weight constraints Linear constraints between the weights. Compute the gradients as usual To we constrain : need Eample : Δw 1 w 1 = = Δw w 2 2 Then modify the gradients so that they satisfy the constraints. compute : E w 1 and E w 2 So if the weights started off satisfying the constraints, they will continue to satisfy them. use E w 1 + E w 2 for w 1 and w 2 68
69 Backpropagation through time (BPTT algorithm) n The forward pass at each time step. n n The backward pass computes the error derivatives at each time step. n After the backward pass we add together the derivatives at all the different times for each weight. 69
70 Binary addition using recurrent network (Jeffrey Hinton s lecture) Feed forward n/w But problem of variable length input hidden units
71 The algorithm for binary addition no carry print carry print no carry print carry print This is a finite state automaton. It decides what transition to make by looking at the net column. It prints after making the transition. It moves from right to left over the two input numbers. 71
72 A recurrent net for binary addition Two input units and one output unit. Given two input digits at each time step. The desired output at each time step is the output for the column that was provided as input two time steps ago. It takes one time step to update the hidden units based on the two input digits. It takes another time step for the hidden units to cause the output time 72
73 The connectivity of the network The input units have feed forward connections Allow them to vote for the net hidden activity pattern. 3 fully interconnected hidden units 73
74 What the network learns n Learns four distinct patterns of activity for the 3 hidden units. n Patterns correspond to the nodes in the finite state automaton n Nodes in FSM are like activity vectors n The automaton is restricted to be in eactly one state at each time n The hidden units are restricted to have eactly one vector of activity at each time. 74
75 Recall: Backpropagation Rule General weight updating rule: Where Δw = ηδ ji jo i δ j = ( t j o j ) o j (1 o j ) for outermost layer = ( w δ kj k ) o j (1 o j ) o k net layer i for hidden layers 75
76 The problem of eploding or vanishing gradients (1/2) If the weights are small, the gradients shrink eponentially If the weights are big the gradients grow eponentially. Typical feed-forward neural nets can cope with these eponential effects because they only have a few hidden layers. 76
77 The problem of eploding or vanishing gradients (2/2) In an RNN trained on long sequences (e.g. sentence with 20 words) the gradients can easily eplode or vanish. We can avoid this by initializing the weights very carefully. Even with good initial weights, its very hard to detect that the current target output depends on an input from many time-steps ago. So RNNs have difficulty dealing with long-range dependencies. 77
78 Vanishing/Eploding gradient: solution n LSTM n Error becomes trapped in the memory portion of the block n This is referred to as an "error carousel n Continuously feeds error back to each of the gates until they become trained to cut off the value n (to be epanded) 78
79 Application of RNN Language Modeling 79
80 Definitions etc. n n What is Language Modeling: conditional probability of a word given the previous words in the sequence What is its mathematical epression P(wn w n 1 n 1 1 ) P(wn w n N +1 ) n How do we compute P (w n w n-1 n-n+1 ): ( n-n+1 Count (w n w n-1.. W n-n+1 )/ Count (w n-1.. W 80
81 An Eample n n n <s> I am Sam </s> <s> Sam I am </s> <s> I do not like green eggs </s> n n Suppose we add another sentence <s> I do like salad </s> ( I Now, what is the probability P(I <s>), P(do 81
82 Estimating Sentence Probabilities n P(<s> I want english food </s>) = P(i <s>)* P(want I)* P(english want)* P(food english)* P(</s> food)* = P(wn w n 1 n 1 1 ) P(wn w n N +1 ) 82
83 Application of Sentence Probability n Evaluate various possible translations in Statistical Translation Systems he briefed to reporters on the chief contents of the statement he briefed reporters on the chief contents of the statement he briefed to reporters on the main contents of the statement he briefed reporters on the main contents of the statement n Similarly in Speech Recognition System A friend in deed is a friend indeed A fred in need is a friend indeed Afraid in need is a friend indeed A friend in need is a friend indeed 83
84 Another Application: Transliteration n Mapping a written word from one language- script pair to another language-script pair: n n n n n य ध ष ठ र Yudhisthir, Car क र This looks like a straight-forward problem Define a simple mapping Or is it Yudhisthira? On web search: n n 15,900 hits for Yudhisthir, vs 50,200 for Yudhisthira 184,000 hits for Qatil vs. 7,300,000 for Katil n BTW, Qatil is the correct spelling Generate all possible candidates and then somehow rank them 84
85 LM with RNN 85
86 The prediction task 86
87 Goal: minimize cross entropy Perpleity: 2 J 87
88 Schematic Ack: Socher lecture on RNN 88
89 Vanishing gradient problem hits again! General weight updating rule: Where Δw = ηδ ji jo i δ j = ( t j o j ) o j (1 o j ) for outermost layer = ( w δ kj k ) o j (1 o j ) o k net layer i for hidden layers 89
90 Trick for solving eploding/ vanishing gradient n Clipping! (Pascanu et al, 2013) n Do not let the gradient rise above (case of eploding) or fall below (case of vanishing) a threshold n Facilitated by using ReLUs 90
91 Opinion Mining with Deep Recurrent Nets (Irsoy and Cardie, 2014) 91
92 Goal n Classify each wordas direct subjective epressions (DSEs) and epressive subjective epressions (ESEs) n DSE: Eplicit mentions of private states or speech events Epressing private states n ESE: Epressions that indicate sentiment, emotion, etc without eplicitly conveying them 92
93 Annotation (1/2) n In BIO notation (tags either beginof-entity (B_X) or continuation-ofentity (I_X)): The committee, [as usual] ESE, [has refused to make any Statements] DSE 93
94 Annotation (2/2) 94
95 Unidirectional RNN 95
96 Notation from Irsoy and Cardie n represents a token (word) as a vector. n y represents the output label (B, I or O) n h is the memory, computed from the past memory and current word. It summarizes the sentence up to that time. 96
97 Bidirectional RNN 97
98 Deep Bidirectional RNN 98
99 Data n MPQA 1.2 corpus (Wiebe et al., 2005) n consists of 535 news articles (11,111 sentences) n manually labeled with DSE and ESEs at the phrase level 99
100 F1 score 100
Natural Language Processing
Natural Language Processing Pushpak Bhattacharyya CSE Dept, IIT Patna and Bombay LSTM 15 jun, 2017 lgsoft:nlp:lstm:pushpak 1 Recap 15 jun, 2017 lgsoft:nlp:lstm:pushpak 2 Feedforward Network and Backpropagation
More informationSlide credit from Hung-Yi Lee & Richard Socher
Slide credit from Hung-Yi Lee & Richard Socher 1 Review Recurrent Neural Network 2 Recurrent Neural Network Idea: condition the neural network on all previous words and tie the weights at each time step
More informationRecurrent Neural Networks
Recurrent Neural Networks Datamining Seminar Kaspar Märtens Karl-Oskar Masing Today's Topics Modeling sequences: a brief overview Training RNNs with back propagation A toy example of training an RNN Why
More informationCSC321 Lecture 15: Exploding and Vanishing Gradients
CSC321 Lecture 15: Exploding and Vanishing Gradients Roger Grosse Roger Grosse CSC321 Lecture 15: Exploding and Vanishing Gradients 1 / 23 Overview Yesterday, we saw how to compute the gradient descent
More informationRecurrent Neural Networks. Jian Tang
Recurrent Neural Networks Jian Tang tangjianpku@gmail.com 1 RNN: Recurrent neural networks Neural networks for sequence modeling Summarize a sequence with fix-sized vector through recursively updating
More informationCourse 395: Machine Learning - Lectures
Course 395: Machine Learning - Lectures Lecture 1-2: Concept Learning (M. Pantic) Lecture 3-4: Decision Trees & CBC Intro (M. Pantic & S. Petridis) Lecture 5-6: Evaluating Hypotheses (S. Petridis) Lecture
More informationArtificial Neural Networks D B M G. Data Base and Data Mining Group of Politecnico di Torino. Elena Baralis. Politecnico di Torino
Artificial Neural Networks Data Base and Data Mining Group of Politecnico di Torino Elena Baralis Politecnico di Torino Artificial Neural Networks Inspired to the structure of the human brain Neurons as
More informationRecurrent Neural Networks (Part - 2) Sumit Chopra Facebook
Recurrent Neural Networks (Part - 2) Sumit Chopra Facebook Recap Standard RNNs Training: Backpropagation Through Time (BPTT) Application to sequence modeling Language modeling Applications: Automatic speech
More informationMachine Learning Basics III
Machine Learning Basics III Benjamin Roth CIS LMU München Benjamin Roth (CIS LMU München) Machine Learning Basics III 1 / 62 Outline 1 Classification Logistic Regression 2 Gradient Based Optimization Gradient
More informationarxiv: v3 [cs.lg] 14 Jan 2018
A Gentle Tutorial of Recurrent Neural Network with Error Backpropagation Gang Chen Department of Computer Science and Engineering, SUNY at Buffalo arxiv:1610.02583v3 [cs.lg] 14 Jan 2018 1 abstract We describe
More informationLecture 11 Recurrent Neural Networks I
Lecture 11 Recurrent Neural Networks I CMSC 35246: Deep Learning Shubhendu Trivedi & Risi Kondor University of Chicago May 01, 2017 Introduction Sequence Learning with Neural Networks Some Sequence Tasks
More informationDeep Learning Recurrent Networks 2/28/2018
Deep Learning Recurrent Networks /8/8 Recap: Recurrent networks can be incredibly effective Story so far Y(t+) Stock vector X(t) X(t+) X(t+) X(t+) X(t+) X(t+5) X(t+) X(t+7) Iterated structures are good
More informationMachine Learning for Large-Scale Data Analysis and Decision Making A. Neural Networks Week #6
Machine Learning for Large-Scale Data Analysis and Decision Making 80-629-17A Neural Networks Week #6 Today Neural Networks A. Modeling B. Fitting C. Deep neural networks Today s material is (adapted)
More informationSequence Modeling with Neural Networks
Sequence Modeling with Neural Networks Harini Suresh y 0 y 1 y 2 s 0 s 1 s 2... x 0 x 1 x 2 hat is a sequence? This morning I took the dog for a walk. sentence medical signals speech waveform Successes
More informationUsing a Hopfield Network: A Nuts and Bolts Approach
Using a Hopfield Network: A Nuts and Bolts Approach November 4, 2013 Gershon Wolfe, Ph.D. Hopfield Model as Applied to Classification Hopfield network Training the network Updating nodes Sequencing of
More informationRecurrent and Recursive Networks
Neural Networks with Applications to Vision and Language Recurrent and Recursive Networks Marco Kuhlmann Introduction Applications of sequence modelling Map unsegmented connected handwriting to strings.
More informationNatural Language Processing and Recurrent Neural Networks
Natural Language Processing and Recurrent Neural Networks Pranay Tarafdar October 19 th, 2018 Outline Introduction to NLP Word2vec RNN GRU LSTM Demo What is NLP? Natural Language? : Huge amount of information
More informationLecture 11 Recurrent Neural Networks I
Lecture 11 Recurrent Neural Networks I CMSC 35246: Deep Learning Shubhendu Trivedi & Risi Kondor niversity of Chicago May 01, 2017 Introduction Sequence Learning with Neural Networks Some Sequence Tasks
More informationNeural Networks 2. 2 Receptive fields and dealing with image inputs
CS 446 Machine Learning Fall 2016 Oct 04, 2016 Neural Networks 2 Professor: Dan Roth Scribe: C. Cheng, C. Cervantes Overview Convolutional Neural Networks Recurrent Neural Networks 1 Introduction There
More informationIntroduction to Machine Learning
Introduction to Machine Learning Neural Networks Varun Chandola x x 5 Input Outline Contents February 2, 207 Extending Perceptrons 2 Multi Layered Perceptrons 2 2. Generalizing to Multiple Labels.................
More informationLab 5: 16 th April Exercises on Neural Networks
Lab 5: 16 th April 01 Exercises on Neural Networks 1. What are the values of weights w 0, w 1, and w for the perceptron whose decision surface is illustrated in the figure? Assume the surface crosses the
More informationFrom perceptrons to word embeddings. Simon Šuster University of Groningen
From perceptrons to word embeddings Simon Šuster University of Groningen Outline A basic computational unit Weighting some input to produce an output: classification Perceptron Classify tweets Written
More informationRecurrent Neural Networks. deeplearning.ai. Why sequence models?
Recurrent Neural Networks deeplearning.ai Why sequence models? Examples of sequence data The quick brown fox jumped over the lazy dog. Speech recognition Music generation Sentiment classification There
More informationECE521 Lectures 9 Fully Connected Neural Networks
ECE521 Lectures 9 Fully Connected Neural Networks Outline Multi-class classification Learning multi-layer neural networks 2 Measuring distance in probability space We learnt that the squared L2 distance
More informationDeep Learning Sequence to Sequence models: Attention Models. 17 March 2018
Deep Learning Sequence to Sequence models: Attention Models 17 March 2018 1 Sequence-to-sequence modelling Problem: E.g. A sequence X 1 X N goes in A different sequence Y 1 Y M comes out Speech recognition:
More informationIntroduction to RNNs!
Introduction to RNNs Arun Mallya Best viewed with Computer Modern fonts installed Outline Why Recurrent Neural Networks (RNNs)? The Vanilla RNN unit The RNN forward pass Backpropagation refresher The RNN
More informationNeural networks. Chapter 19, Sections 1 5 1
Neural networks Chapter 19, Sections 1 5 Chapter 19, Sections 1 5 1 Outline Brains Neural networks Perceptrons Multilayer perceptrons Applications of neural networks Chapter 19, Sections 1 5 2 Brains 10
More informationMultilayer Neural Networks
Multilayer Neural Networks Multilayer Neural Networks Discriminant function flexibility NON-Linear But with sets of linear parameters at each layer Provably general function approximators for sufficient
More informationTask-Oriented Dialogue System (Young, 2000)
2 Review Task-Oriented Dialogue System (Young, 2000) 3 http://rsta.royalsocietypublishing.org/content/358/1769/1389.short Speech Signal Speech Recognition Hypothesis are there any action movies to see
More informationNeural Networks with Applications to Vision and Language. Feedforward Networks. Marco Kuhlmann
Neural Networks with Applications to Vision and Language Feedforward Networks Marco Kuhlmann Feedforward networks Linear separability x 2 x 2 0 1 0 1 0 0 x 1 1 0 x 1 linearly separable not linearly separable
More informationMachine Learning. Neural Networks
Machine Learning Neural Networks Bryan Pardo, Northwestern University, Machine Learning EECS 349 Fall 2007 Biological Analogy Bryan Pardo, Northwestern University, Machine Learning EECS 349 Fall 2007 THE
More informationLecture 15: Exploding and Vanishing Gradients
Lecture 15: Exploding and Vanishing Gradients Roger Grosse 1 Introduction Last lecture, we introduced RNNs and saw how to derive the gradients using backprop through time. In principle, this lets us train
More informationLong-Short Term Memory and Other Gated RNNs
Long-Short Term Memory and Other Gated RNNs Sargur Srihari srihari@buffalo.edu This is part of lecture slides on Deep Learning: http://www.cedar.buffalo.edu/~srihari/cse676 1 Topics in Sequence Modeling
More informationIntroduction to Neural Networks
Introduction to Neural Networks What are (Artificial) Neural Networks? Models of the brain and nervous system Highly parallel Process information much more like the brain than a serial computer Learning
More informationDeep Recurrent Neural Networks
Deep Recurrent Neural Networks Artem Chernodub e-mail: a.chernodub@gmail.com web: http://zzphoto.me ZZ Photo IMMSP NASU 2 / 28 Neuroscience Biological-inspired models Machine Learning p x y = p y x p(x)/p(y)
More informationArtificial Neural Networks Examination, March 2004
Artificial Neural Networks Examination, March 2004 Instructions There are SIXTY questions (worth up to 60 marks). The exam mark (maximum 60) will be added to the mark obtained in the laborations (maximum
More informationIn biological terms, memory refers to the ability of neural systems to store activity patterns and later recall them when required.
In biological terms, memory refers to the ability of neural systems to store activity patterns and later recall them when required. In humans, association is known to be a prominent feature of memory.
More informationNeural Networks in Structured Prediction. November 17, 2015
Neural Networks in Structured Prediction November 17, 2015 HWs and Paper Last homework is going to be posted soon Neural net NER tagging model This is a new structured model Paper - Thursday after Thanksgiving
More informationLecture 17: Neural Networks and Deep Learning
UVA CS 6316 / CS 4501-004 Machine Learning Fall 2016 Lecture 17: Neural Networks and Deep Learning Jack Lanchantin Dr. Yanjun Qi 1 Neurons 1-Layer Neural Network Multi-layer Neural Network Loss Functions
More informationWeek 5: The Backpropagation Algorithm
Week 5: The Backpropagation Algorithm Hans Georg Schaathun 25th April 2017 Time Topic Reading 8.15- Recap of tutorials last week Lecture: From perceptron to back-propagation Marsland Section 4 9.00- Tutorial
More informationWhat Do Neural Networks Do? MLP Lecture 3 Multi-layer networks 1
What Do Neural Networks Do? MLP Lecture 3 Multi-layer networks 1 Multi-layer networks Steve Renals Machine Learning Practical MLP Lecture 3 7 October 2015 MLP Lecture 3 Multi-layer networks 2 What Do Single
More informationArtificial Neural Networks. Introduction to Computational Neuroscience Tambet Matiisen
Artificial Neural Networks Introduction to Computational Neuroscience Tambet Matiisen 2.04.2018 Artificial neural network NB! Inspired by biology, not based on biology! Applications Automatic speech recognition
More informationArtificial Neuron (Perceptron)
9/6/208 Gradient Descent (GD) Hantao Zhang Deep Learning with Python Reading: https://en.wikipedia.org/wiki/gradient_descent Artificial Neuron (Perceptron) = w T = w 0 0 + + w 2 2 + + w d d where
More informationRECURRENT NETWORKS I. Philipp Krähenbühl
RECURRENT NETWORKS I Philipp Krähenbühl RECAP: CLASSIFICATION conv 1 conv 2 conv 3 conv 4 1 2 tu RECAP: SEGMENTATION conv 1 conv 2 conv 3 conv 4 RECAP: DETECTION conv 1 conv 2 conv 3 conv 4 RECAP: GENERATION
More informationStatistical NLP for the Web
Statistical NLP for the Web Neural Networks, Deep Belief Networks Sameer Maskey Week 8, October 24, 2012 *some slides from Andrew Rosenberg Announcements Please ask HW2 related questions in courseworks
More information3.3 Discrete Hopfield Net An iterative autoassociative net similar to the nets described in the previous sections has been developed by Hopfield
3.3 Discrete Hopfield Net An iterative autoassociative net similar to the nets described in the previous sections has been developed by Hopfield (1982, 1984). - The net is a fully interconnected neural
More informationNeural networks. Chapter 20. Chapter 20 1
Neural networks Chapter 20 Chapter 20 1 Outline Brains Neural networks Perceptrons Multilayer networks Applications of neural networks Chapter 20 2 Brains 10 11 neurons of > 20 types, 10 14 synapses, 1ms
More informationDeep Feedforward Networks
Deep Feedforward Networks Yongjin Park 1 Goal of Feedforward Networks Deep Feedforward Networks are also called as Feedforward neural networks or Multilayer Perceptrons Their Goal: approximate some function
More informationNLP Programming Tutorial 8 - Recurrent Neural Nets
NLP Programming Tutorial 8 - Recurrent Neural Nets Graham Neubig Nara Institute of Science and Technology (NAIST) 1 Feed Forward Neural Nets All connections point forward ϕ( x) y It is a directed acyclic
More informationCSC321 Lecture 5: Multilayer Perceptrons
CSC321 Lecture 5: Multilayer Perceptrons Roger Grosse Roger Grosse CSC321 Lecture 5: Multilayer Perceptrons 1 / 21 Overview Recall the simple neuron-like unit: y output output bias i'th weight w 1 w2 w3
More informationOnline Videos FERPA. Sign waiver or sit on the sides or in the back. Off camera question time before and after lecture. Questions?
Online Videos FERPA Sign waiver or sit on the sides or in the back Off camera question time before and after lecture Questions? Lecture 1, Slide 1 CS224d Deep NLP Lecture 4: Word Window Classification
More informationDeep Neural Networks (1) Hidden layers; Back-propagation
Deep Neural Networs (1) Hidden layers; Bac-propagation Steve Renals Machine Learning Practical MLP Lecture 3 4 October 2017 / 9 October 2017 MLP Lecture 3 Deep Neural Networs (1) 1 Recap: Softmax single
More informationARTIFICIAL INTELLIGENCE. Artificial Neural Networks
INFOB2KI 2017-2018 Utrecht University The Netherlands ARTIFICIAL INTELLIGENCE Artificial Neural Networks Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from www.cs.uu.nl/docs/vakken/b2ki/schema.html
More informationNeural Architectures for Image, Language, and Speech Processing
Neural Architectures for Image, Language, and Speech Processing Karl Stratos June 26, 2018 1 / 31 Overview Feedforward Networks Need for Specialized Architectures Convolutional Neural Networks (CNNs) Recurrent
More informationARTIFICIAL NEURAL NETWORK PART I HANIEH BORHANAZAD
ARTIFICIAL NEURAL NETWORK PART I HANIEH BORHANAZAD WHAT IS A NEURAL NETWORK? The simplest definition of a neural network, more properly referred to as an 'artificial' neural network (ANN), is provided
More informationDEEP LEARNING AND NEURAL NETWORKS: BACKGROUND AND HISTORY
DEEP LEARNING AND NEURAL NETWORKS: BACKGROUND AND HISTORY 1 On-line Resources http://neuralnetworksanddeeplearning.com/index.html Online book by Michael Nielsen http://matlabtricks.com/post-5/3x3-convolution-kernelswith-online-demo
More informationNeural Networks Learning the network: Backprop , Fall 2018 Lecture 4
Neural Networks Learning the network: Backprop 11-785, Fall 2018 Lecture 4 1 Recap: The MLP can represent any function The MLP can be constructed to represent anything But how do we construct it? 2 Recap:
More informationNeural networks. Chapter 20, Section 5 1
Neural networks Chapter 20, Section 5 Chapter 20, Section 5 Outline Brains Neural networks Perceptrons Multilayer perceptrons Applications of neural networks Chapter 20, Section 5 2 Brains 0 neurons of
More informationLecture 26: Backpropagation and its applications. Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay
CS621: Artificial Atifii lintelligence Lecture 26: Backpropagation and its applications Pushpak Bhattacharyya Computer Science and Engineering g Department IIT Bombay Backpropagation algorithm i w i...
More informationConditional Language modeling with attention
Conditional Language modeling with attention 2017.08.25 Oxford Deep NLP 조수현 Review Conditional language model: assign probabilities to sequence of words given some conditioning context x What is the probability
More informationDeep Feedforward Networks. Sargur N. Srihari
Deep Feedforward Networks Sargur N. srihari@cedar.buffalo.edu 1 Topics Overview 1. Example: Learning XOR 2. Gradient-Based Learning 3. Hidden Units 4. Architecture Design 5. Backpropagation and Other Differentiation
More informationLecture 7 Artificial neural networks: Supervised learning
Lecture 7 Artificial neural networks: Supervised learning Introduction, or how the brain works The neuron as a simple computing element The perceptron Multilayer neural networks Accelerated learning in
More informationRecurrent Neural Networks 2. CS 287 (Based on Yoav Goldberg s notes)
Recurrent Neural Networks 2 CS 287 (Based on Yoav Goldberg s notes) Review: Representation of Sequence Many tasks in NLP involve sequences w 1,..., w n Representations as matrix dense vectors X (Following
More informationArtificial Neural Networks Examination, June 2005
Artificial Neural Networks Examination, June 2005 Instructions There are SIXTY questions. (The pass mark is 30 out of 60). For each question, please select a maximum of ONE of the given answers (either
More informationIntroduction to Natural Computation. Lecture 9. Multilayer Perceptrons and Backpropagation. Peter Lewis
Introduction to Natural Computation Lecture 9 Multilayer Perceptrons and Backpropagation Peter Lewis 1 / 25 Overview of the Lecture Why multilayer perceptrons? Some applications of multilayer perceptrons.
More informationSpeech and Language Processing
Speech and Language Processing Lecture 5 Neural network based acoustic and language models Information and Communications Engineering Course Takahiro Shinoaki 08//6 Lecture Plan (Shinoaki s part) I gives
More informationStephen Scott.
1 / 35 (Adapted from Vinod Variyam and Ian Goodfellow) sscott@cse.unl.edu 2 / 35 All our architectures so far work on fixed-sized inputs neural networks work on sequences of inputs E.g., text, biological
More informationNeural Networks (Part 1) Goals for the lecture
Neural Networks (Part ) Mark Craven and David Page Computer Sciences 760 Spring 208 www.biostat.wisc.edu/~craven/cs760/ Some of the slides in these lectures have been adapted/borrowed from materials developed
More informationCS:4420 Artificial Intelligence
CS:4420 Artificial Intelligence Spring 2018 Neural Networks Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart
More informationModelling Time Series with Neural Networks. Volker Tresp Summer 2017
Modelling Time Series with Neural Networks Volker Tresp Summer 2017 1 Modelling of Time Series The next figure shows a time series (DAX) Other interesting time-series: energy prize, energy consumption,
More informationNeural Networks. CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington
Neural Networks CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington 1 Perceptrons x 0 = 1 x 1 x 2 z = h w T x Output: z x D A perceptron
More informationRecurrent Neural Network
Recurrent Neural Network Xiaogang Wang xgwang@ee..edu.hk March 2, 2017 Xiaogang Wang (linux) Recurrent Neural Network March 2, 2017 1 / 48 Outline 1 Recurrent neural networks Recurrent neural networks
More informationNeural Networks: Backpropagation
Neural Networks: Backpropagation Machine Learning Fall 2017 Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, Yoav Goldberg, Shai Shalev-Shwartz and Shai Ben-David, and others
More informationLecture 5: Recurrent Neural Networks
1/25 Lecture 5: Recurrent Neural Networks Nima Mohajerin University of Waterloo WAVE Lab nima.mohajerin@uwaterloo.ca July 4, 2017 2/25 Overview 1 Recap 2 RNN Architectures for Learning Long Term Dependencies
More informationNatural Language Understanding. Recap: probability, language models, and feedforward networks. Lecture 12: Recurrent Neural Networks and LSTMs
Natural Language Understanding Lecture 12: Recurrent Neural Networks and LSTMs Recap: probability, language models, and feedforward networks Simple Recurrent Networks Adam Lopez Credits: Mirella Lapata
More informationDeep Learning. Recurrent Neural Network (RNNs) Ali Ghodsi. October 23, Slides are partially based on Book in preparation, Deep Learning
Recurrent Neural Network (RNNs) University of Waterloo October 23, 2015 Slides are partially based on Book in preparation, by Bengio, Goodfellow, and Aaron Courville, 2015 Sequential data Recurrent neural
More informationAI Programming CS F-20 Neural Networks
AI Programming CS662-2008F-20 Neural Networks David Galles Department of Computer Science University of San Francisco 20-0: Symbolic AI Most of this class has been focused on Symbolic AI Focus or symbols
More informationRecurrent Neural Networks Deep Learning Lecture 5. Efstratios Gavves
Recurrent Neural Networks Deep Learning Lecture 5 Efstratios Gavves Sequential Data So far, all tasks assumed stationary data Neither all data, nor all tasks are stationary though Sequential Data: Text
More informationLecture 4: Perceptrons and Multilayer Perceptrons
Lecture 4: Perceptrons and Multilayer Perceptrons Cognitive Systems II - Machine Learning SS 2005 Part I: Basic Approaches of Concept Learning Perceptrons, Artificial Neuronal Networks Lecture 4: Perceptrons
More informationNeural Networks and Deep Learning
Neural Networks and Deep Learning Professor Ameet Talwalkar November 12, 2015 Professor Ameet Talwalkar Neural Networks and Deep Learning November 12, 2015 1 / 16 Outline 1 Review of last lecture AdaBoost
More informationMultilayer Perceptrons and Backpropagation
Multilayer Perceptrons and Backpropagation Informatics 1 CG: Lecture 7 Chris Lucas School of Informatics University of Edinburgh January 31, 2017 (Slides adapted from Mirella Lapata s.) 1 / 33 Reading:
More informationNeural Networks. Chapter 18, Section 7. TB Artificial Intelligence. Slides from AIMA 1/ 21
Neural Networks Chapter 8, Section 7 TB Artificial Intelligence Slides from AIMA http://aima.cs.berkeley.edu / 2 Outline Brains Neural networks Perceptrons Multilayer perceptrons Applications of neural
More informationCSC321 Lecture 16: ResNets and Attention
CSC321 Lecture 16: ResNets and Attention Roger Grosse Roger Grosse CSC321 Lecture 16: ResNets and Attention 1 / 24 Overview Two topics for today: Topic 1: Deep Residual Networks (ResNets) This is the state-of-the
More informationMachine Learning. Boris
Machine Learning Boris Nadion boris@astrails.com @borisnadion @borisnadion boris@astrails.com astrails http://astrails.com awesome web and mobile apps since 2005 terms AI (artificial intelligence)
More informationtext classification 3: neural networks
text classification 3: neural networks CS 585, Fall 2018 Introduction to Natural Language Processing http://people.cs.umass.edu/~miyyer/cs585/ Mohit Iyyer College of Information and Computer Sciences University
More informationNeural Networks. Nicholas Ruozzi University of Texas at Dallas
Neural Networks Nicholas Ruozzi University of Texas at Dallas Handwritten Digit Recognition Given a collection of handwritten digits and their corresponding labels, we d like to be able to correctly classify
More informationFeedforward Neural Networks
Feedforward Neural Networks Michael Collins 1 Introduction In the previous notes, we introduced an important class of models, log-linear models. In this note, we describe feedforward neural networks, which
More information2- AUTOASSOCIATIVE NET - The feedforward autoassociative net considered in this section is a special case of the heteroassociative net.
2- AUTOASSOCIATIVE NET - The feedforward autoassociative net considered in this section is a special case of the heteroassociative net. - For an autoassociative net, the training input and target output
More informationMachine Learning for Signal Processing Neural Networks Continue. Instructor: Bhiksha Raj Slides by Najim Dehak 1 Dec 2016
Machine Learning for Signal Processing Neural Networks Continue Instructor: Bhiksha Raj Slides by Najim Dehak 1 Dec 2016 1 So what are neural networks?? Voice signal N.Net Transcription Image N.Net Text
More informationFeedforward Neural Networks. Michael Collins, Columbia University
Feedforward Neural Networks Michael Collins, Columbia University Recap: Log-linear Models A log-linear model takes the following form: p(y x; v) = exp (v f(x, y)) y Y exp (v f(x, y )) f(x, y) is the representation
More informationLearning and Memory in Neural Networks
Learning and Memory in Neural Networks Guy Billings, Neuroinformatics Doctoral Training Centre, The School of Informatics, The University of Edinburgh, UK. Neural networks consist of computational units
More informationLecture 5 Neural models for NLP
CS546: Machine Learning in NLP (Spring 2018) http://courses.engr.illinois.edu/cs546/ Lecture 5 Neural models for NLP Julia Hockenmaier juliahmr@illinois.edu 3324 Siebel Center Office hours: Tue/Thu 2pm-3pm
More informationIntroduction to Artificial Neural Networks
Facultés Universitaires Notre-Dame de la Paix 27 March 2007 Outline 1 Introduction 2 Fundamentals Biological neuron Artificial neuron Artificial Neural Network Outline 3 Single-layer ANN Perceptron Adaline
More informationLecture 13: Structured Prediction
Lecture 13: Structured Prediction Kai-Wei Chang CS @ University of Virginia kw@kwchang.net Couse webpage: http://kwchang.net/teaching/nlp16 CS6501: NLP 1 Quiz 2 v Lectures 9-13 v Lecture 12: before page
More informationLecture 5: Logistic Regression. Neural Networks
Lecture 5: Logistic Regression. Neural Networks Logistic regression Comparison with generative models Feed-forward neural networks Backpropagation Tricks for training neural networks COMP-652, Lecture
More informationMultilayer Neural Networks. (sometimes called Multilayer Perceptrons or MLPs)
Multilayer Neural Networks (sometimes called Multilayer Perceptrons or MLPs) Linear separability Hyperplane In 2D: w x + w 2 x 2 + w 0 = 0 Feature x 2 = w w 2 x w 0 w 2 Feature 2 A perceptron can separate
More informationMachine Learning. Neural Networks. (slides from Domingos, Pardo, others)
Machine Learning Neural Networks (slides from Domingos, Pardo, others) Human Brain Neurons Input-Output Transformation Input Spikes Output Spike Spike (= a brief pulse) (Excitatory Post-Synaptic Potential)
More informationNatural Language Processing
Natural Language Processing Language models Based on slides from Michael Collins, Chris Manning and Richard Soccer Plan Problem definition Trigram models Evaluation Estimation Interpolation Discounting
More informationBackpropagation Introduction to Machine Learning. Matt Gormley Lecture 12 Feb 23, 2018
10-601 Introduction to Machine Learning Machine Learning Department School of Computer Science Carnegie Mellon University Backpropagation Matt Gormley Lecture 12 Feb 23, 2018 1 Neural Networks Outline
More information4. Multilayer Perceptrons
4. Multilayer Perceptrons This is a supervised error-correction learning algorithm. 1 4.1 Introduction A multilayer feedforward network consists of an input layer, one or more hidden layers, and an output
More information