For a wide ReLU network, the NTK between two inputs reduces to an arc-cosine kernel: a formula that depends only on the two input norms and the angle between them. Similar inputs score high and dissimilar ones score low, without any training.
Implement arc_cosine_kernel(x, y), using the norms of x and y and the angle between them.
0.0 when either vector is zero.Compute the angle theta from the normalized dot product, then apply |x||y| / (2 pi) * (sin theta + (pi - theta) cos theta).
No results yet
Run your code to check it against the examples, or submit to run every test.