Partition refinement and graph decomposition