graph refinement