Modeling and Inferring Attributed Graphs