On Representing (Anti)Symmetric Functions

1 INTRODUCTION . Neural Networks ( NN ) , or more precisely , Multi-Layer Perceptrons ( MLP ) , are universal function approximators [ Pin99 ] in the sense that every ( say ) continuous function can be approximated arbitrarily well by a sufficiently large NN . The true power of NN though stems from the fact that they apparently have a bias towards functions we care about and that they can be trained by local gradient-descent or variations thereof . For many problems we have additional information about the function , e.g . symmetries under which the function of interest is invariant or covariant . Here we consider functions that are covariant¬ under permutations . Of particular interest are functions that are invariant® , equivariant¯ , or antisymmetric° under permutations . Definition 1 ( ( Anti ) symmetric and equivariant functions ) A function φ : Xn → R in n ∈ N variables is called symmetric iff φ ( x1 , ... , xn ) = φ ( xπ ( 1 ) , ... , xπ ( n ) ) for all x1 , ... , xn ∈ X for all permutations π ∈ Sn , where Sn : = { π : { 1 : n } → { 1 : n } ∧ π is bijection } is called the symmetric group and { 1 : n } is short for { 1 , ... , n } . Similarly , a function ψ : Xn → R is called anti-symmetric ( AS ) iff ψ ( x1 , ... , xn ) = σ ( π ) ψ ( xπ ( 1 ) , ... , xπ ( n ) ) , where σ ( π ) = ±1 is the parity or sign of permutation π . A function ϕ : Xn → X ′n is called equivariant under permutations iff ϕ ( Sπ ( x ) ) = Sπ ( ϕ ( x ) ) , where x ≡ ( x1 , ... , xn ) and Sπ ( x1 , ... , xn ) : = ( xπ ( 1 ) , ... , xπ ( n ) ) . Of course ( anti ) symmetric functions are also just functions , hence a NN of sufficient capacity can also represent ( anti ) symmetric functions , and if trained on an ( anti ) symmetric target could converge to an ( anti ) symmetric function . But NNs that can represent only ( anti ) symmetric functions are desirable for multiple reasons . Equivariant MLP ( EMLP ) are the basis for constructing symmetric functions by simply summing the output of the last layer , and for anti-symmetric ( AS ) functions by ¬In full generality , a function f : X → Y is covariant under group operations g ∈ G , if f ( RXg ( x ) ) = RYg ( f ( x ) ) , where RXg : X → X and RYg : Y → Y are representations of group ( element ) g ∈ G. The symmetric group G = Sn is the group of all permutations=bijections π : { 1 , ... , n } → { 1 , ... , n } . ®RYg =Identity . Permutation-invariant functions are also called ‘ totally symmetric functions ’ or simply ‘ sym- metric function ’ . ¯General Y and X , often Y = X and RYg = RXg , also called covariant . °RYg = ±1 for even/odd permutations . multiplying with Vandermonde determinants or by computing their generalized Slater determinant ( GSD ) defined later . The most prominent application is in quantum physics which represents systems of identical ( fermions ) bosons with ( anti ) symmetric wave functions [ PSMF20 ] . Another application is classification of point clouds in computer vision , which should be invariant under permutation of points [ ZKR+18 ] . Even if a general NN can learn the ( anti ) symmetry , it will only do so approximately , but some applications require exact ( anti ) symmetry , for instance in quantum physics to guarantee upper bounds on the true ground state energy [ PSMF20 ] . This has spawned interest in NNs that can represent only ( anti ) symmetric functions [ ZKR+18 , HLL+19 ] . A natural question is whether such NNs can represent all reasonable ( anti ) symmetric functions , which is the focus of this paper . We will answer this question for the ( symmetric ) EMLP [ ZKR+18 ] defined in Section 6 and for the ( AS ) FermiNet [ PSMF20 ] defined in Sections 4 & 5 & 6 . Approximation architectures need to satisfy a number of criteria to be practically useful : ( a ) they can approximate a large class of functions , e.g . all continuous ( anti ) symmetric functions , ( b ) only the ( anti ) symmetric functions can be represented , ( c ) a fast algorithm exists for computing the approximation , ( d ) the representation itself is continuous or differentiable , ( e ) the architecture is suitable for learning the function from data ( which we don ’ t discuss ) . Section 2 reviews existing approximation results for ( anti ) symmetric functions . Section 3 discusses various “ naive ” representations ( linear , sampling , sorting ) and their ( dis ) advantages , before introducing the “ standard ” solution that satisfies ( a ) - ( e ) based on algebraic composition of basis functions , symmetric polynomials , and polarized bases . For simplicity the section considers only totally symmetric functions of their n real-valued inputs ( the d = 1 case ) , i.e . particles in one dimension . Section 4 proves the representation power of a single GSD for totally anti-symmetric ( AS ) functions ( also d = 1 ) . Technically we reduce the GSD to a Vandermonde determinant , and determine the loss of differentiability due to the Vandermonde determinant . From Sections 5 on we consider the general case of functions with n · d inputs that are ( anti ) symmetric when permuting their n ddimensional input vectors . The case d = 3 is particularly relevant for particles and point clouds in 3D space . The difficulties encountered for d = 1 transfer to d > 1 , while the positive results don ’ t , or only with considerable extra effort . The universality construction and proof for the EMLP is outlined in Section 6 with a proper treatment and all details in Sections 6-8 of the supplementary , which implies universality of symmetric MLPs and of the AS FermiNet . Section 7 concludes . We took great care to unify notation from different sources . The list of notation in the appendix should be helpful to disambiguate some similarly looking but different notation . Our main novel contributions are establishing the universality of the anti-symmetric FermiNet with a single GSD ( Theorems 3 & 5 & 7 ) for d = 1 and d > 1 ( the results are non-trivial and unexpected ) , and the universality of ( 2-hidden-layer ) symmetric MLPs ( Theorem 6 ) with a complete and explicit and self-contained equivariant universality construction based on ( smooth ) polynomials . We took care to avoid relying on results with inherently asymptotic or tabulation or discontinuous character , to enable ( in future work ) good approximation rates for specific function classes , such as smooth functions or those with ‘ nice ’ Fourier transform [ Bar93 , Mak96 ] , The supplementary material contains the extended version of this paper with ( more ) details , discussion , and proofs . 2 RELATED WORK . The study of universal approximation properties of NN has a long history , see e.g . [ Pin99 ] for a pre-millennium survey , and e.g . [ LSYZ20 ] for recent results and references . For ( anti ) symmetric NN such investigation has only recently begun [ ZKR+18 , WFE+19 , HLL+19 , SI19 ] . Functions on sets are necessarily invariant under permutation , since the order of set elements is irrelevant . For countable domain , [ ZKR+18 ] derive a general representation based on encoding domain elements as bits into the binary expansion of real numbers . They conjecture that the construction can be generalized to uncountable domains such as Rd , but it would have to involve pathological everywhere discontinuous functions [ WFE+19 ] . Functions on sets of fixed size n are equivalent to symmetric functions in n variables . [ ZKR+18 ] prove a symmetric version of Kolmogorov-Arnold ’ s superposition theorem [ Kol57 ] ( for d = 1 ) based on elementary symmetric polynomials und using Newton ’ s identities , also known as Girard-Newton or Newton-Girard formulae , which we will generalize to d > 1 . Another proof is provided based on homeomorphisms between vectors and ordered vectors , also with no obvious generalization to d > 1 . They do not consider AS functions . For symmetric functions and any d ≥ 1 , [ HLL+19 ] provide two proofs of the symmetric superposition theorem of [ ZKR+18 ] : Every symmetric function can be approximated by symmetric polynomials , symmetrized monomials can be represented as a permanents , and Ryser ’ s formula brings the representation into the desired polarized superposition form . The down-side is that computing permanents is NP complete , and exponentially many symmetrized monomials are needed to approximate f . The second proof discretizes the input space into a n · d-dimensional lattice and uses indicator functions for each grid cell . They then symmetrize the indicator functions , and approximate f by these piecewise constant symmetric indicator functions instead of polynomials , also using Ryser formula for the final representation . Super-exponentially many indicator functions are needed , but explicit error bounds are provided . The construction is discontinuous but they remark on how to make it continuous . Approximating AS f for d ≥ 1 is based on a similar lattice construction , but by summing super-exponentially many Vandermonde determinants , leading to a similar bound . We show that a single Vandermonde/Slater determinant suffices but without bound . Additionally for d = 1 we determine the loss in smoothness this construction suffers from . [ SI19 ] prove tighter but still exponential bounds if f is Lipschitz w.r.t . ` ∞ based on sorting which inevitably introduces irreparable discontinuities for d > 1 . The FermiNet [ PSMF20 ] is also based on EMLPs [ ZKR+18 ] but anti-symmetrizes not with Vandermonde determinants but with GSDs . It has shown remarkable practical performance for modelling the ground state of a variety of atoms and small molecules . To achieve good performance , a linear combination of GSDs has been used . We show that in principle a single GSD suffices , a sort of generalized Hartree-Fock approximation . This is contrast to the increasing number of conventional Slater determinants required for increasing accuracy . Our result implies ( with some caveats ) that the improved practical performance of multiple GSDs is due to a limited ( approximation and/or learning ) capacity of the EMLP , rather than a fundamental limit of the GSD . 3 ONE-DIMENSIONAL SYMMETRY . This section reviews various approaches to representing symmetric functions , and is the broadest review we are aware of . To ease discussion and notation , we consider d = 1 in this section . Most considerations generalize easily to d > 1 , some require significant effort , and others break . We discuss various “ naive ” representations ( linear , sampling ) and their ( dis ) advantages , before introducing the “ standard ” solution that can satisfy ( a ) - ( e ) . All representations consist of a finite set of fixed ( inner ) basis functions , which are linearly , algebraically , functionally , or otherwise combined . We then introduce symmetric polynomials , which can be used to prove the “ standard ” representation theorem for d = 1 . The extended version contains a broader and deeper review of alternative representations , including composition by inversion , generally invariant linear bases , symmetric functions by sorting , and linear bases for symmetric polynomials . Indeed it is the broadest review we are aware of , and unified and summarized as far as possible in one big table . The extended review may also help to better grasp the concepts introduced in this section , since it is less dense and contains some illustrating examples . Motivation . Consider n ∈ N one-dimensional particles with coordinates xi ∈ R for particle i = 1 , ... , n. In quantum mechanics the probability amplitude of the ground state can be described by a real-valued joint wave function χ ( x1 , ... , xn ) . Bosons φ have a totally symmetric wave function : φ ( x1 , ... , xn ) = φ ( xπ ( 1 ) , ... , xπ ( n ) ) for all permutations π ∈ Sn ⊂ { 1 : n } → { 1 : n } . Fermions ψ have totally Anti-Symmetric ( AS ) wave functions : ψ ( x1 , ... , xn ) = σ ( π ) ψ ( xπ ( 1 ) , ... , xπ ( n ) ) , where σ ( π ) = ±1 is the parity or sign of permutation π . Wave functions are continuous and almost everywhere differentiable , and often posses higher derivatives or are even analytic . Nothing in this work hinges on any special properties wave functions may possess or interpreting them as such , and the precise conditions required for our results to hold are stated in the theorems . We are interested in representing or approximating all and only such ( anti ) symmetric functions by neural networks . Abbreviate x ≡ ( x1 , ... , xn ) and let Sπ ( x ) : = ( xπ ( 1 ) , ... , xπ ( n ) ) be the permuted coordinates . There is an easy way to ( anti ) symmetrize any function , φ ( x ) = 1 n ! ∑ π∈Sn χ ( Sπ ( x ) ) , ψ ( x ) = 1 n ! ∑ π∈Sn σ ( π ) χ ( Sπ ( x ) ) ( 1 ) and any ( anti ) symmetric function can be represented in this form ( proof : use χ : = φ or χ : = ψ ) . If we train a NN χ : Rn → R to approximate some function f : Rn → R to accuracy ε > 0 , then φ ( ψ ) are ( anti ) symmetric approximations of f to accuracy ε > 0 too , provided f itself is ( anti ) symmetric . Instead of averaging , the minimum or maximum or median or many other compositions would also work , but the average has the advantage that smooth χ lead to smooth φ and ψ , and more general , preserves many desirable properties such as ( Lipschitz/absolute/ ... ) continuity , ( k-times ) differentiability , analyticity , etc . It possibly has all important desirable properties , but one : Time complexity , sampling , learning . The problem with this approach is that it has n ! terms , and evaluating χ super-exponentially often is intractable even for moderate n , especially if χ is a NN . There can also be no clever trick to linearly ( anti ) symmetrize arbitrary functions fast , intuitively since the sum pools n ! independent regions of χ . In the extended version we prove that computing φ and ψ are indeed NP-hard . There we also show that approximating ( 1 ) by sampling permutations is unsuitable , especially for ψ due to sign cancellations . Even if we could compute ( 1 ) fast , a NN would represent the function separately on all n ! regions , hence potentially requires n ! more training samples to learn from than an intrinsically ( anti ) symmetric NN . See the extended version for a more detailed discussion . Function composition and bases . Before delving into proving universality of the EMLP and the FermiNet , it is instructive to first review the general concepts of function composition and basis functions , since a NN essentially is a composition of basis functions . We want to represent/decompose functions as f ( x ) = g ( β ( x ) ) . In this work we are interested in symmetric β , where ultimately β will be represented by the first ( couple of ) layer ( s ) of an EMLP , and g by the second ( couple of ) layer ( s ) . Of particular interest is β ( x ) = n∑ i=1 η ( xi ) ( 2 ) for then β and hence f are obviously symmetric ( permutation invariant ) in x. Anti-symmetry is more difficult and will be dealt with later . Formally let f ∈ F ⊆ Rn → R be a function ( class ) we wish to represent or approximate . Let βb : Rn → R be basis functions for b = 1 , ... , m ∈ N ∪ { ∞ } , and β ≡ ( β1 , ... , βm ) : Rn → Rm be what we call basis vector ( function ) , and ηb : R → R a basis template , sometimes called inner function [ Act18 ] or polarized bass function . Let g ∈ G ⊆ Rm → R be a composition function ( class ) , sometimes called ‘ outer function ’ [ Act18 ] , which creates new functions from the basis functions . Let G ◦ β = { g ( β ( · ) ) : g ∈ G } be the class of representable functions , and G ◦ β its topological closure , i.e . the class of all approximable functions.± β is called a G-basis for F if F = G ◦ β or F = G ◦ β , depending on context . Interesting classes of compositions are linear Glin : = { g : g ( x ) = a0 + ∑m i=1 xi ; a0 , ai ∈ R } , algebraic Galg : = { multivariate polynomials } , functional Gfunc : = Rm → R , and Ck-functional Gkfunc : = Ck for k-times continuously differentiable functions . The extended version illustrates on some simple examples how larger composition classes G allow ( drastically ) smaller bases ( m ) to represent the same functions F . Algebraic basis for symmetric polynomials . It is well-known that the elementary symmetric polynomials eb ( x ) generated by n∏ i=1 ( 1 + λxi ) = : 1 + λe1 ( x ) + λ 2e2 ( x ) + ... + λ nen ( x ) ( 3 ) ±Functions may be defined on sub-spaces of Rk , function composition may not exists , and convergence can be w.r.t . different topologies . We will ignore these technicalities unless important for our results , but the reader may assume compact-open topology , which induces uniform convergence on compacta . are an algebraic basis of all symmetric polynomials . Explicit expressions are e1 ( x ) = ∑ i xi , and e2 ( x ) = ∑ i < j xixj , ... , and en ( x ) = x1 ... xn , and in general eb ( x ) = ∑ i1 < ... < ib xi1 ... xib . For given x , the polynomial in λ on the l.h.s . of ( 3 ) can be expanded to the r.h.s . in quadratic time or by FFT even in time O ( n log n ) , so the e ( x ) can be computed in time O ( n log n ) , but is not of the desired form ( 2 ) . Luckily Newton already solved this problem for us . Newton ’ s identities express the elementary symmetric polynomials e1 ( x ) , ... , en ( x ) as polynomials in pb ( x ) : = ∑n i=1 x b i , b = 1 , ... , n , hence also β ( x ) : = ( p1 ( x ) , ... , pn ( x ) ) is an algebraic basis for all symmetric polynomials , hence by closure for all continuous symmetric functions , and is of desired form ( 2 ) : Theorem 2 ( Symmetric polarized superposition [ ZKR+18 , WFE+19 , Thm.7 ] ) Every continuous symmetric function φ : Rn → R can be represented as φ ( x ) = g ( ∑ i η ( xi ) ) with η ( x ) = ( x , x2 , ... , xn ) and continuous g : Rn → R. [ ZKR+18 ] provide two proofs , one based on ‘ composition by inversion ’ , the other using symmetric polynomials and Newton ’ s identities . The non-trivial generalization to d > 1 is provided in Section 5 . Theorem 2 is a symmetric version of the infamous Kolmogorov-Arnold superposition theorem [ Kol57 ] , which solved Hilbert ’ s 13th problem . Its deep and obscure² constructions continue to fill whole PhD theses [ Liu15 , Act18 ] . It is quite remarkable that the symmetric version above is very natural and comparably easy to prove . For given x , the basis β ( x ) can be computed in time O ( n2 ) , so is actually slower to compute than e ( x ) . The elementary symmetric polynomials also have other advantages ( integral coefficients for integral polynomials , works for fields other than R , is numerically more stable , mimics 1,2,3 , ... particle interactions ) , so symmetric NN based on eb rather than pb may be worth pursuing . Note that we need at least m ≥ n functional bases for a continuous representation , so Theorem 2 is optimal in this sense [ WFE+19 ] . The extended version contains a discussion and a table with bases and properties .

Summary: This paper is about representing functions $\psi : (\mathbb{R}^d)^n \rightarrow \mathbb{R}$ that are symmetric or asymmetric with respect to the permutation group $S_n$.  The aim is to consider neural networks giving only functions that symmetric or asymmetric, and to establish universality results.  The motivation comes from applications such quantum physics or computer vision with permutation symmetries.