Make dilation thresholds adapt to graph size