Let $X$ be a smooth projective complex variety and let us suppose that the closure of the union of curves $C$ on $X$ that are non-positive against the canonical divisor is a closed subset $F\subsetneq X$. Then, I guess that every birational map $X \dashrightarrow X$ is an automorphism of $X\setminus F$. Does someone has a reference for this? I am happy with the case where the codimension of $F$ is at least $2$.