In mathematics, we don't usually use the symbol $\mathrm{mod}$ as an operator but rather as as a way of writing a relation:
$$
x \equiv y \mod n
$$
means $x$ is equivalent to $y$ modulo $n$, i.e., it means that the difference $x - y$ is a multiple of $n$, or equivalently that $x$ and $y$ leave the same remainder when you divide them by $n$.
In programming and computer science $\mathrm{mod}$ is often used as an operator:
$$
y \mathop{\mathrm{mod}} n
$$
means the remainder when you divide $y$ by $n$, subject to some convention for deciding whether a non-zero remainder should be positive or negative if one or both of $y$ and $n$ is negative. (Different programming languages differ on what this convention should be.)
The authors of the paper you are reading are adopting a convention that makes $-3 \mathop{\mathrm{mod}} 12$ positive.