Modeling networks with auxiliary information