Tight and fast generalization error bound of graph embedding in metric space