On the Impact of the Activation Function on Deep Neural Networks Training

Total Page:16

File Type:pdf, Size:1020Kb

On the Impact of the Activation Function on Deep Neural Networks Training On the Impact of the Activation Function on Deep Neural Networks Training Soufiane Hayou 1 Arnaud Doucet 1 Judith Rousseau 1 Abstract obtained similar results using a topological measure of ex- The weight initialization and the activation func- pressiveness. tion of deep neural networks have a crucial impact Since the training of deep neural networks is a non-convex on the performance of the training procedure. An optimization problem, the weight initialization and the ac- inappropriate selection can lead to the loss of in- tivation function will essentially determine the functional formation of the input during forward propagation subspace that the optimization algorithm will explore. We and the exponential vanishing/exploding of gra- follow here the approach of (Poole et al., 2016) and (Schoen- dients during back-propagation. Understanding holz et al., 2017) by investigating the behaviour of ran- the theoretical properties of untrained random net- dom networks in the infinite-width and finite-variance i.i.d. works is key to identifying which deep networks weights context where they can be approximated by a Gaus- may be trained successfully as recently demon- sian process as established by (Neal, 1995), (Matthews et al., strated by (Schoenholz et al., 2017) who showed 2018) and (Lee et al., 2018). that for deep feedforward neural networks only a specific choice of hyperparameters known as the In this paper, our contribution is three-fold. Firstly, we ‘Edge of Chaos’ can lead to good performance. provide a comprehensive analysis of the so-called Edge of While the work by (Schoenholz et al., 2017) dis- Chaos (EOC) curve and show that initializing a network on cuss trainability issues, we focus here on training this curve leads to a deeper propagation of the information acceleration and overall performance. We give a through the network and accelerates the training. In particu- comprehensive theoretical analysis of the Edge of lar, we show that a feedforward ReLU network initialized Chaos and show that we can indeed tune the ini- on the EOC acts as a simple residual ReLU network in tialization parameters and the activation function terms of information propagation. Secondly, we introduce a in order to accelerate the training and improve class of smooth activation functions which allow for deeper performance. signal propagation (Proposition3) than ReLU. In partic- ular, this analysis sheds light on why smooth versions of ReLU (such as SiLU or ELU) perform better experimentally 1. Introduction for deep neural networks; see, e.g., (Clevert et al., 2016), (Pedamonti, 2018), (Ramachandran et al., 2017) and (Mil- Deep neural networks have become extremely popular as letarí et al., 2018). Lastly, we show the existence of optimal they achieve state-of-the-art performance on a variety of points on the EOC curve and we provide guidelines for the important applications including language processing and choice of such point and we demonstrate numerically the computer vision; see, e.g., (Goodfellow et al., 2016). The consistence of this approach. We also complement previous success of these models has motivated the use of increas- empirical results by illustrating the benefits of an initializa- ingly deep networks and stimulated a large body of work to tion on the EOC in this context. All proofs are given in the arXiv:1902.06853v2 [stat.ML] 26 May 2019 understand their theoretical properties. It is impossible to Supplementary Material. provide here a comprehensive summary of the large num- ber of contributions within this field. To cite a few results relevant to our contributions, (Montufar et al., 2014) have 2. On Gaussian process approximations of shown that neural networks have exponential expressive neural networks and their stability power with respect to the depth while (Poole et al., 2016) 2.1. Setup and notations 1 Department of Statistics, University of Oxford, Oxford, We use similar notations to those of (Poole et al., 2016) United Kingdom. Correspondence to: Soufiane Hayou <soufi- [email protected]>. and (Lee et al., 2018). Consider a fully connected feedfor- ward random neural network of depth L, widths (Nl)1≤l≤L, th 2 Proceedings of the 36 International Conference on Machine l iid σw l iid 2 weights Wij ∼ N (0; ) and bias Bi ∼ N (0; σ ), Learning, Long Beach, California, PMLR 97, 2019. Copyright Nl−1 b 2019 by the author(s). where N (µ, σ2) denotes the normal distribution of mean µ On the Impact of the Activation Function on Deep Neural Networks Training and variance σ2. For some input a 2 Rd, the propagation Let E and G be two subsets of R. We define the following of this input through the network is given for an activation sets of functions for k 2 N by function φ : R ! R by Dk(E; G) = ff : E ! G such that f (k) existsg d k k (k) 1 X 1 1 C (E; G) = ff 2 D (E; G) such that f is continuousg yi (a) = Wijaj + Bi ; (1) k k (j) 2 j=1 Dg (E; G) = ff 2 D (E; G): 8j ≤ k; E[f (Z) ] < 1g Nl−1 Ck(E; G) = ff 2 Ck(E; G): 8j ≤ k; [f (j)(Z)2] < 1g l X l l−1 l g E yi(a) = Wijφ(yj (a)) + Bi; for l ≥ 2: (2) j=1 (k) th Throughout this paper we assume that for all l the pro- where f is the k derivative of f. When E and G are not l explicitly mentioned, we assume E = G = R. cesses yi(:) are independent (across i) centred Gaussian processes with covariance kernels κl and write accordingly ind 2.2. Limiting behaviour of the variance and covariance yl ∼ GP(0; κl). This is an idealized version of the true i operators processes corresponding to choosing Nl−1 = +1 (which yl(a) l l implies, using Central Limit Theorem, that i is a Gaus- We analyze here the limiting behaviour of qa and ca;b as l l sian variable for any input a). The approximation of yi(:) goes to infinity. From now onwards, we will also assume 1 by a Gaussian process was first proposed by (Neal, 1995) in without loss of generality that cab ≥ 0 (similar results can 1 the single layer case and has been recently extended to the be obtained straightforwardly when cab ≤ 0). We first need multiple layer case by (Lee et al., 2018) and (Matthews et al., to define the Domains of Convergence associated with an 2018). We recall here the expressions of the limiting Gaus- activation function φ. d l sian process kernels. For any input a 2 R , E[yi(a)] = 0 0 + 2 Definition 1. Let φ 2 Dg, (σb; σw) 2 (R ) . so that for any inputs a; b 2 d R (i) Domain of convergence for the variance Dφ,var : l l l (σb; σw) 2 Dφ,var if there exists K > 0, q ≥ 0 such that κ (a; b) = E[yi(a)yi(b)] 1 l for any input a with q ≤ K, liml!1 q = q. We denote 2 2 l−1 l−1 a a = σb + σwE[φ(yi (a))φ(yi (b))] by Kφ,var(σb; σw) the maximal K satisfying this condition. 2 2 l−1 l−1 l−1 (ii) Domain of convergence for the correlation D : = σb + σwFφ(κ (a; a); κ (a; b); κ (b; b)) φ,corr (σb; σw) 2 Dφ,corr if there exists K > 0 such that for 1 1 l where Fφ is a function that only depends on φ. This gives any two inputs a; b with qa; qb ≤ K, liml!1 cab = 1. We l a recursion to calculate the kernel κ ; see, e.g., (Lee et al., denote by Kφ,corr(σb; σw) the maximal K satisfying this 2018) for more details. We can also express the kernel condition. l l κ (a; b) (which we denote hereafter by qab) in terms of the l th Remark: Typically, q in Definition1 is a fixed point of the correlation cab in the l layer variance function defined in (3). Therefore, it is easy to q q l 2 2 l−1 l−1 l−1 see that for any (σb; σw) such that F is non-decreasing and qab = σb + σwE[φ( qa Z1)φ( qb U2(cab ))] admits at least one fixed point, we have Kφ,var(σb; σw) ≥ q q where q is the minimal fixed point; i.e. q := minfx : l−1 l−1 l−1 l−1 l−1 l−1 where qa := qaa , resp. cab := qab = qa qb , is F (x) = xg. Thus, if we re-scale the input data to have th q1 ≤ q ql q the variance, resp.p correlation, in the (l − 1) layer and a , the variance a converges to . We can also re- 2 U2(x) = xZ1 + 1 − x Z2 where Z1, Z2 are independent scale the variance σw of the first layer (only) to assume that 1 standard Gaussian random variables. When it propagates qa ≤ q for all inputs a. l through the network. qa is updated through the layers by the l l−1 The next Lemma gives sufficient conditions under which recursive formula qa = F (qa ), where F is the ‘variance Kφ,var and Kφ,corr are infinite. function’ given by Lemma 1. Assume φ00 exists at least in the distribution p 2 2 2 sense.1 F (x) = σb + σwE[φ( xZ) ];Z ∼ N (0; 1) (3) 02 00 Let Mφ := supx≥0E[jφ (xZ) + φ (xZ)φ(xZ)j]. Assume Throughout this paper, Z; Z1;Z2 will always denote 2 1 Mφ < 1, then for σw < M and σb ≥ 0, we have independent standard Gaussian variables, and a; b two φ (σb; σw) 2 Dφ,var and Kφ,var(σb; σw) = 1.
Recommended publications
  • Training Autoencoders by Alternating Minimization
    Under review as a conference paper at ICLR 2018 TRAINING AUTOENCODERS BY ALTERNATING MINI- MIZATION Anonymous authors Paper under double-blind review ABSTRACT We present DANTE, a novel method for training neural networks, in particular autoencoders, using the alternating minimization principle. DANTE provides a distinct perspective in lieu of traditional gradient-based backpropagation techniques commonly used to train deep networks. It utilizes an adaptation of quasi-convex optimization techniques to cast autoencoder training as a bi-quasi-convex optimiza- tion problem. We show that for autoencoder configurations with both differentiable (e.g. sigmoid) and non-differentiable (e.g. ReLU) activation functions, we can perform the alternations very effectively. DANTE effortlessly extends to networks with multiple hidden layers and varying network configurations. In experiments on standard datasets, autoencoders trained using the proposed method were found to be very promising and competitive to traditional backpropagation techniques, both in terms of quality of solution, as well as training speed. 1 INTRODUCTION For much of the recent march of deep learning, gradient-based backpropagation methods, e.g. Stochastic Gradient Descent (SGD) and its variants, have been the mainstay of practitioners. The use of these methods, especially on vast amounts of data, has led to unprecedented progress in several areas of artificial intelligence. On one hand, the intense focus on these techniques has led to an intimate understanding of hardware requirements and code optimizations needed to execute these routines on large datasets in a scalable manner. Today, myriad off-the-shelf and highly optimized packages exist that can churn reasonably large datasets on GPU architectures with relatively mild human involvement and little bootstrap effort.
    [Show full text]
  • CS 189 Introduction to Machine Learning Spring 2021 Jonathan Shewchuk HW6
    CS 189 Introduction to Machine Learning Spring 2021 Jonathan Shewchuk HW6 Due: Wednesday, April 21 at 11:59 pm Deliverables: 1. Submit your predictions for the test sets to Kaggle as early as possible. Include your Kaggle scores in your write-up (see below). The Kaggle competition for this assignment can be found at • https://www.kaggle.com/c/spring21-cs189-hw6-cifar10 2. The written portion: • Submit a PDF of your homework, with an appendix listing all your code, to the Gradescope assignment titled “Homework 6 Write-Up”. Please see section 3.3 for an easy way to gather all your code for the submission (you are not required to use it, but we would strongly recommend using it). • In addition, please include, as your solutions to each coding problem, the specific subset of code relevant to that part of the problem. Whenever we say “include code”, that means you can either include a screenshot of your code, or typeset your code in your submission (using markdown or LATEX). • You may typeset your homework in LaTeX or Word (submit PDF format, not .doc/.docx format) or submit neatly handwritten and scanned solutions. Please start each question on a new page. • If there are graphs, include those graphs in the correct sections. Do not put them in an appendix. We need each solution to be self-contained on pages of its own. • In your write-up, please state with whom you worked on the homework. • In your write-up, please copy the following statement and sign your signature next to it.
    [Show full text]
  • Can Temporal-Difference and Q-Learning Learn Representation? a Mean-Field Analysis
    Can Temporal-Difference and Q-Learning Learn Representation? A Mean-Field Analysis Yufeng Zhang Qi Cai Northwestern University Northwestern University Evanston, IL 60208 Evanston, IL 60208 [email protected] [email protected] Zhuoran Yang Yongxin Chen Zhaoran Wang Princeton University Georgia Institute of Technology Northwestern University Princeton, NJ 08544 Atlanta, GA 30332 Evanston, IL 60208 [email protected] [email protected] [email protected] Abstract Temporal-difference and Q-learning play a key role in deep reinforcement learning, where they are empowered by expressive nonlinear function approximators such as neural networks. At the core of their empirical successes is the learned feature representation, which embeds rich observations, e.g., images and texts, into the latent space that encodes semantic structures. Meanwhile, the evolution of such a feature representation is crucial to the convergence of temporal-difference and Q-learning. In particular, temporal-difference learning converges when the function approxi- mator is linear in a feature representation, which is fixed throughout learning, and possibly diverges otherwise. We aim to answer the following questions: When the function approximator is a neural network, how does the associated feature representation evolve? If it converges, does it converge to the optimal one? We prove that, utilizing an overparameterized two-layer neural network, temporal- difference and Q-learning globally minimize the mean-squared projected Bellman error at a sublinear rate. Moreover, the associated feature representation converges to the optimal one, generalizing the previous analysis of [21] in the neural tan- gent kernel regime, where the associated feature representation stabilizes at the initial one. The key to our analysis is a mean-field perspective, which connects the evolution of a finite-dimensional parameter to its limiting counterpart over an infinite-dimensional Wasserstein space.
    [Show full text]
  • Neural Networks Shuai Li John Hopcroft Center, Shanghai Jiao Tong University
    Lecture 6: Neural Networks Shuai Li John Hopcroft Center, Shanghai Jiao Tong University https://shuaili8.github.io https://shuaili8.github.io/Teaching/VE445/index.html 1 Outline • Perceptron • Activation functions • Multilayer perceptron networks • Training: backpropagation • Examples • Overfitting • Applications 2 Brief history of artificial neural nets • The First wave • 1943 McCulloch and Pitts proposed the McCulloch-Pitts neuron model • 1958 Rosenblatt introduced the simple single layer networks now called Perceptrons • 1969 Minsky and Papert’s book Perceptrons demonstrated the limitation of single layer perceptrons, and almost the whole field went into hibernation • The Second wave • 1986 The Back-Propagation learning algorithm for Multi-Layer Perceptrons was rediscovered and the whole field took off again • The Third wave • 2006 Deep (neural networks) Learning gains popularity • 2012 made significant break-through in many applications 3 Biological neuron structure • The neuron receives signals from their dendrites, and send its own signal to the axon terminal 4 Biological neural communication • Electrical potential across cell membrane exhibits spikes called action potentials • Spike originates in cell body, travels down axon, and causes synaptic terminals to release neurotransmitters • Chemical diffuses across synapse to dendrites of other neurons • Neurotransmitters can be excitatory or inhibitory • If net input of neuro transmitters to a neuron from other neurons is excitatory and exceeds some threshold, it fires an action potential 5 Perceptron • Inspired by the biological neuron among humans and animals, researchers build a simple model called Perceptron • It receives signals 푥푖’s, multiplies them with different weights 푤푖, and outputs the sum of the weighted signals after an activation function, step function 6 Neuron vs.
    [Show full text]
  • Dynamic Modification of Activation Function Using the Backpropagation Algorithm in the Artificial Neural Networks
    (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 10, No. 4, 2019 Dynamic Modification of Activation Function using the Backpropagation Algorithm in the Artificial Neural Networks Marina Adriana Mercioni1, Alexandru Tiron2, Stefan Holban3 Department of Computer Science Politehnica University Timisoara, Timisoara, Romania Abstract—The paper proposes the dynamic modification of These functions represent the main activation functions, the activation function in a learning technique, more exactly being currently the most used by neural networks, representing backpropagation algorithm. The modification consists in from this reason a standard in building of an architecture of changing slope of sigmoid function for activation function Neural Network type [6,7]. according to increase or decrease the error in an epoch of learning. The study was done using the Waikato Environment for The activation functions that have been proposed along the Knowledge Analysis (WEKA) platform to complete adding this time were analyzed in the light of the applicability of the feature in Multilayer Perceptron class. This study aims the backpropagation algorithm. It has noted that a function that dynamic modification of activation function has changed to enables differentiated rate calculated by the neural network to relative gradient error, also neural networks with hidden layers be differentiated so and the error of function becomes have not used for it. differentiated [8]. Keywords—Artificial neural networks; activation function; The main purpose of activation function consists in the sigmoid function; WEKA; multilayer perceptron; instance; scalation of outputs of the neurons in neural networks and the classifier; gradient; rate metric; performance; dynamic introduction a non-linear relationship between the input and modification output of the neuron [9].
    [Show full text]
  • A Deep Reinforcement Learning Neural Network Folding Proteins
    DeepFoldit - A Deep Reinforcement Learning Neural Network Folding Proteins Dimitra Panou1, Martin Reczko2 1University of Athens, Department of Informatics and Telecommunications 2Biomedical Sciences Research Center “Alexander Fleming” ABSTRACT Despite considerable progress, ab initio protein structure prediction remains suboptimal. A crowdsourcing approach is the online puzzle video game Foldit [1], that provided several useful results that matched or even outperformed algorithmically computed solutions [2]. Using Foldit, the WeFold [3] crowd had several successful participations in the Critical Assessment of Techniques for Protein Structure Prediction. Based on the recent Foldit standalone version [4], we trained a deep reinforcement neural network called DeepFoldit to improve the score assigned to an unfolded protein, using the Q-learning method [5] with experience replay. This paper is focused on model improvement through hyperparameter tuning. We examined various implementations by examining different model architectures and changing hyperparameter values to improve the accuracy of the model. The new model’s hyper-parameters also improved its ability to generalize. Initial results, from the latest implementation, show that given a set of small unfolded training proteins, DeepFoldit learns action sequences that improve the score both on the training set and on novel test proteins. Our approach combines the intuitive user interface of Foldit with the efficiency of deep reinforcement learning. KEYWORDS: ab initio protein structure prediction, Reinforcement Learning, Deep Learning, Convolution Neural Networks, Q-learning 1. ALGORITHMIC BACKGROUND Machine learning (ML) is the study of algorithms and statistical models used by computer systems to accomplish a given task without using explicit guidelines, relying on inferences derived from patterns. ML is a field of artificial intelligence.
    [Show full text]
  • A Study of Activation Functions for Neural Networks Meenakshi Manavazhahan University of Arkansas, Fayetteville
    University of Arkansas, Fayetteville ScholarWorks@UARK Computer Science and Computer Engineering Computer Science and Computer Engineering Undergraduate Honors Theses 5-2017 A Study of Activation Functions for Neural Networks Meenakshi Manavazhahan University of Arkansas, Fayetteville Follow this and additional works at: http://scholarworks.uark.edu/csceuht Part of the Other Computer Engineering Commons Recommended Citation Manavazhahan, Meenakshi, "A Study of Activation Functions for Neural Networks" (2017). Computer Science and Computer Engineering Undergraduate Honors Theses. 44. http://scholarworks.uark.edu/csceuht/44 This Thesis is brought to you for free and open access by the Computer Science and Computer Engineering at ScholarWorks@UARK. It has been accepted for inclusion in Computer Science and Computer Engineering Undergraduate Honors Theses by an authorized administrator of ScholarWorks@UARK. For more information, please contact [email protected], [email protected]. A Study of Activation Functions for Neural Networks An undergraduate thesis in partial fulfillment of the honors program at University of Arkansas College of Engineering Department of Computer Science and Computer Engineering by: Meena Mana 14 March, 2017 1 Abstract: Artificial neural networks are function-approximating models that can improve themselves with experience. In order to work effectively, they rely on a nonlinearity, or activation function, to transform the values between each layer. One question that remains unanswered is, “Which non-linearity is optimal for learning with a particular dataset?” This thesis seeks to answer this question with the MNIST dataset, a popular dataset of handwritten digits, and vowel dataset, a dataset of vowel sounds. In order to answer this question effectively, it must simultaneously determine near-optimal values for several other meta-parameters, including the network topology, the optimization algorithm, and the number of training epochs necessary for the model to converge to good results.
    [Show full text]
  • Long Short-Term Memory 1 Introduction
    LONG SHORTTERM MEMORY Neural Computation J urgen Schmidhuber Sepp Ho chreiter IDSIA Fakultat f ur Informatik Corso Elvezia Technische Universitat M unchen Lugano Switzerland M unchen Germany juergenidsiach ho chreitinformatiktumuenchende httpwwwidsiachjuergen httpwwwinformatiktumuenchendehochreit Abstract Learning to store information over extended time intervals via recurrent backpropagation takes a very long time mostly due to insucient decaying error back ow We briey review Ho chreiters analysis of this problem then address it by introducing a novel ecient gradientbased metho d called Long ShortTerm Memory LSTM Truncating the gradient where this do es not do harm LSTM can learn to bridge minimal time lags in excess of discrete time steps by enforcing constant error ow through constant error carrousels within sp ecial units Multiplicative gate units learn to op en and close access to the constant error ow LSTM is lo cal in space and time its computational complexity p er time step and weight is O Our exp eriments with articial data involve lo cal distributed realvalued and noisy pattern representations In comparisons with RTRL BPTT Recurrent CascadeCorrelation Elman nets and Neural Sequence Chunking LSTM leads to many more successful runs and learns much faster LSTM also solves complex articial long time lag tasks that have never b een solved by previous recurrent network algorithms INTRODUCTION Recurrent networks can in principle use their feedback connections to store representations of recent input events in form of activations
    [Show full text]
  • Chapter 02: Fundamentals of Neural Networks
    FUNDAMENTALS OF NEURAL 2 NETWORKS Ali Zilouchian 2.1 INTRODUCTION For many decades, it has been a goal of science and engineering to develop intelligent machines with a large number of simple elements. References to this subject can be found in the scientific literature of the 19th century. During the 1940s, researchers desiring to duplicate the function of the human brain, have developed simple hardware (and later software) models of biological neurons and their interaction systems. McCulloch and Pitts [1] published the first systematic study of the artificial neural network. Four years later, the same authors explored network paradigms for pattern recognition using a single layer perceptron [2]. In the 1950s and 1960s, a group of researchers combined these biological and psychological insights to produce the first artificial neural network (ANN) [3,4]. Initially implemented as electronic circuits, they were later converted into a more flexible medium of computer simulation. However, researchers such as Minsky and Papert [5] later challenged these works. They strongly believed that intelligence systems are essentially symbol processing of the kind readily modeled on the Von Neumann computer. For a variety of reasons, the symbolic–processing approach became the dominant method. Moreover, the perceptron as proposed by Rosenblatt turned out to be more limited than first expected. [4]. Although further investigations in ANN continued during the 1970s by several pioneer researchers such as Grossberg, Kohonen, Widrow, and others, their works received relatively less attention. The primary factors for the recent resurgence of interest in the area of neural networks are the extension of Rosenblatt, Widrow and Hoff’s works dealing with learning in a complex, multi-layer network, Hopfield mathematical foundation for understanding the dynamics of an important class of networks, as well as much faster computers than those of 50s and 60s.
    [Show full text]
  • 1 Activation Functions in Single Hidden Layer Feed
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE Selçuk-Teknik Dergisi ISSN 1302-6178 Journal ofprovided Selcuk by- Selçuk-TeknikTechnic Dergisi (E-Journal - Selçuk Üniversiti) Özel Sayı 2018 (ICENTE’18) Special Issue 2018 (ICENTE'18) ACTIVATION FUNCTIONS IN SINGLE HIDDEN LAYER FEED-FORWARD NEURAL NETWORKS Ender SEVİNÇ University of Turkish Aeronautical Association, Ankara Turkey [email protected] Abstract Especially in the last decade, Artificial Intelligence (AI) has gained increasing popularity as the neural networks represent incredibly exciting and powerful machine learning-based techniques that can solve many real-time problems. The learning capability of such systems is directly related with the evaluation methods used. In this study, the effectiveness of the calculation parameters in a Single-Hidden Layer Feedforward Neural Networks (SLFNs) will be examined. We will present how important the selection of an activation function is in the learning stage. A lot of work is developed and presented for SLFNs up to now. Our study uses one of the most commonly known learning algorithms, which is Extreme Learning Machine (ELM). Main task of an activation function is to map the input value of a neural network to the output node with a high learning or achievement rate. However, determining the correct activation function is not as simple as thought. First we try to show the effect of the activation functions on different datasets and then we propose a method for selection process of it due to the characteristic of any dataset. The results show that this process is providing a remarkably better performance and learning rate in a sample neural network.
    [Show full text]
  • Performance Evaluation of Word Embeddings for Sarcasm Detection- a Deep Learning Approach
    Performance Evaluation of Word Embeddings for Sarcasm Detection- A Deep Learning Approach Annie Johnson1, Karthik R2 1 School of Electronics Engineering, Vellore Institute of Technology, Chennai. 2Centre for Cyber Physical Systems, Vellore Institute of Technology, Chennai. [email protected], [email protected] Abstract.Sarcasm detection is a critical step to sentiment analysis, with the aim of understanding, and exploiting the available information from platforms such as social media. The accuracy of sarcasm detection depends on the nature of word embeddings. This research performs a comprehensive analysis of different word embedding techniques for effective sarcasm detection. A hybrid combination of optimizers including; the Adaptive Moment Estimation (Adam), the Adaptive Gradient Algorithm (AdaGrad) and Adadelta functions and activation functions like Rectified Linear Unit (ReLU) and Leaky ReLU have been experimented with.Different word embedding techniques including; Bag of Words (BoW), BoW with Term Frequency–Inverse Document Frequency (TF-IDF), Word2vec and Global Vectors for word representation (GloVe) are evaluated. The highest accuracy of 61.68% was achieved with theGloVeembeddings and an AdaGrad optimizer and a ReLU activation function, used in the deep learning model. Keywords: Sarcasm, Deep Learning, Word Embedding, Sentiment Analysis 1 Introduction Sarcasm is the expression of criticism and mockery in a particular context, by employing words that mean the opposite of what is intended. This verbal irony in sarcastic text challenges the domain of sentiment analysis. With the emergence of smart mobile devices and faster internet speeds, there has been an exponential growth in the use of social media websites. There are about 5.112 billion unique mobile users around the world.
    [Show full text]
  • Deep Learning and Neural Networks
    ENLP Lecture 14 Deep Learning & Neural Networks Austin Blodgett & Nathan Schneider ENLP | March 4, 2020 a family of algorithms NN Task Example Input Example Output Binary classification Multiclass classification Sequence Sequence to Sequence Tree/Graph Parsing NN Task Example Input Example Output Binary features +/- classification Multiclass features decl, imper, … classification Sequence sentence POS tags Sequence to (English) sentence (Spanish) sentence Sequence Tree/Graph sentence dependency tree or Parsing AMR parsing 2. What’s Deep Learning (DL)? • Deep learning is a subfield of machine learning 3.3. APPROACH 35 • Most machine learning methods work Feature NER TF Current Word ! ! well because of human-designed Previous Word ! ! Next Word ! ! representations and input features Current Word Character n-gram all length ≤ 6 Current POS Tag ! • For example: features for finding Surrounding POS Tag Sequence ! Current Word Shape ! ! named entities like locations or Surrounding Word Shape Sequence ! ! Presence of Word in Left Window size 4 size 9 organization names (Finkel et al., 2010): Presence of Word in Right Window size 4 size 9 Table 3.1: Features used by the CRF for the two tasks: named entity recognition (NER) and template filling (TF). • Machine learning becomes just optimizing weights to best make a final prediction can go beyond imposing just exact identity conditions). I illustrate this by modeling two forms of non-local structure: label consistency in the named entity recognition task, and template consistency in the template filling task. One could imagine many ways of defining such models; for simplicity I use the form (Slide from Manning and Socher) P (y|x) #(λ,y,x) (3.1) M ∝ ∏ θλ λ∈Λ where the product is over a set of violation types Λ,andforeachviolationtypeλ we specify a penalty parameter θλ .Theexponent#(λ,s,o) is the count of the number of times that the violation λ occurs in the state sequence s with respect to the observation sequence o.Thishastheeffectofassigningsequenceswithmoreviolations a lower probability.
    [Show full text]