Abstract cognitive maps of social network structure aid adaptive inference