Proving that periodic vector-valued function satisfies $f(\mathbf x)= f(\mathbf x')$ iff $\mathbf x' = \mathbf x + k + \mathbf am$

32 Views Asked by At

In order to create a layer for a neural network that uniquely encodes relative relationships between a set of angles, I'm looking for a differentiable function with some specific properties; I'm curious if such a function exists and how to prove a function has these properties.

Specifically, given some period $m$, I'm looking for a smooth function $f : \mathbb {R}^d \to \mathbb{C}^d$ such that $f(\mathbf x)= f(\mathbf x')$ if and only if $\mathbf x' = \mathbf x + k + \mathbf am$ for some $k \in \mathbb R$ and some $\mathbf a \in \mathbb Z^d$.

My concrete use case is the following: imagine being given an ordered list of angles $\Theta= (\theta_1, \theta_2, \dots, \theta_d)$, with $\theta_i \in [0, 2\pi)$, that represent points on the unit circle. Is there some unique, ordered representation $f(\Theta) = \Phi$, such that $f$ is smooth and invariant to net rotations of all the points around the unit circle? Basically, how can we keep only the relative angle relationships?

It seems to me that no real function with period $m$ can satisfy this property, as the smoothness constraint means at least two values in the range $[0, m)$ will map to the same output, even for a scalar-valued function. It came to mind to use a complex exponential, which led me to this function that's just a complex version of the softmax function (assume $m=2\pi$ for simplicity):

$$ f(\mathbf x)_i = \frac{\exp\{{jx_i}\}}{\sum_l\exp\{{jx_l}\}} $$

With some rearranging I arrive at the following formula describing where $f(\mathbf x + \epsilon)_i=f(\mathbf x)_i$ for some $\epsilon \in \mathbb R^d$:

$$ \sum_l\exp\{{j(x_l+\epsilon_i)}\}=\sum_l\exp\{{j(x_l+\epsilon_l)}\} $$

I'm trying to prove that this implies $\epsilon = k + \mathbf am$, but I'm not sure if this got me any closer.

Does this function satisfy the properties I'm looking for, and if not, is there a function that does?