  Let $G$ be a large-girth $d$-regular graph and $\mu$ be a random process on
the vertices of $G$ produced by a randomized local algorithm. We prove the
upper bound $(k+1-2k/d)\Bigl(\frac{1}{\sqrt{d-1}}\Bigr)^k$ for the (absolute
value of the) correlation of values on pairs of vertices of distance $k$ and
show that this bound is optimal. The same results hold automatically for factor
of i.i.d processes on the $d$-regular tree. In that case we give an explicit
description for the (closure) of all possible correlation sequences. Our proof
is based on the fact that the Bernoulli graphing of the infinite $d$-regular
tree has spectral radius $2\sqrt{d-1}$. Graphings with this spectral gap are
infinite analogues of finite Ramanujan graphs and they are interesting on their
own right.
