Nonparametric analysis of inter‐individual relations using an attention‐based neural network