Understanding Weight Updates in a Perceptron I am learning about perceptrons and how they work. I read that each weight $w_j$ is updated based on the equation:
$\begin{equation}
w_j:=w_j+\Delta w_j 
\end{equation} $
Where:
$\begin{equation}
\Delta w_j= n \times (y^{(i)}-\hat{y^{(i)}}) \times x_j^{(i)}
\end{equation}$
Here, $n$ is the learning rate. There are two things that are unclear to me. Namely, why do we take $x_j^{(i)}$ (the input) into consideration? Would not this cause problems when different features have different scales? I know standardization is a potential solution but this was not mentioned. Moreover, it would also lead to vastly different weights when a single feature can take a large range of values (example: a pixel with red value 0 and a pixel with red value 255 on the RGB scale). Moreover how are class labels $\hat{y^{(i)}}$ represented? Would not choosing numbers 0,1,2... create the same type of problem mentioned above ?

Your weight update rule is usually called delta rule aka Widrow-Hoff algorithm. Why do we take the input (and some form of output) into consideration to update? This is mainly due to its adaptation based on the famous Hebb's postulate in his The Organization of Behavior:

When an axon of cell A is near enough to excite a cell B and repeatedly or
persistently takes part in firing it, some growth process or metabolic change
takes place in one or both cells such that A’s efficiency, as one of the cells firing B, is increased.

Hebb's postulate is simply an unsupervised learning rule for a single neuron and later Widrow et al adapted to your formulated delta rule in order to do supervised learning. So originally there's no concern for data standardization since these inputs and outputs are all neural spikes sharing similar scales.
Finally indeed in NN computation blindly choosing numbers 0,1,2... for class labels could cause issues especially if they're not ordinal but normal categorical values such as gender, where one-hot encoding scheme via dummy variables can be used to alleviate such issue.
