Random variables invariant under almost automorphisms. Let $\Omega$ be a standard atomless probability space, we can assume $\Omega=(0,1)$ with Lebesgue measure. A bijection $f:\Omega/A_1\to\Omega/A_2$ is almost automorphism, if $P(A_1)=P(A_2)=0$, $f(A)$ is measurable if and only if $A$ is, and $P(f(A))=P(A)$ in this case. An almost automorphism preserves a (real-valued) random variable (r.v.) $X$ if $X(\omega)=X(f(\omega))$ for almost all $\omega$. 
The question is: Assume that every almost automorphism preserving $Y$ preserves also $X$. Does this imply that $X$ is $Y$-measurable, that is $X=g(Y)$ a.s. for some $g:R \to R$?  
 A: Fix for convenience $\Omega = [0,1)$ with Lebesgue measure $\mu$.  We exhibit a family of continuum-many Borel functions $X_\alpha \colon [0,1) \to \mathbb{R}$, indexed by $\alpha \in (0, 1/2)$, such that


*

*Each $X_\alpha$ has only trivial almost automorphisms, in the sense that each almost automorphism $f$ preserving $X_\alpha$ has $\mu$-null support (i.e., the set $\{r : r \neq f(r)\}$ is $\mu$-null).

*When $\alpha \neq \beta$ we have that $X_\alpha$ is not in your sense $X_\beta$-measurable.
In particular we get a negative answer to the question.
For each $\alpha \in (0,1/2)$ put $I_\alpha = [0,\alpha)$ and $J_\alpha = [0,1) \setminus I_\alpha = [\alpha, 1)$.  Let $i_\alpha \colon [0,1) \to [0,1)$ be the obvious fixed-point-free involution flipping $I_\alpha$ and $J_\alpha$.  Note that since $\alpha < 1/2$ this involution distorts $\mu$ in the following sense: any $\mu$-positive Borel set $A$ contains a $\mu$-positive Borel set $A' \subseteq A$ such that $\mu(A') \neq \mu(i_\alpha[A'])$.  In particular, no restriction of $i_\alpha$ to a set of $\mu$-positive measure can be a $\mu$-preserving map.
Now define $X_\alpha$ by 


*

*$X_\alpha(r) = r$ if $r \in I_\alpha$,

*$X_\alpha(r) =  i_\alpha(r)$ if $r \in J_\alpha $.
Note that $X_\alpha(r) = X_\alpha(s)$ iff $r = s$ or $r = i_\alpha(s)$.  It follows that any almost automorphism preserving $X_\alpha$ is almost everywhere some restriction of $i_\alpha$, but by the previous paragraph it must in fact be almost everywhere the identity.  So each $X_\alpha$ has only trivial almost automorphisms.
Finally, suppose that $\alpha < \beta$ in $(0,1/2)$.  Put $R = [\alpha, \beta)$.  Note that for each $r \in R \subseteq J_\alpha$ we have $i_\beta(r) \in J_\alpha$ and in particular $X_\alpha(r) \neq X_\alpha(i_\beta(r))$.  Of course by construction we have $X_\beta(r) = X_\beta(i_\beta(r))$.  So if $g \colon \mathbb{R} \to \mathbb{R}$ is any function, for each $r\in R$ we must have at least one of $g(X_\beta(r)) \neq X_\alpha(r)$ or $g(X_\beta(i_\beta(r)) \neq X_\alpha(i_\beta(r))$ and in particular $g \circ X_\beta$ does not agree $\mu$-a.e. with $X_\alpha$.  In other words, $X_\alpha$ is not $X_\beta$-measurable.
A similar argument using $i_\alpha$ shows that $X_\beta$ is not $X_\alpha$-measurable.
