Automated Cost Modeling in The Graph