1
$\begingroup$

Hello I am trying to undestand the message propagation algorithm of GraphSAGE(https://arxiv.org/pdf/1706.02216.pdf)

In step 7 there is a division with l2 norm (if I understand the notation correctly ). I think it is some kind of normalization step but is there some intuition behind dividing a vector with its l2-norm ? enter image description here

$\endgroup$
1
  • $\begingroup$ If a variable is normally distributed, "centering and scaling" means subtracting the mean and dividing by the variance, so that the result is a standard normal. It's a useful transformation in general. In multivariate regression, the intercept term is the grand mean of the response, and the magnitude of the coefficients can be compared between variables irrespective of their scales. This is useful for penalized methods like LASSO and Ridge. If the response is centered and scaled, the linear regression coefficients are partial Pearson correlations. $\endgroup$
    – AdamO
    Jul 6, 2022 at 13:29

1 Answer 1

1
$\begingroup$

Yes, there is an intuition for what's being done here.

Recall the Pythagorean theorem. The squared length is the sum of the individual squared distances. This is how the L2 norm is calculated; it gives the length of the vector in Euclidian space.

Dividing each component by the length makes the length of the result 1. After line 7, every vector is now a unit vector. The magnitude information has been erased; all that is left is the direction.

As another way to picture it: all of the endpoints of the vectors now lie on the unit sphere.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.