Transformations of neural representations in a social behaviour network