Answers.Body: <p>I am going to refer to the expected output as "the price of the house" or simply as "price" to make the answer easier to understand but this applies to any other scenario as well.</p>
  
  <p>To answer <strong>part 1</strong> of your question, if the correlation between <span class="math-container">$w$</span> and the price of the house is 0 or negligible, then it is very likely that varying <span class="math-container">$w$</span> while keeping <span class="math-container">$x$</span>, <span class="math-container">$y$</span>, and <span class="math-container">$z$</span> constant will result in almost the same price being predicted in a trained network. This certainly seems like a learnable statistical characteristic.
  There are some caveats though. Firstly, it depends on how complex your network is. How learnable are the correlations between <span class="math-container">$x$</span>, <span class="math-container">$y$</span>, <span class="math-container">$z$</span> and the price? Assuming most other factors like these fall into place, I would say that it is <em>quite likely</em> that <span class="math-container">$w$</span> will be decoupled from the output. </p>
  
  <p><strong>Part 2</strong> of your question is a little trickier to explain. Let us consider a simpler scenario where we use logistic regression. Logistic regression is, in essence, a network with sigmoid output and no hidden layer.  The output is the sigmoid over a linear combination of all inputs.  </p>
  
  <p>Let us consider the example as follows -<br>
  Two data points have the same or similar values of <span class="math-container">$x$</span>, <span class="math-container">$y$</span> and <span class="math-container">$z$</span> and expected output, but <span class="math-container">$w$</span> varies considerably. The coefficient of <span class="math-container">$w$</span> in the linear combination has a finite, non-zero value. Because of this, the input to the sigmoid will differ even though the resultant price in both cases should be the same or similar.<br>
  The loss function's value will increase because of the discrepancy between expected and predicted values in the above example.<br>
  In general, the change in the value of the coefficient of <span class="math-container">$w$</span> is a product of learning rate and the differential of the loss function with respect to it.
  The change in its value will now be such that the magnitude of the coefficient of <span class="math-container">$w$</span> decreases to enforce the condition noted in the above examples.</p>
  
  <p>It is difficult to predict at what point a more complex network will learn to ignore <span class="math-container">$w$</span>. It could happen that the weights at the input layer itself might converge to zero. Or the weights in successive layers could converge such that their linear combination gives no importance to the input w. </p>
  
  <p>I wanted to address another point. You mentioned that - </p>
  
  <blockquote>
    <p>For a classical neural network, the network has no "memory," so it might be very difficult for the network to realize that w is a worthless input parameter. </p>
  </blockquote>
  
  <p>This first part about having no memory is true. However, the network does not need to remember all the past values. The trainable parameters of a network are basically learning the statistical distribution of the input data and map it to the expected output.  They are trying to model a mathematical function that satisfies as many such training samples as possible.
  The network, through these parameters, has stored an abstraction of the behaviour of the training data. So even though it does not remember every training sample, it does remember the general correlation between input and expected output.</p>
  
  <p>An oversimplified analogy would be, you as a human don't remember the multiplication of every number by 2. Yet, if I ask you what is the product of 123 and 2, you can find the product because you just know how the "multiply by 2" function works in general.   Similarly, the network builds an intuition of what the expected output should look like in general, by mapping it to a function whose parameters can be modified.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-17T09:36:10.390Z
Answers.LastActivityDate: 2019-04-17T09:36:10.390Z
Answers.UserDisplayName: Tanmay
Answers.Body: <p>This is a learnable behavior, given enough data. 
  We would expect the an error to backpropagate to <span class="math-container">$w$</span> whenever its use harmed classification accuracy. In this case, that would be whenever <span class="math-container">$|w|&gt;0$</span>. In general, I'm not sure how long this would take.</p>
  
  <p>However, the speed of <span class="math-container">$w$</span>'s convergence to zero would benefit from <a href="http://cs231n.github.io/neural-networks-2/#reg" rel="nofollow noreferrer">regularization</a>, which is often basically a penalty on the magnitude of your network weights added to the loss function you're optimizing. If <span class="math-container">$w$</span> truly doesn't matter to classification, then regularization will definitely drive it to zero.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-06T10:34:08.733Z
Answers.LastActivityDate: 2019-03-10T08:34:35.833Z
Answers.LastEditDate: 2019-03-10T08:34:35.833Z
Answers.UserDisplayName: Philip Raeisghasem
Body: <p>Disclaimer: I'm not a student in computer science and most of my knowledge about ML/NN comes from YouTube, so please bear with me!</p>
  
  <hr>
  
  <p>Let's say we have a classification neural network, that takes some input data <span class="math-container">$w, x, y, z$</span>, and has some number of output neurons. I like to think about a classifier that decides how expensive a house would be, so its output neurons are bins of the approximate price of the house.</p>
  
  <p>Determining house prices is something humans have done for a while, so let's say we know <em>a priori</em> that data <span class="math-container">$x, y, z$</span> are important to the price of the house (square footage, number of bedrooms, number of bathrooms, for example), and datum <span class="math-container">$w$</span> has no strong effect on the price of the house (color of the front door, for example). As an experimentalist, I might determine this by finding sets of houses with the same <span class="math-container">$x, y, z$</span> and varying <span class="math-container">$w$</span>, and show that the house prices do not differ significantly.</p>
  
  <p>Now, let's say our neural network has been trained for a little while on some random houses. Later on in the data set. it will encounter sets of houses whose <span class="math-container">$x, y, z$</span> and price are all the same, but whose <span class="math-container">$w$</span> are different. I would naively expect that at the end of the training session, the weights from <span class="math-container">$w$</span> to the first layer of neurons would go to zero, effectively decoupling the input datum <span class="math-container">$w$</span> from the output neuron. I have two questions:</p>
  
  <ol>
  <li>Is it certain, or even likely, that <span class="math-container">$w$</span> will become decoupled from the layer of output neurons?</li>
  <li>Where, mathematically, would this happen? What in the backpropagation step would govern this effect happening, and how quickly would it happen?</li>
  </ol>
  
  <p>For a classical neural network, the network has no "memory," so it might be very difficult for the network to realize that <span class="math-container">$w$</span> is a worthless input parameter.</p>
  
  <p>Any information is much appreciated, and if there are any papers that might give me insight into this topic, I'd be happy to read them.</p>
  
Tags: <neural-networks><classification>
Title: Can neural networks learn to ignore an input datum?
UserDisplayName: czz1850
ThreadText: # Can neural networks learn to ignore an input datum?
  
  (Asked by: username_0 on 2019-01-10)
  
  Disclaimer: I'm not a student in computer science and most of my knowledge about ML/NN comes from YouTube, so please bear with me!
  
  ---
  
  Let's say we have a classification neural network, that takes some input data $w, x, y, z$, and has some number of output neurons. I like to think about a classifier that decides how expensive a house would be, so its output neurons are bins of the approximate price of the house.
  
  Determining house prices is something humans have done for a while, so let's say we know *a priori* that data $x, y, z$ are important to the price of the house (square footage, number of bedrooms, number of bathrooms, for example), and datum $w$ has no strong effect on the price of the house (color of the front door, for example). As an experimentalist, I might determine this by finding sets of houses with the same $x, y, z$ and varying $w$, and show that the house prices do not differ significantly.
  
  Now, let's say our neural network has been trained for a little while on some random houses. Later on in the data set. it will encounter sets of houses whose $x, y, z$ and price are all the same, but whose $w$ are different. I would naively expect that at the end of the training session, the weights from $w$ to the first layer of neurons would go to zero, effectively decoupling the input datum $w$ from the output neuron. I have two questions:
  
  1. Is it certain, or even likely, that $w$ will become decoupled from the layer of output neurons?
  2. Where, mathematically, would this happen? What in the backpropagation step would govern this effect happening, and how quickly would it happen?
  
  For a classical neural network, the network has no "memory," so it might be very difficult for the network to realize that $w$ is a worthless input parameter.
  
  Any information is much appreciated, and if there are any papers that might give me insight into this topic, I'd be happy to read them.
  
  **Tags:** neural-networks, classification
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-04-17. Score: 2
  
  I am going to refer to the expected output as "the price of the house" or simply as "price" to make the answer easier to understand but this applies to any other scenario as well.
  
  To answer **part 1** of your question, if the correlation between $w$ and the price of the house is 0 or negligible, then it is very likely that varying $w$ while keeping $x$, $y$, and $z$ constant will result in almost the same price being predicted in a trained network. This certainly seems like a learnable statistical characteristic.
  There are some caveats though. Firstly, it depends on how complex your network is. How learnable are the correlations between $x$, $y$, $z$ and the price? Assuming most other factors like these fall into place, I would say that it is *quite likely* that $w$ will be decoupled from the output.
  
  **Part 2** of your question is a little trickier to explain. Let us consider a simpler scenario where we use logistic regression. Logistic regression is, in essence, a network with sigmoid output and no hidden layer. The output is the sigmoid over a linear combination of all inputs.
  
  Let us consider the example as follows -  
  Two data points have the same or similar values of $x$, $y$ and $z$ and expected output, but $w$ varies considerably. The coefficient of $w$ in the linear combination has a finite, non-zero value. Because of this, the input to the sigmoid will differ even though the resultant price in both cases should be the same or similar.  
  The loss function's value will increase because of the discrepancy between expected and predicted values in the above example.  
  In general, the change in the value of the coefficient of $w$ is a product of learning rate and the differential of the loss function with respect to it.
  The change in its value will now be such that the magnitude of the coefficient of $w$ decreases to enforce the condition noted in the above examples.
  
  It is difficult to predict at what point a more complex network will learn to ignore $w$. It could happen that the weights at the input layer itself might converge to zero. Or the weights in successive layers could converge such that their linear combination gives no importance to the input w.
  
  I wanted to address another point. You mentioned that -
  
  > For a classical neural network, the network has no "memory," so it might be very difficult for the network to realize that w is a worthless input parameter.
  
  This first part about having no memory is true. However, the network does not need to remember all the past values. The trainable parameters of a network are basically learning the statistical distribution of the input data and map it to the expected output. They are trying to model a mathematical function that satisfies as many such training samples as possible.
  The network, through these parameters, has stored an abstraction of the behaviour of the training data. So even though it does not remember every training sample, it does remember the general correlation between input and expected output.
  
  An oversimplified analogy would be, you as a human don't remember the multiplication of every number by 2. Yet, if I ask you what is the product of 123 and 2, you can find the product because you just know how the "multiply by 2" function works in general. Similarly, the network builds an intuition of what the expected output should look like in general, by mapping it to a function whose parameters can be modified.
  
  
  ---
  
  ### Answer by username_2 on 2019-03-06. Score: 2
  
  This is a learnable behavior, given enough data.
  We would expect the an error to backpropagate to $w$ whenever its use harmed classification accuracy. In this case, that would be whenever $|w|>0$. In general, I'm not sure how long this would take.
  
  However, the speed of $w$'s convergence to zero would benefit from [regularization](http://cs231n.github.io/neural-networks-2/#reg), which is often basically a penalty on the magnitude of your network weights added to the loss function you're optimizing. If $w$ truly doesn't matter to classification, then regularization will definitely drive it to zero.
  
  
  ---
  
  