A function is said to be "periodic" if there's a finite $T$ such that $f(t) = f(t \pm T), \forall$. Usually there's either one such $T$, or none at all. How about infinitely many $T$, that can also be complex?:
$$ f(t)=f(t \pm T),\ \forall t, T \in \mathbb{C} \tag{1} $$
In some sense, Softmax qualifies; take any set of values, $(x_0, x_1, ..., x_{N-1})$, and add or subtract any number, real or complex, and the output's the same ($e^T$ factors from numerator and denominator).
It's easier to conceptualize if compared to a sine; with frequency $f=2$, we'd need to add (or subtract) $T=1/2$ from every input array value for every output array value to remain the same.
Is this interpretation sensible? Is there an entire class of such functions (with a formal name)?
To be clear, softmax cannot be directly expressed as $(1)$ since it can't directly be represented as $f(t)$, but if we assume all inputs are unique and sorted (and uniformly-spaced?), we obtain a discretization whose continuous variant may qualify for said interpretations.
Test code:
import numpy as np
def is_omniperiodic(fn):
x = np.random.randn(10)
ref = fn(x)
for T in 100 * np.random.randn(100):
assert np.allclose(fn(x + T), ref)
def softmax(x):
return np.exp(x) / np.sum(np.exp(x))
For a continuous function of a real variable, you can have one (minimal) period. If there are two or more periods (not rational multiples of each other) your function is constant. I do not know of any reason to study real discontinuous functions with two or more periods.
For a continuous function of a complex variable, you can have two (minimal) periods, as long as one is not a real multiple of the other. The study known as "elliptic functions" deals with such "doubly periodic" cases. If they are non-constant, they cannot be entire functions, but they can be meromorphic.
See https://en.wikipedia.org/wiki/Doubly_periodic_function
I looked at the link on "softmax". It seems to be a function on $K$-tuples to $K$-tuples like this: $$ S(x_1,x_2,\dots, x_K) := \left(\frac{\exp(x_1)}{\sum_{k=1}^K \exp(x_k)}, \frac{\exp(x_2)}{\sum_{k=1}^K \exp(x_k)}, \dots, \frac{\exp(x_K)}{\sum_{k=1}^K \exp(x_k)}\right) $$ Now it is true that if you add the same thing $T$ to all the arguments, then the result is unchanged. $S(x_1+T,x_2+T,\dots,x_K+T) = S(x_1,x_2,\dots,x_K)$. But that is not what we would call "periodic".