In machine learning, one often wants to uniformly approximate an arbitrary continuous function arbitrarily well using polynomials, neural networks, or something else. But in the case of complex-valued functions, this is more difficult. For example, the limit of holomorphic functions in the topology of uniform convergence on compact sets is always holomorphic, so holomorphic functions cannot directly approximate non-holomorphic functions. But in this post, I will show you how one can approximate arbitrary continuous functions indirectly from something like a holomorphic function.
I will state and prove the result in the full generality which means I will need to use uniform algebras over compact sets, but I do not need to use the theory of uniform algebras in order to state and prove the result. I will try to make everything here self-contained.
I came up with the statement and the proof of the result myself.
Motivation:
I am not too much of a fan of neural networks. Even though neural networks perform well in practice, they do not behave in a way that is too appealing to pure mathematicians. For example, if you try to feed purely imaginary inputs into a vanilla neural network with tanh activation and no bias, you will just obtain a random vector from some multi-variate Cauchy distribution as output.
Polynomials, on the other hand, behave in a way appealing to mathematicians, so it would be nice if multivariate polynomials had a stronger presence in machine learning. I have personally trained polynomial machine learning models and they seem to behave mathematically in the sense that if we train the model multiple times with different initializations, we tend to end up with the same trained model; these polynomial models that I have trained are somewhat sophisticated too since they can have multiple layers, but I have not developed them as well as neural networks.
To demonstrate how polynomials may be useful in machine learning, one may want to resort to a uniform approximation for polynomials, but the Stone-Weierstrass approximation theorem allows us to generalize such a uniform approximation theorem from polynomials to nearly arbitrary rings of real-valued functions on some compact Hausdorff space. In this post, we shall give another generalized uniform approximation theorem that applies to uniform algebras which are closed algebras of continuous functions on compact Hausdorff spaces.
In this post, we shall use quantum states to overcome the limitations of some classes of complex-valued functions in approximating arbitrary continuous functions. This use of quantum states alludes to a possible way that one can use quantum states and partial traces to improve the performance of machine learning models.
Uniform algebras:
Suppose that is a compact Hausdorff space. Let denote the collection of all continuous functions . Give the norm defined by. Then is a Banach algebra. A closed subalgebra of is said to be a uniform algebra if contains all constant functions and whenever , there is some with .
Example 0: If is a compact Hausdorff space, then is always a uniform algebra.
Example 1: If is a compact subset of , then let be the set of all continuous functions which are holomorphic on the interior of . Then is a uniform algebra.
Example 2: Suppose that is a commutative Banach algebra. Let denote the set of all continuous Banach algebra homomorphisms . Then becomes a compact Hausdorff space in the weak*-topology. If , then define a continuous function by setting . Then is a uniform algebra.
If is a compact Hausdorff space, is a subspace algebra, and is a finite dimensional complex vector space. Then let denote the set of all functions where if is linear , then .
Lemma: Suppose that is a compact Hausdorff space is a linear subspace that contains all constant functions and where if , there is some with . Then whenever and is open, there is some finite dimensional complex inner product space and with and whenever .
Proof: The proof will just use a standard compactness argument. For each , let be a function with and . Let for each . Then by compactness, there are where . Define by setting . Then and if , there is some with , so in this case, , so as well. Q.E.D.
Recall that a density operator is a positive semidefinite trace 1 linear operator. Given a finite dimensional complex inner product space , let denote the collection of all density operators , and let denote the collection of all linear operators from to . Suppose that are finite dimensional complex inner product spaces. Then the partial trace is the unique linear mapping subject to the condition that whenever are linear.
Theorem: Suppose that is a compact Hausdorff space, is uniform algebra, is a finite dimensional complex inner product space and is a continuous function. Then whenever and is a matrix norm, there is some finite dimensional complex inner product space and where if ,
then .
Proof: Suppose that is an open cover of . For each , there is some , natural number , and some with and whenever . Therefore, let . Then by compactness, there are where . Let .
Define . Let be a unit vector orthogonal to each vector in complex Euclidean space.
Let for each , and let . Let be a finite dimensional complex inner product space, and let be a function such that for all . Let be a positive integer. Define a function by setting where the power is taken elementwise.
If is a finite set of natural numbers, then let denote the -th element of the set . Set for each natural number . For each , let be a unit vector where if , then .
We shall now construct a linear function that maps to some other vector space.
Suppose that with and for and otherwise. Then set . Define .
Observe that . We include the vector to make sure that the summands are all orthogonal.
Let denote the partial trace where we trace out all factors in the tensor product except for . Then
.
Suppose now that . Then suppose that whenever , if , then.
If and , then , so .
When is large, the dominant terms in the sum for are indexed by sets where but where contains all elements with . Therefore, the value can be uniformly approximated by .
Q.E.D.
Conclusion
The proof of the above theorem consists of a standard compactness argument that any mathematician who specializes in analysis should be able to come up with. The above result also applies to the field of real numbers since I nowhere mentioned anything about complex numbers, but for the real numbers, the above result is a consequence of the Stone-Weierstrass theorem. The Stone-Weierstrass theorem also applies to quaternionic-valued functions, so it is unnecessary to state the result for quaternions (and the proof will need to be restated and rewritten since quaternionic tensor products don't work). One should therefore not be too surprised by the above theorem.
The above theorem may also be a corollary of a known result on Banach algebras (or something like that), but I was not able to find an appropriate reference.