Suppose an artificial neural network is used to approximate a sine wave (shown in red in the graph below), given the linear input variable $x$ (scaled such that the ANN input is $x_{\rm nn}\in[-1;1]$).
The mean squared error between the target function (sine wave) and the trained ANN output is as shown approximately $4.8\times10^{-3}$, if the ANN structure is 1-8-1 (one input $x_{\rm nn}$, 8 hidden nodes and 1 output node).
Now suppose the ANN structure is changed to 2-8-1, where the second input is normally distributed random noise. The output is then as shown below. The MSE has increased to approximately $1.2\times10^{-2}$ (using the exact same noise sequence as during training) or slightly larger if a new noise sequence is used when testing the network.
The results above were obtained using standard gradient-descent type training with regularisation. All nodes in the hidden layer have $\rm tanh()$ activation functions and the output node is linear, as is standard with function approximation.
What methods are available to automatically remove the second input? That is, training methods allowing the ANN to automatically discover the fact that the second input is noise, and therefore not a useful input. (Therefore excluding all methods where the human programmer must train several different ANN architectures with different input combinations, and evaluate all of them to decide which inputs to use and which to exclude.)
This question extends to larger ANNs where it is difficult to see beforehand which inputs are useful. Ideally, all weights associated with nonsense inputs should automatically be forced to zero.