Characteristic Cohomology and Observables in Higher Spin Gravity

We give a complete classification of dynamical invariants in $3d$ and $4d$ Higher Spin Gravity models, with some comments on arbitrary $d$. These include holographic correlation functions, interaction vertices, on-shell actions, conserved currents, surface charges, and some others. Surprisingly, there are a good many conserved $p$-form currents with various $p$. The last fact, being in tension with `no nontrivial conserved currents in quantum gravity' and similar statements, gives an indication of hidden integrability of the models. Our results rely on a systematic computation of Hochschild, cyclic, and Chevalley--Eilenberg cohomology for the corresponding higher spin algebras. A new invariant in Chern-Simons theory with the Weyl algebra as gauge algebra is also presented.


Introduction
The idea of Higher Spin Gravities (HSGRA) is to construct viable models of Quantum Gravity by looking for extensions of classical gravity with massless higher spin fields. Conceptually, 'masslessness' is important for modelling the high energy behaviour of massive fields. Technically, it also plays a crucial role in constraining interactions by the gauge symmetries associated with massless spinning fields. An extension of gravity by higher spin states is one of the key features of string theory and it also seems to be unavoidable in AdS/CFT scenarios since any CFT d in d ≥ 3 has single-trace operators of any spin. Higher spin symmetry is supposed to leave no room for relevant counterterms and thus constructing a classical HSGRA is almost sufficient for having a quantum theory. However, there are many no-go-type results that prevent this simple scenario from happening, leaving us at present with only a handful of HSGRA's that avoid them.
As long as the dynamics of higher spin fields are supposed to be entirely fixed by the higher spin symmetry, many important questions can be approached from the symmetry point of view even before a complete theory is constructed (symmetry, if powerful enough, can even eliminate the need for a theory). In the present paper we classify invariant and covariant functionals of fields in 4d HSGRA, 3d HSGRA and with some remarks on HSGRA's in higher dimensions as well. The functionals are constructed to the lowest nontrivial order in fields. Various obstructions to extend them to higher orders are also given and discussed.
The holographic HSGRA's, we are interested in, are known to exhibit a certain degree of nonlocality [24][25][26] that goes beyond the usual field theory approach, but have a perfectly local closed subsector represented by the chiral theory in 4d. Indeed, free and weakly-coupled CFT's, like free and large-N critical vector models, do not have a large gap in the dimensions of single-trace operators. Therefore, the holographic duals face infinitely many fields from the onset and infinitely many derivatives starting from the quartic order [24]. This is not yet a concern for the paper since the observables we classify are consistent with the equations of motion to the lowest order, where such nonlocalities do not arise.
Of interest are either unintegrated observables that are strictly gauge-invariant or observables that are gauge-invariant up to an exact differential (hence, one can integrate the these latter over appropriate cycles to produce genuine gauge invariants). On-shell closed forms (conserved currents) represent another class of dynamical invariants. In fact the last two classes coincide [27]. As long as covariant, rather than just invariant, functionals go, cocycles with values in the higher spin algebra determine the interaction ambiguity in the higher spin equations themselves or represent possible deformations of extensions thereof with higher-degree forms, see e.g. [28,29]. They can also be contracted with global symmetry parameters to give conserved p-form currents. All these possibilities are studied in detail. The spectrum of p-form currents indicates that HSGRA's can give examples of higher form symmetries [30].
What is surprising is that there exist a great many higher spin invariant and covariant functionals, as will be seen from our classification. This should be confronted with the lower spin gauge theories, e.g. Yang-Mills theory or Gravity, and more generally, with the Weinberg-Witten theorem [31]. This also contradicts a naive expectation that a bigger symmetry should be more restrictive. As different from [32], where the first systematic attempt to approach the problem of observables in Higher Spin Gravities was undertaken, we ignore all global aspects of the problem; instead, we give a complete classification of local invariants. For an alternative approach to the construction of invariant functionals in HSGRA and closely related results we refer to [33].
More technically, with some mathematical tricks, the problem of classification of covariant and invariant functionals can be reduced to that of computing Chevalley-Eilenberg cohomology. The latter can further be related to the cyclic and, eventually, to the Hochschild cohomology of a given higher spin algebra: The relationship owes its existence to a very special form of the Lie algebra associated to a given (associative) higher spin algebra. It is the Lie algebra of big matrices with elements belonging to the higher spin algebra. The matrix extension of higher spin symmetries is well-motivated by the AdS/CFT correspondence: one can always add global symmetries to the free (and critical) vector models, i.e., to the CFT duals of HSGRA's.
The free higher spin fields on a maximally-symmetric backgrounds can be described by a simple system of equations for a one-form ω and a zero-form C both taking values in a higher spin algebra [34], upon neglecting the higher-order corrections in C. Here, ⋆ is the product in a properly extended higher spin algebra. As is seen, the zeroth-order approximation is given by a flat connection ω associated with a higher spin algebra. The free fields are then described by a covariantly constant zero-form C.
Therefore, the problem we solve is to classify all nontrivial multi-linear forms J(ω, . . . , ω m , C, . . . , C n ) (1.2) of ω and C that are on-shell closed or gauge-invariant up to an exact differential. A part of our results on 4d HSGRA can be summarized by the following table with derivation and explicit expressions left to the main text.  Table 1: Observables in 4d HSGRA to the lowest order (both in the physical and unphysical sectors). The number in each cell is the number of independent observables that are of ω m C n -type. The table extends trivially in both directions; here, we kept a part that shows some irregularity (for higher m and n everything stabilizes). The multiplicities along the diagonal m + n = const add up to 2, 1, 6,3,8,4,8,4, . . ..
We also make some comments on HSGRA's in d > 4 and in 3d, even though the latter are somewhat special in not having propagating degrees of freedom in the higher spin sector. One interesting finding in 3d is a new invariant of Chern-Simons theory that is based on the Weyl algebra. This type of invariant does not exist for SU(N), for example.
The outline of the paper is as follows. We begin in Section 2 with the concept of formal equations of motion that any field-theoretic system can be fit in. In Section 3, we briefly discuss the problem of HSGRA in this language. In Section 4, we present and discuss our classification results, the mathematical details being left to the Appendices A, B.

FDA approach to classical field theory
In this paper, we will study field theories formulated in terms of Free Differential Algebras. These algebras became popular after the seminal paper by D. Sullivan [35]; in physics, they were introduced in [36,37]. Closely related topics include Q-manifolds, L ∞ -algebras and AKSZ-models [38].

FDA, L ∞ , Q-manifolds and all that
Recall that a Differential Graded Algebra (A, δ) is a graded k-vector space A = A n endowed with an associative (dot) product and a differential δ such that δA n ⊂ A n+1 , and δ 2 = 0 . (2.1) The two operations are related by the Leibniz rule δ(a · b) = δa · b + (−1) |a| a · δb , (2.2) where |a| = n stands for the degree of a homogeneous element a ∈ A n . The cohomology of δ is denoted by H(A, δ) = H p (A, δ).
Below we are interested in DGA's that are free, commutative, and non-negatively graded. This implies the existence of a finite (or countable) set of generators w A ∈ A obeying no relations other than graded commutativity: 3) The general element of A is given then by a polynomial a(w) in w's. In physics, the DGA's of this type are usually called Free Differential Algebras (FDA). Given a set of free generators, the structure of FDA is completely determined by the differentials of its generators The r.h.s. of these relations can further be expanded into homogeneous polynomials as for some structure constants l A A 1 ···An . By definition, a FDA (A, δ) is called linear if Q A k = 0 for all k > 1. If in addition H(A, δ) ≃ H 0 (A, δ) ≃ k, then the algebra is said to be linear contractible. An algebra (A, δ) is called minimal if Q A 1 = 0.
The main theorem on the structure of FDA's states that each algebra is decomposed into the product A = A lc ⊗ A min of a linear contractible algebra A lc and a minimal algebra A min , see e.g. [39,Sec. 4.5.1]. This implies the existence of a generating set w A = (u α , v α ,w a ) such that δu α = v α , δv α = 0 , δw a = Q a 2 (w) + Q a 3 (w) + · · · . (2.6) Here u's and v's generate the linear contractible part A lc , whilew's are generators for A min .
The nilpotency condition δ 2 = 0 for the differential imposes a sequence of quadratic relations on the structure constants l's. These read n+m=k l C (A 1 ···An l B CB 1 ···Bm) = 0 , k = 1, 2, . . . , (2.7) where the round brackets stand for the (graded) symmetrization of the indices enclosed.
The concept of L ∞ -algebras (aka strongly homotopy Lie algebras) delivers an alternative interpretation of these relations as generalized Jacobi identities for a system of multi-brackets [40]. The multi-brackets are naturally defined on the graded vector space V = A * [1], that is, the space dual to A and with the degree of homogeneous subspaces shifted by one. 1 In terms of the dual basis e A ∈ V , |e A | = |w A | + 1, the structure of an L ∞ -algebra on V is given by the sequence of multi-brackets [e A 1 , . . . , e A k ] k = l A A 1 ···A k e A , k = 1, 2, . . . . (2.8) It follows from the first identity in (2.7) that the unary bracket [−] 1 defines a differential d : V n → V n+1 making V into a cochain complex. Then, the second identity (k = 2) tells us that d differentiates the binary bracket [−, −] 2 by the Leibniz rule. For minimal algebras the unary bracket is absent and the first nontrivial relation in (2.7) identifies [−, −] 2 as a graded Lie bracket with the structure constants l A BC . Hence, with each minimal FDA one can associate a graded Lie algebra 2 L = L(A) on the dual vector space V . This graded Lie algebra is the starting point for and the most crucial part of the entire L ∞ -algebra structure dual to (A, δ). In particular, the next ternary bracket [−, −, −] 3 appears to be nothing else but a 3-cocycle of the Chevalley-Eilenberg cohomology of the graded Lie algebra L with coefficients in the adjoint representation. We will return to this point in Sec. 2

.4.
There is also a nice geometric approach to the algebraic structures above. It treats the FDA (A, δ) as the algebra of smooth functions on a graded manifold N 'coordinatized' by 1 Upon the shift the even subspaces go odd and vice versa; hence, symmetrization in (2.7) becomes anti-symmetrization from the viewpoint of V .
2 By a graded Lie algebra we mean that the bracket is graded antisymmetric and not just the fact that the underlying space is graded. More pedantic would be a "graded Lie superalgebra". the generators w A ∈ A. Upon this interpretation the differential δ gives rise to an odd vector field Q on N, whose coordinate expression is as follows: (2.9) Then the whole set of Jacobi identities (2.7) is compactly encoded by a single equation [Q, Q] = 2Q 2 = 0. In mathematics, such an odd vector field Q is called homological and a pair (N, Q) is referred to as a Q-manifold [41], [38]. The terminology is justified by the fact that the cohomology of the operator (2.9) acting in the space of smooth functions C ∞ (N) = A coincides with the cohomology of the initial FDA (A, δ).

Formal Dynamical Systems
In order to formulate a field theory on a space-time manifold M with local coordinates x µ one introduces the total space of the 'shifted' tangent bundle T [1]M, i.e., the tangent bundle of M with tangent space coordinates θ µ assigned degree 1. The algebra C ∞ (U) of 'smooth functions' on a trivializing coordinate chart U ⊂ T [1]M is then a linear contractible FDA with the generators (x µ , θ µ ) and the differential This FDA is clearly isomorphic to the algebra of exterior differential forms on U ∩ M upon the identification Geometrically, one can regard d = θ µ ∂ ∂x µ as a canonical homolological vector field on T [1]M that mimics the de Rham differential.
Let N be another Q-manifold with coordinates w A and a homological vector field Q. Given a triple (M, N, Q), we define classical fields to be smooth maps of degree zero from the source Q-manifold T [1]M to the target Q-manifold N. The true field configurations (=maps) are, by definition, those relating the homological vector field on T [1]M to that on N; in symbols W * (d) = Q. In terms of local coordinates the last condition amounts to the differential equations where the functions w A = W A (x, θ) provide the coordinate description of the map (2.12).
With identification (2.11) the l.h.s. of (2.13) is given by the de Rham differential of the form fields W A , while the r.h.s. involves their exterior products. It is known that any system of PDE's can be reformulated in the form (2.13), perhaps, at the expense of introducing an infinite collection of the forms W A , see e.g. [42]. Numerous examples of the field equations (2.13) are provided by the AKSZ-models [38]. In the context of HSGRA, bringing field's dynamics into the form (2.13) is known as an unfolded representation [34,43].
Besides apparent general covariance the system (2.13) enjoys the gauge symmetry of the form ε A being infinitesimal gauge parameters (the forms of appropriate degrees). Applying the de Rham differential to both sides of (2.13) one can also see that the system is formally consistent whenever Q 2 = 0.
It follows from the decomposition theorem (2.6) that the contractible pairs of fields associated with the generators of A lc completely decouple from the system (2.13). Moreover, the subsystem dU α = V α , dV α = 0 appears to be tautological, and hence, dynamically empty: the first equation just introduces the fields V α as names for the differentials dU α and the second equation trivially follows from the first. Therefore, without loss in generality, one may always assume the FDA underlying the field equations (2.13) to be minimal, in which case A word of caution is needed about these equations: Even though any PDE can be brought into the form (2.15), only specific infinite-dimensional FDA's and only very particular choices of coordinates therein lead to well-defined differential equations. In practice, most of the fields W A appear to be auxiliary, being expressible via derivatives of a small (or even finite) subset of dynamical fields. If the number of auxiliary fields is infinite, they can encode an infinite number of derivatives. As a result, the effective dynamics may happen to be far from those described by genuine PDE's. In this paper, we leave aside all subtle analytical issues related to the field equations (2.15) focusing upon their formal consistency.

Q-cohomology vs characteristic cohomology
Suppose we are given a collection of fields φ i living on a space-time manifold M and obeying a set of PDE's T a (φ, ∂ µ φ, ...) = 0 . (2.16) Apart from the equations of motion in themselves, there are many other quantities of interest (like actions, Lagrangians, conserved currents, surface charges, Wilson's lines etc.) that can be attributed to a given field-theoretic system. All these quantities are defined in terms of differential forms that look like Here the coefficients of a p-form J on M are assumed to be smooth functions of the spacetime coordinates x µ , the fields φ i and a finite number of their derivatives. On integrating the form J over a p-cycle Σ ⊂ M one gets a local functional of fields of the form intensively studied in mathematics under the name of characteristic cohomology [44], [45], [46,Sec. 6.2].
In the presence of gauge symmetries the above definition of an observable should be modified a little. To justify its name the functional (2.18) must be invariant under the gauge transformations δ ε φ i of fields and this implies that for some (p − 1)-current I that depends linearly on the gauge parameters ε α . Then δ ε O Σ = 0 for any cycle Σ. Notice that all conserved currents are automatically gauge invariant in the sense of (2.22). Indeed, by definition, δ ε T a ≈ 0 and dδ ε = δ ε d; whence it follows that For a more systematic discussion of currents and observables in (non-)Lagrangian gauge theories we refer the reader to [46], [47].
When dealing with formal dynamical systems (2.13) it seems natural to start with currents and observables associated with certain elements of the underlying FDA (A, δ). To any element j(w) ∈ A p or, what is the same, homogeneous function on the Q-manifold N, we can assign the p-current J = j • W : (2.24) As distinguished from the general expression (2.17) these currents do not involve the partial derivatives of the fields W A and for this reason one may call them algebraic. Checking the gauge invariance (2.14), we find (by abuse of notation we omit the wedge product sign). The current J is seen to be gauge invariant iff the last term vanishes. The forms ε A being arbitrary, this means QJ = const.
Since |QJ| > 0 and there are no constants of positive degree, we are lead to conclude that QJ = 0. In other words, the current J is gauge invariant 4 iff the corresponding function j(w) on N is Q-invariant. On the other hand, for any algebraic current I dI ≈ QI , (2.26) and hence, all Q-invariant conserved currents of the form J = QI are trivial and any gauge invariant current J is conserved. Let us summarize the above considerations as follows: • the equivalence classes of gauge invariant p-currents of the form (2.24) are in one-to-one correspondence with the elements of the cohomology group H p (A, δ); • all gauge-invariant algebraic currents are conserved and all conserved currents are gauge invariant.
Thus, the gauge invariant currents (2.17) constitute a part of characteristic cohomology. The characteristic cohomology of the PDE's of the form (2.13) was studied in [27]. In that paper, the authors argue that, under mild assumptions, each gauge invariant current is equivalent to an algebraic one. This reduces the study of characteristic cohomology and observables to a pure algebraic problem of computing the cohomology groups H(A, δ).

Homological perturbation theory in action
Generally computation of cohomology groups H(A, δ) is a rather nontrivial problem for infinite-dimensional algebras. What alleviates the problem significantly for FDA's is the use of the natural filtration on A by the polynomial degree of its elements. At this point it is convenient to switch to the dual picture considering A as the algebra of functions on some Q-manifold N. The homological vector field associated to a minimal FDA decomposes then into the sum Q = Q 2 + Q 3 + · · · of homogeneous components (2.9) and the same decomposition for the equation Q 2 = 0 yields the sequence of relations . . , (2.27) which are perfectly equivalent to the generalized Jacobi identities (2.7) for the L ∞ -algebra (2.8). As we have mentioned earlier, the leading term Q 2 = w A w B l C AB ∂/∂w C is a homological vector field by itself, the expansion coefficients l C AB being the structure constants of some graded Lie algebra L. Then the action of Q 2 on C ∞ (N) models the Chevalley-Eilenberg complex computing the cohomology of the graded Lie algebra L with trivial coefficients. This action extends naturally from scalar functions to arbitrary tensor fields on N through the operation of Lie derivative L Q 2 . The corresponding complex of tensor fields splits into the direct sum T = T p,q of various subcomplexes composed of (q, p)-type tensors. Moreover, all natural tensor operations (the tensor product, contraction and permutation of indices, commutator of vector fields, etc.) pass through the cohomology, so that we may speak of the tensor algebra of Q 2 -cohomology H(L, T ). The scalar functions on N give rise to a graded commutative subalgebra H(L, T 0,0 ) that we are most interested in.
Second in importance is the Q 2 -cohomology with coefficients in vector fields on N. The space H(L, T 1,0 ) carries the natural structure of a graded Lie algebra, induced by the commu-tator of vector fields, along with the structure of H(L, T 0,0 )-module, cf. Appendix A.4.3. Notice that Eqs. (2.27) hold true if one rescales the homogeneous components as Q n → g n−2 Q n , g being an arbitrary parameter. This results in a family of homological vector fields Q(g), which can be viewed as a one-parameter deformation of the quadratic vector field Q 2 = Q(0). In particular, the first-order deformation is determined by a vector field Q 3 that must be a Q 2 -cocycle as suggested by Eq. (2.27). If this cocycle happens to be trivial, i.e., Q 3 = [Q 2 , X], then one can 'gauge it out' by the formal diffeomorphism e gX : N → N. Thus, all the nontrivial first-order deformations are in one-to-one correspondence with the degree-1 elements of the cohomology group H 3 (L, T 1,0 ). 5 To study higher-order deformations it is convenient to rewrite Eqs. (2.27) in the following form: [Q m , Q n−m+2 ] , n = 3, 4, . . . .

(2.28)
These equations can be handled effectively by the 'step-by-step obstruction' method of homological perturbation theory [46,Sec.7], [48]. Proceeding by induction on n, one can see that the vector field ∆ n is a Q 2 -cocycle provided all previous equations for Q 3 , . . . , Q n−1 are satisfied. The existence of the n-th order deformation Q n amounts then to the triviality of the cocycle ∆ n . This allows one to interpret the degree-2 elements of the cohomology groups H n (L, T 1,0 ), n > 2, as potential obstructions to deformation of Q 2 . If all these groups are happen to be trivial, then each first-order deformation Q 3 extends to all higher orders giving a family Q(g).
In the context of formal dynamical systems of Sec. 2.2, one may regard the deformation procedure above as inclusion of a consistent interaction, with g playing the role of a coupling constant. The three-and four-dimensional HSGRA's that we discuss in Sec. 4 provide major examples of such interactions.
A similar perturbative analysis applies to the cohomology groups H(δ, A) associated with the algebraic conserved currents (2.24). Writing j = j k + j k+1 + · · · for a j ∈ A, we find that the function j is Q-invariant if Again, the r.h.s. of the n-th equation is a Q 2 -cocycle providing all previous equations are satisfied. The triviality of this cocycle ensures the existence of a function j n obeying (2.29). 5 It is conceivable that all Q 3 , . . . , Q k−1 vanish and the deformation starts in effect with the k-th order.
Then the leading term Q k defines and is defined by an element of H k (L, T 1,0 ). Formal deformations with k > 3 are called on occasion irregular.
The sequence (2.29) starts with the equation L Q 2 j k = 0 identifying the leading term j k as a Q 2 -cocycle. This may be assumed nontrivial: otherwise one could remove it by the equivalence transformation j → j − δf with j k = Q 2 f , so that Taylor's expansion for j would start actually with j k+1 . In homological algebra, such a perturbative approach to computation of Q-cohomology is known as a spectral sequence technique [49, Ch. XI].
All in all, much of the structure of a minimal FDA (A, δ) as well as its cohomology groups are controlled by the cohomology of the associated Lie algebra L(A).

Basics of Higher Spin Gravity
We setup the problem of Higher Spin Gravity in the language of formal equations of motion (2.13), as was first suggested in [34]. An immediate benefit is that we can capture relevant algebraic structures that are hard to see, if at all, within any standard perturbative approach like Noether procedure. A drawback is that there is a long way to any such standard field theory approach. For instance, the problem of extracting proper interaction vertices appears to be highly nontrivial and may require further structures that are not yet fully understood. Fortunately, the problem starts to be effective at the second order and does not affect any result of the present paper.
According to [34] the formal equations of motion for a HSGRA are formulated in terms of a one-form field ω and a zero-form field C, both taking values in a higher spin algebra hs, i.e., W A = (ω, C). At this point, hs may be any associative algebra. By the form-degree counting the equations should have the following general form: Here, ⋆ combines the wedge product of forms with the associative product in hs and π is a certain automorphism of hs. 6 Thus, the bilinear vertices are completely determined by the pair (hs, π), which is a starting point for the deformation problem. As was explained in the previous section, a formal consistency of the field equations (3.1) implies the r.h.s. to be given by some homological vector field Q = (Q ω , Q C ) on the target space of fields (ω, C). A central problem of formal HSGRA is to construct interaction vertices V k for a given (hs, π) respecting formal consistency.
We refer to [43,60,61] for clarifications on the general structure of Eqs. (3.1). Let us make just a few AdS d+1 /CFT d -inspired comments that hopefully explain the origin of the basic ingredients.
The first and foremost fact about general HSGRA's is that the graded Lie algebra L governing the quadratic part of equations (3.1) always comes from an associative algebra hs of infinite dimension in d ≥ 3. The easiest way to perceive this fact is through the perspective of AdS/CFT correspondence. All HSGRA's are thought to be holographically dual to free CFT's [19-22, 62, 63] for an appropriate choice of boundary conditions. The simplest of such CFT's are free vector models, i.e., free fields valued in vector representations of some weakly-gauged symmetry group. 7 Free CFT's, e.g. free scalar theory φ = 0, always feature an infinite-dimensional algebra of symmetries. Here, by symmetries we understand [64] just differential operators S = S(x, ∂) that map any solution to a solution again. 8 In particular, the generators of conformal symmetries so(d, 2) are realized by S that are operators of the first order at most. The composition of differential operators endows the symmetries with the structure of an associative algebra. Moreover, the symmetry algebra most likely to be infinite-dimensional. Indeed, each symmetry operator S gives rise to an infinite sequence of higher-order symmetries S n , most of which may happen to be nontrivial. In this respect linear theories differ greatly from nonlinear ones: in the latter case, the symmetries form a 'weaker' structure of a Lie algebra, which is normally finite-dimensional.
The same symmetries can also be understood as the usual Noether symmetries associated with conserved tensors of schematic form 9 (3.2) From the AdS/CFT point of view J i 1 ···is , together with the degenerate member of this family J = φ 2 , are single-trace operators. According to the standard AdS/CFT lore, they should be 7 An ambiguity in the choice of boundary conditions for fields in AdS d+1 -Neumann vs. Dirichlet -allows for more interesting dualities, e.g. the large-N critical vector models [20,21]. 8 This is equivalent to ES = S ′ E, where E is the l.h.s. of the equations of motion (E = in the example above) and S ′ is some other operator that pops up when S is pushed through the equations of motion. Indeed, ESφ = S ′ Eφ = 0 whenever Eφ = 0. Two symmetries S 1 and S 2 are equivalent if S 1 = S 2 + RE for some differential operator R. The symmetries of the form RE annihilate any solution and for this reason they are called trivial. 9 In the AdS/CFT context one needs to take φ to be vectors of some global symmetry group, e.g. O(N ) or U (N ), and take N large. We will ignore this additional complication in a heuristic explanation below.
dual to the fields of the AdS/CFT-dual gravitational theory. Since the tensors are conserved, the fields have to be gauge fields, and hence, massless.
As with any associative algebra, we may consider the Lie algebra L(hs) generated by commutators in hs. In the AdS/CFT context, this Lie algebra always contains the conformal algebra so(d, 2) as a finite-dimensional subalgebra. The existence of an associative structure on symmetries allows one to define the higher spin algebra as the quotient of the universal enveloping algebra of so(d, 2) by a certain two-sided ideal [64]. Denoting the universal enveloping by U, we can write hs = U/J . The ideal J , called the Joseph ideal, is known to be primitive, meaning the existence of a representation ρ : U → End(V ) such that ker ρ = J . The representation ρ is given by a Verma module V = span{|φ } for the Lie algebra so(d, 2). The corresponding lowest weight vector |∆, s is specified by a conformal weight ∆ -the eigenvalue of the dilatation operator D -and the weight s = (s 1 , . . . , s [d/2] ) of the Lorentz subalgebra so(d−1, 1) generated by L ij . By definition, |∆, s is annihilated by the conformal boosts K i , so that each vector |φ ∈ V is obtained from |∆, s by applying translations P i . 10 For the free scalar CFT above, ∆ = (d − 2)/2 and s = 0, i.e., L ij |∆, 0 = 0.
The higher spin algebra hs associated with the Verma module V is just the algebra of all (local) operators ρ(U) that act on V . In particular, the conformal algebra generators belong to hs. As usual, we can represent (some of) operators from End(V ) in the form |φ φ ′ | ∈ V ⊗ V * . The single-trace operators, being bilinear in φ, belong to the tensor product V ⊗ V = span{|φ |φ ′ }. Normalizable on-shell bulk fields form, basically, the same representations as the currents (3.2). 11 Since the higher spin symmetry hs is a global symmetry on the CFT side, it has to be gauged in the bulk. To this end, one should begin with a one-form connection ω taking values in hs, that is, in End(V ). The flatness condition (3.1a) describes then the maximally symmetric backgrounds with hs symmetry. The bulk degrees of freedom can be described by taking a zero-form C with values in V ⊗ V and requiring it to be covariantly constant w.r.t. ω, as in (3.1b). One small tweak in (3.1b) is that the hs-modules V ⊗V , V ⊗V * , and End(V ) are formally isomorphic to each other. 12 Therefore, one can choose C to assume values in the algebra hs itself and account for the difference between |φ and φ| with the help of a certain automorphism π. In the conformal basis, π is related to the inversion: π(D) = −D, π(K i ) = P i , π(P i ) = K i , and π(L ij ) = L ij . In the AdS d+1 setup π acts as π(P A ) = −P A , 10 Let T AB = −T BA the standard basis for so(d, 2), A, B = 0, . . . , d + 1. In the conformal basis, we split the indices as A = i, +, − and use the light-cone form of the metric: 11 See e.g. [65,66] for a careful treatment of the real forms and basis adapted to the so(d, 2) representation theory at the boundary and in the bulk. 12 Of course, care is required in dealing with such tensor products, see e.g. [66,67] for some subtleties.
π(L AB ) = L AB , [34,43,60]. 13 Though not rigorous enough, the above consideration should hopefully explain, at least heuristically, why both ω and C are needed, why either takes values in hs, and what is the role of the automorphism π in (3.1b). Now, the problem is to look for nonlinear deformations of (3.1) and to relate them with hs and π.
We note that one can construct certain higher-spin Lie (super)algebras with the help of (anti-)automorphisms, see e.g. [68]. These algebras are genuine Lie (super)algebras, where the Lie bracket does not result from the commutator in an associative algebra. Nevertheless, they are still obtained as truncations of certain associative algebras. In these cases, the relation is similar to that between gl N and o(N), the latter resulting from truncation τ (a) = −a of the former, where τ (a) = a T is an anti-automorphism. Therefore, one always begins with an associative algebra hs. At the end, possible truncations of the nonlinear equations (3.1) can be studied, if needed.
In accordance with Sec. 2.4 all relevant quantities, e.g. vertices and invariants, should correspond to the Chevalley-Eilenberg cohomology of the Lie algebra associated with the higher spin algebra. Nevertheless, the fact that the Lie algebra comes from an associative algebra is very helpful in computing the cohomology of the former.
As a side remark, let us mention that the problem of completing (3.1) with interaction vertices makes sense for any associative algebra, with π being e.g. the identity automorphism. This leads to a new class of integrable models as the classical equations of motion (3.1) can be solved explicitly via an auxiliary Lax pair [51].

Higher Spin Cohomology
Let us explain in a few words, avoiding technical details, how the problem of classifying all relevant deformations and observables can be approached. The initial data are given by a higher spin algebra hs, which is always an associative algebra, and by an automorphism π. 13 In order to relate the two basis we choose η AB = (−, +, · · · , +, −). In the AdS d+1 basis we split A as These data allow us to write down the free equations of motion 14 Now, suppose we are interested in deformations of this free system or in the conserved currents that are d-closed on-shell to the leading order. For example, we can be looking for an algebraic current J(ω, . . . , ω, C, . . . , C) ∈ C , (3.4) or for an interaction vertex V(ω, ω, C, . . . , C) ∈ hs (3.5) that can deform the r.h.s. of the first equation in (3.3). In either case, we see that (i) the free equations take advantage of the associated Lie algebra L(hs); (ii) the second equation in (3.3) suggests that the field C takes values in the π-twisted adjoint representation hs π of L(hs). Therefore, we face quite a difficult problem of computing Chevalley-Eilenberg cohomology of L(hs) with nontrivial coefficients. One may think of multi-linear functions of C as functions with values in the symmetric tensor product S(hs * π ) of the module hs * π that is conjugate to hs π . We will reduce the problem to a much simpler one in a few steps: • Firstly, we would like to consider the matrix extension of the higher spin algebra Mat n (hs) = hs⊗Mat n , i.e., n×n-matrices with entries in hs. The associated Lie algebra gl n (hs) ≡ L(Mat n (hs)) is much more handy: for n big enough the Chevalley-Eilenberg cohomology of gl n (hs) can be effectively reduced to the Hochschild cohomology of hs, see Appendix A.7. Apart from being just a simplifying assumption, the matrix extension is well-motivated by the AdS/CFT correspondence. Indeed, with appropriate boundary conditions each HSGRA is dual to a certain free CFT and in a free CFT there is always an option to add global symmetries. 15 14 It is worth stressing, and this is one of the crucial advantages of our approach, that the equations are not free in the usual sense. They describe propagation of free fields C in the background given by a flat connection ω of a higher spin algebra. In the simplest case when only the spin-two subsector of ω is turned on, the equations reduce to the usual Bargmann-Wigner type equations on the Maxwell tensor, Weyl tensor, and higher spin generalizations thereof (usually called higher-spin Weyl tensors) as well as to the Klein-Gordon equation for the scalar field. A generic flat ω describes a collection of topological background Fronsdal fields and 'free' equations (3.3) result in equations for the Maxwell-, Weyl-tensors and the scalar field that are highly nonlinear in the background fields. Probing different backgrounds is a useful way to probe interactions. Eqs. (3.3) probe the maximally-symmetric backgrounds, of which AdS d+1 is the simplest case. Within the Noether procedure the higher spin algebra becomes visible at the quartic level only, [69]. 15 For example, one can take the U (N )-vector model with free complex conjugate fieldsφ i and φ i . In the simplest case the higher spin fields are dual to the conserved currents J s =φ i ∂ s φ i . The bulk coupling • Secondly, we absorb π by extending the higher spin algebra to the smash product algebra A = hs ⋊ Z 2 , where the cyclic group Z 2 is generated by κ and imitates the action of the involutive automorphism π: κf κ = π(f ), κ 2 = 1. The multiplication in A is given by formula (B.10). Upon such an extension π becomes an inner automorphism of A. The fields are, however, doubled The free equations (3.3) can be rewritten as without any mentioning of π. The problem of completing (3.1) with vertices is now reduced to a more concise problem of completing (no π in the second equation). Once we solve any higher spin problem for A, we get the sought for solution for hs by setting ω ′ = 0 and K = 0. As we discuss below, K from (3.6) can also be useful sometimes.
• Finally, we need to take into account that (3.7) comprises two fields, ω and C. As was discussed at length in Sec. 2, the quadratic vertices of any formal dynamical system (2.15) define and are defined by a graded Lie algebra L. It is easy to see that the graded Lie algebra at hand can be modelled by taking the tensor product of A with the Grassmann algebra Λ on one generator, Λ = C[θ], θ 2 = 0. This allows us to combine the fields ω and C into a single 'superfield' Φ = ω + θC subject to the equation The superfield Φ being odd, the star-product reduces in fact to the commutators of component fields inducing thus the graded Lie algebra structure L.
We may now summarize that the majority of HSGRA problems boil down to computing the Chevalley-Eilenberg cohomology of the graded Lie algebra L = gl n (A ⊗ Λ), where A = hs⋊Z 2 . The matrix extension allows one to reduce the complicated Chevalley-Eilenberg problem to a much simpler problem of Hochschild cohomology; the details are left to Appendices A, B. The following general arguments will be used repeatedly below: • Given that the form-degree should not exceed the space-time dimension, it is important to decompose the cohomology groups H(L, T ) into representatives ω m C n that have a definite degree in C and ω.
• If a relevant structure corresponds to a cohomology class of H(L, T ) in form-degree p, then the same cohomology group in degree p + 1 contains possible obstructions to extending this structure to higher orders in deformation. Depending on the situation the same cohomology class can give either a nontrivial (p+1)-current or an obstruction to the deformation of some other p-current.
• As we compute the cohomology of the extended higher spin algebra, A = hs⋊Z 2 , there is an extra information that may be helpful. Both ω and C consist of the physical and unphysical parts (3.6). Upon setting ω ′ = 0, so that ω = ω, we see that the second equation in (3.7) reduces to 16 C appears as expected and K takes values in the adjoint representation of L(hs). Therefore, K corresponds to a global symmetry parameter in the ω-background. 17 First of all, it is important to see if a given cocycle survives upon projecting onto the physical sector: ω ′ = 0 and K = 0. If it does so, we have a physically relevant p-form current. If it does not, then setting ω ′ = 0 to zero, all but one C to C, and the remaining one to K gives a nonvanishing form of the type J(ω, . . . , ω, C, . . . , C, K) .
This can be interpreted as a collection of conserved p-currents parameterized by a global symmetry parameter K. One can also project several C's onto K's, which gives 16 So far we have not been able to take advantage of one-forms ω ′ in the twisted-adjoint representation.
They do not seem to have any physical interpretation. 17 Indeed, suppose we have a flat connection ω (maximally-symmetric background). Global symmetries are the gauge transformations that leave ω invariant, δ ξ ω = 0. This leads to the equation dξ = ω ⋆ ξ − ξ ⋆ ω, which is identical to the second equation in (3.10).
a conserved p-current that depends on a global symmetry with values in the tensor product of several adjoint representations of the higher spin algebra. 18 • Instead of scalar p-form currents one may be interested in the Chevalley-Eilenberg cocycles with values in a given higher spin algebra. They correspond either to possible deformations of the free equations or to introducing higher-degree forms with values in the higher spin algebra and adding some sources there, see e.g. [29,70]. In order to get such cocycles, one can simply remove one C factor from the scalar ones, i.e., by representing them as Tr(f (ω, . . . , C) ⋆ C). This agrees, of course, with the honest computation of cohomology in the present paper.
Supersymmetric extensions of the bosonic 4d HSGRA can also be of some interest, see [19,71] for discussion. In practice, these are obtained [71] by appending hs with the generators of the Clifford algebra. This is equivalent to taking the tensor product with an additional matrix factor, which does not change the cohomology. Therefore, all the results on the higher spin cohomology below apply to various supersymmetric extensions as well.

Algebraic structure of interactions
The general solution of the problem on how to construct the interaction vertices in (3.1) was given in [51]. Let us recall a few details from that work as we are going to discuss not only the observables of the free theory, but also possible obstructions to their deformation by interaction.
The problem of constructing the vertices V n in (3.8) can be solved whenever the algebra A which determines the bilinear terms in (3.8) admits a nontrivial deformation as an associative algebra. This means that there exists a one-parameter family of associative algebras with the product u being a formal deformation parameter. As usual associativity requires the first-order deformation φ 1 to be a Hochschild two-cocycle. According to the general definition (A.2) it obeys Given the φ k 's, one can write down immediately all the vertices. For example, and Of course, the vertices are determined up to an isomorphism of the corresponding L ∞ -algebra (or FDA), which corresponds to field redefinitions in the field theory language or to a change of coordinates in the language of Q-manifolds.
Eq. (3.13) and φ 1 is the simplest example of the higher spin cohomology and the size of the cohomology group has a clear physical meaning: 19 It is worth stressing that the deformation of equations (3.8), i.e., the condition for V 3 , leads to a more complicated Chevalley-Eilenberg problem for the Lie algebra L = gl n (A ⊗ Λ). Under the assumptions discussed briefly above and in more detail in Appendices A, B, this problem can be reduced to a much simpler problem of Hochschild cohomology. Therefore, in many instances we expect that the higher spin cohomology is obtained from the Hochschild cohomology HH • (A, A) in the sense that the knowledge of HH • (A, A) and applying the standard cohomological operations allows one to reconstruct H • (L, T ).
This means that the number of independent deformations of the star-product on A is equal to the number of independent coupling constants in the HSGRA that gauges A. 20 On the dual CFT side the same number is equal to the number of marginal deformations plus one. Indeed, one coupling constant in the bulk just counts the degree in C and it is proportional to 1/ √ N on the CFT side. The rest of the couplings should parameterize the space of CFT's, i.e., the marginal deformations (at least in the large-N limit).
In general dim HH 2 (A, A) = 1, so that there is a single bulk coupling constant of order 1/ √ N. An interesting example with dim HH 2 (A, A) = 2 is provided by Chern-Simons Matter theories that feature one more coupling constant -the Chern-Simons level k -and 19 The superscript n in H n (L, T 1,0 ) denotes the number of arguments that representative cocycles have.
The deformation of (3.8) has to be cubic, therefore n = 3. We can prove, under the assumptions above, that this cohomology is equivalent to the second Hochschild cohomology of A, that is, HH 2 (A, A). 20 It is important to check whether these deformations survive on physical configurations ω = ω and C = Cκ, i.e., whether the deformation is along κ or it is the higher spin algebra hs itself that gets deformed.
In the latter case, deformation has nothing to do with interaction, see the 3d example below.
the corresponding effective t'Hooft coupling λ = N/k becomes a continuous parameter in the large-N limit. Accordingly, the extended higher spin algebra A admits a two-parameter deformation. For more detail we refer to [72,73].
That all nonlinear terms in (3.8) follow, up to equivalence, in a simple way from a oneparameter family of associative algebras is an enormous simplification of the problem. There is a variety of nonlinear equations of type (3.8) in the literature that do not seem to use this structure at all [53,55,57], use it implicitly [29,50,52,54,56], and use it explicitly [51,58]. 21 There are some general methods to deform associative algebras in a constructive way, e.g. deformation quantization [39,76] and the injective resolution technique [77,78], which help to construct models of this kind.

Characteristic cohomology and observables
The main case of interest for us is 4d HSGRA wherein the higher spin algebra is based on the Weyl algebra A 2 , i.e., the noncommutative algebra of functions in two pairs of creation and annihilation operators. Nevertheless, all the observables turn out to be made out of the building blocks that exist already for the smallest Weyl algebra A 1 . This is due to the obvious isomorphism A 2 ≃ A 1 ⊗ A 1 . Therefore, we first go through the case of A 1 , which can be of some interest by itself, e.g. in the context of 3d HSGRA or specific Chern-Simons theories.

Three-dimensional HSGRA: warming up with A 1
Let us consider the algebra of complex polynomials in creation and annihilation operators: We prefer to work with f (ŷ α ) instead of f (â,â † ). As one more improvement, one can consider commuting variables y α and endow the algebra of polynomial functions in y α with the Weyl-Moyal star-product: where p 0 ≡ y, p α i = ∂/∂y i,α , and the symplectic inner product is defined as p 1 ·p 2 ≡ −p α 1 ǫ αβ p β 2 . Note that the derivatives are defined to act as p α 1 y β 1 = ǫ αβ and the indices are raised and lowered according to y α = ǫ αβ y β , y β = y α ǫ αβ . 22 The star-product (4.2) can be rewritten in a more concise form as 23 In general, any operator R (cochain) that takes a number of elements from the Weyl algebra -complex polynomial functions f (y) -can be written as Let us assume for a moment that the higher spin algebra of interest is hs = A 1 . It is well known that the algebra A 1 is rigid, i.e., it cannot be deformed nontrivially as an associative algebra. This is due to the fact that HH 2 (A 1 , A 1 ) = 0, so that Eq. (3.13) has only trivial solutions φ 1 = ∂ψ. The only nonzero cohomology group of HH A more interesting case is the groups HH • (A 1 , A * 1 ). This time dim HH 2 (A 1 , A * 1 ) = 1 and most of nontrivial cohomology considered in the present paper takes its origin in this fact. This means that there is a nontrivial two-cocycle with values in the module dual to A 1 . It is this cocycle that will lead to the deformation of the extended higher spin algebra in the case of 4d HSGRA. Therefore, it is important to discuss it in more detail. The dual module A * 1 can be realized in two different ways.
1. With the help of the supertrace 24 Strf = f (0) one can define a nondegenerate pairing Str(f ⋆ g), which identifies A * 1 with A 1 . The action of A 1 on A * 1 can be derived from the equalities Str(f ⋆ g) = Str(π(g) ⋆ f ) = Str(g ⋆ π(f )), where π is the involutive automorphism of A 1 defined by The group HH 2 (A 1 , A * 1 ) is now generated by a nontrivial solution to It is illuminating to see how far from the star-product (4.3) such φ is. It can be written in two different forms. First, there is an explicit expression of the form (4.4): , (4.7) 22 The same rule applies to derivatives. Starting from the canonical ∂ α y β = δ α β we get ∂ α y β = ǫ αβ , which is not the same as to lower the index on y α and then take the derivative. Note, ǫ 12 = 1, ǫ αβ ǫ γβ = δ α γ . 23 The only trick here is that exp . 24 It is a supertrace in the sense that even/odd functions f (y) are considered to be even/odd elements of the superalgebra A 1 , which is the same A 1 , but understood as a Z 2 -graded associative algebra. where Note that φ F F S is nonsingular despite the way it is written. The cocycle condition (4.6) can be rewritten in terms of the symbols of operators as For reference, the symbol of the star-product is just e x+y+z . Second, the cocycle φ F F S can be rewritten as an integral over a two-simplex, 25 namely, Operators with values in A * 1 can be thought of as linear functionals on A 1 : . (4.10) The first argument a 0 accounts for taking values in A * 1 . The cocycle condition now reads With the help of the pairing between A 1 and A * 1 via Str, we can express the cocycle with three-arguments (still called two-cocycle since the first argument is of a different nature) as φ(a, b, c) = Str(a ⋆ φ(b, c)) . (4.12) The last formula links representations (4.7) and (4.10).
Associated to the Hochschild cocycle (4.10) is a cyclic cocycle, which is a representative of cyclic cohomology, see Appendix A.2 for precise definitions. The cyclic complex is a subcomplex of the Hochschild one, where the cochains are invariant under the cyclic permutations of arguments up to sign. In particular, our cyclic two-cocycle has to obey Note that (4.12) is not a cyclic cocycle. Moreover, one cannot obtain φ C by averaging (4.12) over the cyclic permutations. Nevertheless, both the cocycles are known to be cohomologous to each other. In our case, it is possible to find a cyclic representative directly: (4.14) One can also represent it as the sum of integrals over two-and one-simplices: Extended higher spin algebra. Let π be the involutive automorphism (4.5) of our higher spin algebra A 1 and we would like to deform the free equations (3.3). 26 According to the general recipe we should introduce a new algebra generator κ such that Now, the extended algebra A is A 1 ⋊ Z 2 and its generic element reads f = f 1 (y) + f 2 (y)κ. 27 From now on, somewhat strange structures on A 1 that we defined above -the supertrace Str and the two-cocycle φ with values in A * 1 -acquire a simple interpretation for A (or for its π-invariant subalgebra A e 1 ). A trace Tr on A is given by a cyclic zero-cocycle, which may be viewed either as an element of A * or a linear functional on A. The cocycle condition takes the familiar form The supertrace on A 1 gives rise to the usual trace on A defined by That the group HH 2 (A 1 , A * 1 ) is nonzero translates into the fact that dim HH 2 (A, A) = 1 and the algebra A admits a nontrivial deformation. The second cohomology group is generated by the two-cocycle φ 1 (a, b) = φ(a, b) ⋆ κ, where φ from (4.6) can be taken to be φ F F S . Now, φ 1 obeys the condition and determines an infinitesimal deformation of A. Since HH 3 (A, A) = 0, the deformation is not obstructed and there exist all higher-order corrections φ k (−, −) that define an associative * -product (3.12). It is also true that the π-invariant subalgebra, A e 1 , admits a one-parameter deformation. 28 26 An alternative point of view is that we would like to 'gauge' the discrete Z 2 -symmetry and to project onto the π-invariant subalgebra, i.e., to consider ω and C assuming values in the even subalgebra A e 1 ⊂ A 1 . 27 It makes sense to omit ⋆ between y and κ whenever no confusion arises. Such κ's are called the Klein operators [80] sometimes. 28 The one-parameter family of algebras that goes through A e 1 is not mysterious and can be obtained as the quotient of the universal enveloping algebra U(sl 2 ) by the two-sided ideal associated with the quadratic Casimir operator C 2 − (−3/4 − u) [81]. The even subalgebra A e 1 corresponds to C 2 = −3/4. This family was dubbed gl λ in [81] as it interpolates between gl n in some sense.
Relation to HSGRA in three dimensions. Although the structures discussed above are intended to be building blocks for a more complex case of 4d HSGRA, it is also of interest to adapt them to 3d HSGRA. As is well-known, due to the isomorphisms so(2, 2) ∼ sp 2 ⊕sp 2 , sp 2 ∼ sl 2 the Einstein-Hilbert action for 3d gravity can be rewritten as the difference of two sl 2 Chern-Simons actions [82]: This admits a straightforward generalization to the case where sl 2 is replaced by any Lie algebra bigger than sl 2 [1-4] with a specific embedding of sl 2 such that decomposition into sl 2 -modules contains representations bigger than the adjoint one. In particular, one may consider the even subalgebra A e 1 ⊂ A 1 . The associated Lie algebra L(A e 1 ) contains sp 2 ∼ sl 2 as a subalgebra generated by quadratic polynomials {y α , y β } ⋆ . Decomposition into sp 2modules looks as The singlet V 0 corresponds to the unit of A e 1 and results in the direct u(1)-factor in L(A e 1 ). V 1 is given by the embedding of sp 2 . All HSGRA's with massless, partially-massless, and conformal higher spin fields in 3d must be of the Chern-Simons form [5]. One can try to look for more complicated theories with matter fields (scalars or fermions). As was shown in [83,84], the matter fields (we consider the scalar field for simplicity) can be described by the equations where A L , A R , and C take values in A e 1 . This system can be reduced to the standard one (3.7) with the help of an additional extension by 2 × 2-matrices [83,84]. 29 Finally, the relevant algebra is A = (A 1 ⋊ Z 2 ) ⊗ Mat 2 , where Z 2 is to be gauged to reduce the equations to even functions of y α . As was discussed in Sec. 3.1, all our results are obtained in conditions where the matrix extension is always possible. 30 Therefore, we can go back to A = A 1 ⋊ Z 2 at any time as the matrix factor does not make any difference for the classification of observables. 29 Representing Mat 2 as the Clifford algebra γ 2 0 = γ 2 1 = 1, γ 0 γ 1 + γ 1 γ 0 = 1, one can associate A L,R with the entries on the diagonal and C as a component along the matrix [(0, 1), (1, 0)]. The remaining components are similar to the those considered around (3.6). 30 There might exist some sporadic Chevalley-Eilenberg cocycles for L(hs ⊗ Mat n ) with small n's, but we are not aware of any example.

Conserved currents and interactions
In this section, we present a complete classification of conserved (and hence, gauge-invariant up to an exact differential) currents for the free system associated with the extended higher spin algebra A = A 1 ⋊ Z 2 . The results can be summarized by the following table, where we do not list those currents that have more than five ω's. Now, we give an account of the expressions that explain the multiplicities here-above.
Class C n . This is the simplest class comprising the zero-form invariants 31 that are obviously gauge invariant and d-closed on-shell. For an appropriately chosen wavefunction C it can give correlation functions of O = χ 2 , where χ is a generalized free scalar field on the 2d CFT boundary of AdS 3 . The significance of this is unclear since the dual CFT is expected to have a much bigger W -symmetry. 32 These invariants are unobstructed. 31 Note that the supertrace Str on A 1 reduces to a trace on A e 1 . 32 There are a number of important differences between HSGRA in d ≥ 4 and d < 4. In the latter case higher spin fields do not have propagating degrees of freedom, while the higher spin algebra does not seem to play much role on the CFT side since the conformal symmetry gets extended to the Virasoro algebra and even further to W -algebras [3,4,85].
This class consists of the on-shell closed Chern-Simons formsJ (4.23) It is easy to see that they are gauge invariant up to an exact differential. In fact, the Chern-Simons forms with k > 0 are all generated from Tr[ω] by the standard S-operation, see Appendix A.4.5. The k = 0 member is obstructed, but the others are not.
Class φ C (ω, ω, ω). The importance of the cyclic cocycle φ C found in Sec. 4.1 is that it allows us to construct a new 3-current, namely, It is closed on-shell: Here we used the equations of motion (4.21), the cyclic property (4.13), and the cocycle condition (4.11). One should also take into account that ω is a one-form. Equivalently, we can show that the current (4.24) is gauge-invariant on-shell up to an exact differential: Therefore, J 3,0 (ω) can be integrated to give a gauge-invariant observable in Chern-Simons theory. This current is specific to the gauge algebra being the Weyl algebra (its even subalgebra). For the classical Lie algebras we have just Tr[ω 3 ]. We can use this additional observable to modify the Chern-Simons action as follows: The new current J 3,0 owes its existence to the fact that the algebra A e 1 admits a one-parameter deformation and the same deformation gives the one-parameter family (4.27) of Chern-Simons theories. The cyclic cocycle φ C determines the first-order deformation at the action level, while the corresponding Hochschild cocycle φ does the same at the level of algebra.
With the help of the S-operation on cyclic cohomology one can generate a family of forms of the type ω 2k+3 by applying S to φ C . Applied ones, it gives J 5,0 = (Sφ C )(ω, ω, ω, ω, ω) = 3φ C (ω 3 , ω, ω) − φ C (ω 2 , ω 2 , ω) . (4.28) In order to check the gauge-invariance of the resulting current directly one may use the following identities, which are obtained by splitting ω 6 into the four arguments that enter the cocycle condition: As the S-operation can be applied repeatedly, cyclic cohomology is unbounded from above as distinct from the case of Hochschild cohomology. We do not discuss invariants whose form degree is significantly higher than the space-time dimension. All members of this class, including the case k = 0, are unobstructed.
Class φ C (ω, ω, C k ). All members of this class are two-forms. The first its representative is obtained by replacing one ω with C in φ C (ω, ω, ω). This yields It can also be rewritten through the Hochschild two-cocycle as and the cyclic property (4.13) is not needed anymore to check that dJ 2,1 ≈ 0. The other members of this family are obtained by replacing C with C k : The family contains infinitely many two-forms and all of them are unobstructed. Canonically, on-shell closed two-forms in 3d lead to conserved charges and we seem to have too many of them. The physically relevant charges should be finite. However, quite generally one can show that the charges built out of J 2,k are divergent. We leave the discussion of possible applications of these observables to future publications.
Lastly, all of the here-above p-forms serve as the generators of the algebra of scalar invariants, i.e., the exterior product thereof gives new invariants.
H(L, T 1,0 ), class φ(ω, ω)C k . So far we discussed the scalar observables, i.e., H(L, T 0,0 ), but cocycles with values in the higher spin algebra are also of interest as they determine the deformation of equations. They can be obtained by undressing one C in the observables above. Since this is rather a trivial exercise, we consider just one example -the leading deformation of the equation (4.34) If k = 0 the r.h.s. comes form the deformation of the algebra itself. This case is also covered by the deformation with k = 1 as the field C can be set constant in space and proportional to the unit of A. This is a major difference with the case of 4d HSGRA. The 3d higher spin algebra A e 1 admits a nontrivial deformation and this is the only deformation of the extended algebra A as well. Therefore, one can tell straight away that the end result of this deformation is a system of the form where the only difference is that the fields assume their values in the deformed algebra with the * -product (3.12), see also [84]. This system is clearly inconsistent with AdS/CFT since there is no backreaction from matter fields C to the gravitational sector of ω. The backreaction cannot be captured by the formal consideration and requires locality to be taken into account. 33 Everything we said about the observables above holds true for any generic point of the one-parameter family of algebras that passes through A e 1 or A = A 1 ⋊ Z 2 . Indeed, at any generic u there is a Hochschild two-cocycle φ u (a, b) = ∂ u (a * b). This φ u can be used in place of φ above provided the ⋆-product is replaced with * at u. One only needs to be careful about whether or not a given observable descends to the physical sector.

HSGRA in four dimensions
As was known already to Dirac [88], the algebra that naturally acts on the free 3d massless scalar field is the even subalgebra A e 2 of the next to the smallest Weyl algebra A 2 = A 1 ⊗ A 1 . This is the same as the algebra of symmetries of the free 3d massless fermion field, which is a necessary condition for the 3d bosonization duality [23,[89][90][91][92][93] to work at least in the 33 One obvious difference between the formal scheme and the physical one is that the stress-tensors are formally exact, i.e., do not correspond to nontrivial cocycles. Indeed, the stress-tensor contribution has to be a cocycle of type ω 2 C 2 . The exactness of such stress-tensors for ω being the AdS 3 vacuum was shown in [86] and discussed further in [87]. If (4.34) begins with the k = 1 deformation and the ω 2 C 2 -deformation is also added, the latter can be obtained via C → C + C ⋆ C redefinition from the ω 2 C-deformation and is no longer a nontrivial deformation. Vertices with k > 1 are examples of irregular deformations mentioned in footnote 5.
large-N limit. To realize A 2 we simply double the variables, as compared to the previous section, and introduce the star-product language from the onset: The higher spin algebra hs is the star-product algebra of even functions, f (y,ȳ) = f (−y, −ȳ). Note that both A 2 and A e 2 are rigid and do not have nontrivial deformations as associative algebras (cf. A 1 vs. A e 1 , the latter being deformable). The π-automorphism is defined to flip the sign of the AdS 4 -translation generators P αα [34,43,60]. Given that P αα ∼ y α yα, one can realize π either as π 1 (f )(y,ȳ) = f (−y,ȳ) or as π 2 (f )(y,ȳ) = f (y, −ȳ). Both π 1 and π 2 are equivalent on A e 2 , but not on A 2 . Since A 2 = A 1 ⊗A 1 , the extended higher spin algebra A is constructed by taking the tensor product of two copies of A = A 1 ⋊ Z 2 . Therefore, we introduce the pair of generators k andk such that k 2 =k 2 = 1 and 34 As for A 1 , there is a unique supertrace Str on A 2 . It induces the usual trace Tr on A e 2 . Projection onto the subspace spanned by kk gives a trace on A.
In order to extract the physical sector of fields associated with (A e 2 , π) one has to gauge the diagonal Z 2 in A ⊗ A. In practice, one takes ω = 1 2 (1 + kk)ω(y,ȳ) and C = 1 2 (k +k)C(y,ȳ) , where ω and C are even functions. The relation to footnote 34 is that the element E = 1 2 (1 + kk) is central on the subalgebra of even functions and κ = 1 2 (k +k) plays the role of κ on this subalgebra, κ 2 = E. If one wishes to keep the global symmetry parameters, then C = EK(y,ȳ) for any even K.

Conserved currents and interactions
The conserved currents associated with the free system 34 Instead of taking the tensor product one could define a single κ satisfying κ 2 = 1 and κ⋆P αα ⋆κ = −P αα .
However, there are general theorems that allows one to compute the cohomology of the tensor product A ⊗ A whenever the cohomology of A is known. The higher spin cohomology corresponds to A 0 = A e 2 ⋊ Z 2 and, as is shown in Appendix B.5, it coincides with that of A = A ⊗ A, which is more natural to compute. Note that the algebra with k andk was introduced in [94] as N = 2 SUSY higher spin algebra, which is not an interpretation we use here. are summarized in Table 3. The structure of cyclic cohomology here is such that, translating it to the physics language, there are representatives of arbitrarily high form degree. Those that have the form degree much above the space-time dimension are hardly relevant for HSGRA studies. Table 3: On-shell closed/gauge-invariant currents in 4d Higher Spin Gravity to the lowest order. The sum in each cell gives the number of independent currents that are of ω m C n -type, i.e., involve m one-forms ω and n zero-forms C, cf. Table 6. The (first) boldface number is the number of currents that do not vanish upon projection to the physical sector.
H(L, T 1,0 ). We will also discuss (obstructions to) the extension of observables to higher orders. Before doing that it is important to understand what are the options to deform the free equations (4.38). Since either factor in A = A ⊗ A admits a nontrivial deformation, it is not surprising that the there are two independent cubic vertices 35 (4.39) The notation is that the cocycle φ entering in V 3 acts on y's, while the Weyl-Moyal starproduct is taken overȳ. More explicitly, where a, b, c depend on y andā,b,c depend onȳ. Both the vertices descend to the physical sector and give V 3 = φ(ω, ω) ⋆ π(C) and likewise forV 3 . There are two independent coupling constants g 1,2 . Unless we need one of the two deformations, φ orφ, we will assume that Φ = g 1 φ + g 2φ is the most general one. 35 These vertices were found in [34], but the proof of uniqueness was not given there. The uniqueness is important in view of the 3d bosonization duality conjecture. Had we found more nontrivial deformations, Chern-Simons Matter theories would have had more free parameters.
The 4d case should be confronted with the 3d one. Here, the higher spin algebra does not have any deformations. Only its Z 2 -extension does; the deformation happens along any of the k ork directions, that is, along C in the π-twisted representation. Therefore, we do not include bare φ(ω, ω) in (4.39) since its projection onto the physical sector vanishes.
The cocycles φ and φ C , being inherited from A 1 , can always be made to respect the sp 2subalgebra. Identifying the Lorentz algebra with sl 2 (C), one can realize it by the complex conjugate generators y α y β and yαyβ. In particular, the spin-connection is represented by its self-dual ̟ αβ and anti-self-dual ̟αβ parts. The Hochschild two-cocycle φ can be adjusted such that φ(̟, ω) + φ(ω, ̟) = 0 whenever ̟ ∈ sp 2 and ω is arbitrary. This guarantees that the equations are manifestly Lorentz-covariant, i.e., the spin-connection appears only inside the Lorentz-covariant differential D = d − [̟ +̟, −] ⋆ and its curvature two-form Rαβ. This is a form of the Equivalence Principle. Now we explain the multiplicities in the table with concrete expressions.
Class C n , holographic correlation functions. This is the simplest class of invariants and the only class of gauge-invariant functionals that are strictly gauge-invariant: (4.41) Therefore, these are the only observables that do not have to be integrated. I 0,n are of physical significance since, for appropriately chosen wave-functions C, they compute the correlation functions of the single-trace operators in the free CFT duals (these are the free 3d scalar or free 3d fermion) [95][96][97][98][99][100]. 36 We note, however, that what is plugged in are zero-forms C = ΠK in the adjoint representation that are obtained from those in the twisted-adjoint as K = C ⋆ δ, where δ is the star-product delta-function. This transformation between the adjoint and the twistedadjoint representations takes the form of the Fourier transform and is ill-defined in general. Nevertheless, the fact that it needs to be employed to compute the correlation functions and is well-defined for certain physical configurations indicates that there is no sharp difference between the two representations. Therefore, the above splitting into the physical and unphysical configurations, as in Table 3, has to be treated with care.
Another important property of the invariants I 0,n is that they do not depend on x. Indeed, dI 0,n = 0 by construction. It is also instructive to see how the x-dependence gets 36 The correlation functions of the higher spin currents (J s , s > 0) in the critical vector model and in the Gross-Neveu model are given by the same formulas in the large-N limit. Those with one scalar operator differ structurally between free and critical models. Those with two and three scalar operators J 0 are fixed by the conformal symmetry up to a constant. washed away. In general, C can be solved as g −1 ⋆ C 0 ⋆ g, where ω = −g −1 ⋆ dg and C 0 is an x-independent element of the (extended) higher spin algebra. Upon taking the trace the x-dependence of I 0,n , which is in g, gets erased. As a consequence, all I 0,n are diffeomorphism invariant. This is an example of 'gravitationally dressed' observables, see e.g. [101]. In this case, the dressing is via Wilson's line.
Being x-independent, the invariants I 0,n are implicitly nonlocal. The relation to the correlation functions implies that I 0,n can be represented as an integral of a certain n-point 'contact vertex' in AdS d+1 [24]. This is not in contradiction with I 0,n being seemingly local as they are obtained by sewing several C(x), all taken at the same point x. Indeed, C is a generating function of auxiliary fields that are expressed by virtue of the equations of motion as derivatives (of unbounded order) of the higher-spin Weyl tensors. A knowledge of all on-shell derivatives of the higher spin fields allows one to compute certain space-time integrals as star-products (and other functionals in the Y -space), i.e., on the higher spin algebra.
The zero-form invariants are also very close to the vertices of the collective dipole action, see e.g. [74], which by definition gives the correlation functions of higher spin currents, see [99,100] for details. The collective dipole action should correspond to the sum of all I 0,n with certain numerical prefactors. Other ideas to employ I 0,n as building blocks of an action can be found e.g. in [102].
The second raw in Table 3 shows that there are no obstructions to the extension of I 0,n in the nonlinear theory. The deformed I 0,n are expected to give correlation functions in Chern-Simons Matter theories [72]. This was conjectured in [72], while the new results prove the uniqueness of these invariants. Therefore, if the slightly-broken higher spin symmetry [89] is realized in Chern-Simons Matter theories, then the deformed observables I 0,n seem to provide a unique answer for the correlation functions.
This class consists of the on-shell closed Chern-Simons forms (4.42) Clearly, I 1,0 = Tr[ω] is just the spin-one gauge potential A µ dx µ ≡ ω µ (y = 0,ȳ = 0) dx µ . This first member of the family does not survive the inclusion of interaction. Indeed, a simple computation with the help of (4.39) gives which is a nontrivial cocycle. 37 The next current I 3,0 is not obstructed and higher orders of the C-expansion can easily be found. For example, where the 'expansion parameter' is C; hence, we use (4.39) for dω and (4.38) for dC.
The invariant I 3,0 , being a three-form, looks like a conventional conserved current. It is felt that I 3,0 can appear as a boundary term. The projection of I 3,0 onto the physical sector can be uplifted to an off-shell invariant, which is the Chern-Simons action for the higher spin algebra hs = A e 2 : k 4π Tr It gives the action of one of the 3d conformal higher spin gravities [6][7][8]. The higher Chern-Simons forms can lead to exotic higher spin theories discussed recently in [103].
Classes φ C (ω, ω, ω) andφ C (ω, ω, ω). In addition to Tr[ω 3 ] there are two more threeforms. They can be constructed by applying the cyclic cocycle (4.14) to either A-factor of A = A ⊗ A and tracing over the rest of the variables: According to Table 3, there is only one obstructing cocycle. Therefore, depending on the values of g 1,2 in (4.39) or which linear combination of φ C andφ C is taken, we can face an obstruction. The obstruction is of type φφ, see below. Therefore, at g 2 = 0 the cocycle φ C is unobstructed (the interaction vertex contains only φ), but at g 1 = 0 it is obstructed. We are lead to conclude that there is a linear combination of J 3,0 andJ 3,0 that survives switching on interaction. Together with Tr[ω 3 ] we have three candidates for global symmetry currents, but only Tr[ω 3 ] projects to the physical sector.
Classes S k φ C (ω, ω, ω) and S kφ C (ω, ω, ω). With the help of the S-operation on cyclic cohomology one can generate two families of type ω 2k+3 by applying S to φ C andφ C . For example, and likewise forφ C . They vanish upon the physical projection and are unobstructed. 37 It is a nontrivial cocycle for the free equations of motion. Here, we used the first-order deformation of the free equations.
It is easy to see that the following families of two-forms are closed on-shell: (4.49) They can also be rewritten in an equivalent, if not identical, way These are candidates for the role of surface currents and there are infinitely many of them. We do not expect those with k > 1 to give a finite charge in general. All these currents are unobstructed and can easily be continued to higher orders. Those with k odd do not vanish when projected onto the physical sector. For example, the current Tr[φ(ω, ω) ⋆ C] gives Tr[φ(ω, ω) ⋆ π(C)]. To the lowest order we obtain h αα ∧ h βα C αβ , which is the self-dual part of the Maxwell tensor F µν and likewise for the anti-self-dual part and φ.
Class φ C (ω, ω, ω, ω, ω). The fourth Hochschild cohomology group HH 4 (A 2 , A * 2 ) of the second Weyl algebra A 2 is one-dimensional. This fact implies that the corresponding cyclic cohomology group HC 4 (A 2 ) is one-dimensional too. It is quite difficult to find an explicit expression for the Hochschild four-cocycle of A 2 . It was first obtained in [79] as a consequence of the Kontsevich-Shoikhet-Tsygan formality theorem. An alternative construction was proposed in our paper [73]. The cocycle can be represented as a function of four arguments in  Here, Π[f (y,ȳ)] = f (−y, −ȳ), the effect that can also be achieved with kk. The automorphism Π ≡ π 1 π 2 takes into account the difference between A 2 and A * 2 understood as A 2 bimodules.
The Hochschild four-cocycle φ is known to be cohomologous to a cyclic cocycle φ C . The latter is defined by the conditions a, b, c, d) ,  Since A 2 = A 1 ⊗ A 1 , the cyclic four-cocycle φ C can be obtained as the cup product of the two-cocycles φ C andφ C , see Eq. (A.32). However, this representative enjoys the sp 2 symmetry only. A manifestly sp 4 -invariant cocycle can be written as a sum of integrals over 4-, 3-, and 2-simplicies, cf. (4.15). With the help of the cyclic four-cocycle we define the five-form which is on-shell closed and nontrivial. This form is a well-defined observable in the fivedimensional Chern-Simons theory based on hs = A e 2 whenever we consider solutions to the zero-curvature equation F = 0 rather than F ∧F = 0. The five-form descends to the physical sector and is unobstructed.
Class S k φ C (ω, ω, ω, ω, ω) Applying the S-operation to the four-cocycle above one can generate ω 5+2k -forms. For example, applying S once we get a nontrivial seven-form (4.55) All these forms survive the projection onto the physical subsector and are unobstructed.
Class ω 4 C. This class is obtained by replacing one ω in the cyclic four-cocycle with C: Its physical projection vanishes as C has to be in the adjoint representation of the higher spin algebra. At the same time, this implies that there is an on-shell closed four-form that depends on a global symmetry parameter. In this case, there is no need to use a cyclic representative and we can replace (4.56) with the equivalent current 38 This four-form current does not have any physical interpretation at the moment.
38 In checking dJ 4,1 = 0 one should remember that Π leaves A e 2 invariant. Therefore, φ also determines a representative of HH 4 (A e 2 , A e 2 ).
Class ω 4 C 2 . This is obtained by inserting the product C ⋆ C into the cyclic four-cocycle: The importance of this current is that it is the first four-form that does not vanish on generic physical configurations. Upon projecting onto the physical sector it can also be written as In view of the property (4.58), J 4,2 vanishes whenever ω is purely gravitational, i.e., for ω ∈ sp 4 . This four-form is unobstructed.
Class ω 4 C k . The two classes above are the first members of the family of which we make no special comments, except we do not expect those with k > 2 to lead to convergent integrals in general.
A general comment about the invariants J 4,k that do not vanish identically on physical configurations is that they are natural building blocks for the on-shell action. In particular, we see that there is no analog of the cosmological term of ω 4 -type in 4d HSGRA. Also there is no tadpole of ω 4 C-type. All J 4,k are unobstructed and can easily be extended to higher orders.
Final note. It is worth stressing that all the invariants presented above form a multiplicative basis for the graded-commutative algebra of invariants under the exterior product of differential forms, see Proposition B.4. Therefore, we have even more invariants.
Coming back to the deformation of the equations of motion (3.8) by interaction. According to our classification the two-form currents Tr[φ(ω, ω) ⋆ C k ] with one C removed determine all the possible deformations of the free equations. Those that remain nontrivial upon the physical projection are of the form φ(ω, ω) ⋆ π(C) ⋆ (C ⋆ π(C)) n (4.62) and the same forφ. This interaction ambiguity was first observed in [104]. The terms with n > 0 are similar to the zero-form invariants 39 and are too nonlocal, as interaction vertices, even for HSGRA [105,106].

Discussion
After the classification is presented, it is high time to glance over Table 3 and notice that we have many more observables than we expected to find for a theory of quantum gravity, see e.g. [107]. Surprisingly, the higher spin symmetry, being much bigger than the gauge symmetries in Yang-Mills theory or GR, enjoys a wealth of conserved p-form currents that the low spin theories do not normally have.
For example, the surface charges are known to correspond to reducibility parameters, that is, those gauge parameters that leave the field configuration invariant on-shell, see e.g. [108] in the higher spin context. The surface charges are of no surprise in free gauge theories, but it is hardly probable to find them in nonlinear models. In GR and YM, the surface charges can be defined only in the asymptotic region, where they correspond to the symmetries of the asymptotically free background. However, most of the conserved p-form currents we found are not obstructed and their nonlinear completion does exist in the full theory. This might indicate that the nonlinear theory is still free in a sense. Indeed, this is just what AdS/CFT duality between HSGRA's and free CFT's suggests. Interacting higher spin fields, if not free in themselves, are dual to 'mesons' J i 1 ···is = φ∂ i 1 · · · ∂ is φ + · · · that are bilinear in the free 'parton' fields φ of the corresponding CFT.
This also reincarnates in the bulk as hidden integrability of any formal HSGRA. As was shown in [51] all solutions to the nonlinear equations (3.8) can be obtained from a 'free system' of the same form dω =ω * ω , dĈ =ω * Ĉ −Ĉ * ω .
The only difference is thatω andĈ take now values in the deformed higher spin algebra (3.12) and depend on the deformation parameter u. There is an explicit map that takes solutions of Eqs. (5.1) to those of Eqs. (3.8), see also [84]. The existence of such a map is due to an inevitable nonlocality of HSGRA that goes far beyond what is allowed in conventional field theory. The presence of infinitely many conserved surface charges also agrees with general conclusions of [33].
Another comment is about local gauge invariant operators: there are plenty of such operators in YM and none in GR. In GR, however, we find infinitely many local scalars (they are scalars under diffeomorphisms) that are built out of the Riemann tensor and its covariant derivatives. Our results imply that there are no local 'curvature invariants' in HSGRA. The only true scalars are Tr[C n ], but they are (i) nonlocal and (ii) do not actually depend on the point and thus are diffeomorphism invariant. The reason is that the diffeomorphisms are actually part of gauge transformations (2.14).
It is possible to foresee the higher dimensional generalization of Table 3. Generically, there is just one Hochschild two-cocycle φ on a higher spin algebra [72]. Associated to it is a cyclic two-cocycle φ C . Together with the trace Tr they generate the following families: In addition, there should be a Hochschild cocycle ψ of degree d − 2 (in 4d this results in that we have φ andφ), which also gives rise to families similar to those originating from φ, i.e., S k ψ(ω d+2k−1 ) and ψ(ω d−2 , C k ). The cup products φ ⊔ · · · ⊔ φ do not seem to generate nontrivial classes. Nevertheless, we expect χ = φ ⊔ ψ to give a nontrivial d-cocycle and the corresponding two families: S k χ(ω d+2k+1 ) and χ(ω d , C k ).
Finally, all conventional gauge theories do not have any characteristic cohomology in degree less than d − 2 provided that gauge symmetries are irreducible [46]. On the contrary in HSGRA we always have zero-form invariants and for d > 4 there is an infinite family of two-form currents at the very least. Therefore, HSGRA's may give interesting examples of higher form symmetries [30].
A The essentials of Hochschild, cyclic, and Lie algebra cohomology This appendix collects, in a highly condensed form, some basic facts on different cohomology theories for graded algebras. A systematic exposition of the material can be found in [109], [110], [81]. For a quick introduction to the subject we refer the reader to [111].
Throughout, k is a ground field of characteristic zero and M is a bimodule over a graded associative k-algebra A, that is, A = n∈Z A n and M = n∈Z M n such that The degrees of homogeneous elements a ∈ A n and m ∈ M n will be denoted by |a| = n, |m| = n. Both the algebra and bimodule are supposed to be unital. All unadorned tensor products ⊗ and Hom's are taken over k. Given two graded algebras A and B, we define the tensor product A ⊗ B to be a graded algebra with In a similar way one can define the tensor product of graded bimodules over A and B. Notice that the sign in the definition of the product above agrees with the Koszul sign convention: if in manipulation with monomial expressions involving graded objects an object a jumps over an object b, then the sign (−1) |a||b| appears in front of the expression. For example, if f and g is a pair of homomorphisms of graded modules, then (f ⊗ g)(a ⊗ b) = (−1) |g||a| f (a) ⊗ g(b) and the dual bimodule M * = Hom(M, k) is defined by the relation We follow this sign convention throughout the paper. Many formulae below are simplified significantly if one uses the shifted degreeā = |a| − 1 that results from the desuspension Finally, we will use Z 2 to denote the cyclic group Z/2Z and Sp 2n (k) to denote the symplectic group Sp(n, k) since this is notation prevalent in the physical literature.

(A.5)
Let us consider the ground field k as a one-dimensional algebra over itself. It follows from the cyclicity condition (A.4) that C 2n cyc (k) ≃ k and C 2n+1 cyc (k) = 0. Hence, HC 2n cyc (k) ≃ k and HC 2n+1 cyc (k) = 0. On the other hand, HH • (k, k * ) ≃ HH 0 (k, k * ) ≃ k. We thus conclude that HH • (A, A * ) = HC • (A) in general. In particular, the cyclic subcomplex There is a general construction to produce cyclic cocycles. It is based on Connes' notion of a cycle over an algebra [110,Ch. III]. Recall that each differential graded algebra (Ω, d) possesses a canonical decreasing filtration Ω ⊃ F 1 Ω ⊃ F 2 Ω ⊃ · · · , where the differential subalgebra F p Ω is given by the p-th power of the ideal generated by dΩ. In other words, the k-space F p Ω is spanned by elements of the form a = a 0 da 1 · · · da p . Following Connes, we define a p-cycle to be a triple (Ω, d, ) consisting of a differential graded algebra endowed with a closed trace : Ω → k vanishing on F p+1 Ω, that is, By definition, a p-cycle over an algebra A is given by a p-cycle (Ω, d, ) together with a homomorphism ρ : A → Ω of graded algebras. Let us denoteâ = ρ(a) for all a ∈ A.
The hats indicate omitting of the corresponding arguments. For trivial coefficients V = k the sum in the first line of (A.9) is absent. By definition, the Lie algebra cohomology with coefficients in V is the cohomology of the Chevalley-Eilenberg complex above. The corresponding cohomology groups are denoted by H • (L, V ) or just H • (L) for trivial coefficients. so that the condition ∂ 2 = 0 becomes a simple consequence of the Jacobi identity. As another consequence, one finds that the operator ∂ differentiates the Lie bracket (A.18). A straightforward calculation shows that it is also a (right) derivation of the cup product: As a result both the multiplication operations pass through cohomology. Furthermore, at the level of cohomology, the cup product appears to be graded commutative and compatible with the bracket in the sense of the graded Poisson relation. This follows from the identities The r.h.s. of the second identity involves a higher cohomological operation, called a twobrace, whose definition can be found in [112]. In such a way the space HH • (A, A) is endowed with the structure of a Gerstenhaber algebra [113].

A.4.3 Operations in Lie algebra cohomology
There are various multiplicative structures on the Lie algebra cohomology depending on coefficients. For instance, the natural multiplication of scalar cochains C • (L, k) as exterior forms on L • makes C • (L, k) a differential graded algebra with the same differential (A.9). As a result, the cohomology space H • (L) acquires the structure of graded commutative algebra:  c 2 (a i 1 , . . . , a iq ), a j 1 , . . . , a jp ) . (A.25) Here the sum is taken over all unshuffle sequences gives C • (L, L) the structure of a differential graded Lie algebra with the differential (A.9). Passing to cohomology, one can speak of the graded Lie algebra of cohomology H • (L, L).

A.4.4 Cup products in Hochschild and cyclic cohomology
These cup products 41 relate the cohomology groups of algebras A and B with those of the tensor product A ⊗ B. The case of Hochschild cohomology appears to be simpler than the cyclic one as it is possible to define the desired product at the level of cochains. Let M and N be bimodules over algebras A and B, respectively. Then one puts The group HH 0 (Mat n (k), Mat n (k)), being the center of the matrix algebra, is generated by the unit matrix 1 ∈ Mat n (k). Then one can see that f ⊔ 1 = cotr(f ) for any f ∈ C p (A, M). Thus, the cotrace map (A.12) is induced by the cup product with the generator of the group HH • (Mat n (k), Mat n (k)).
For reference we also present the cup product of two cyclic 2-cocycles for the case of nongraded algebras A = A 0 and B = B 0 . Applying the general formula (A.31), one can find As one more example, consider the group HC 0 (Mat n (k)) ≃ HC 0 (k) ≃ k. The group is clearly generated by the matrix trace tr : Mat n (k) → k. Then A ⊗ Mat n (k) = Mat n (A) and one can check that g ⊔ tr = cotr(g) for any g ∈ C p (A), where the cotrace map is defined by (A.13).
Note that for each k-algebra A, there is the isomorphism A ⊗ k ≃ A. Using this isomorphism and the generator σ ∈ HC 2 (k), we can define a homomorphism The homomorphism S of degree 2 is called the periodicity map. For example, applying S to a 1-cocycle φ, we get (Sφ)(a 0 , a 1 , a 2 , a 3 ) = (a 0 ⊗ e)d(a 1 ⊗ e)d(a 2 ⊗ e)d(a 3 ⊗ e) 1 a 2 , a 3 ) .
The above calculations are simplified if one uses the following identities, which hold for any idempotent e: de = de 2 = dee + ede ⇒ edee = 0 .
Actually, treating k = ke as a bialgebra, one can make HC • (k) into a graded commutative algebra w.r.t. the product (A. 33). This algebra appears to be isomorphic to k[σ] with the generator σ of degree 2. Eq. (A.35) defines then the action of the algebra HC • (k) on HC • (A). This allows us to view HC • (A) as a module over the graded commutative algebra HC • (k).

A.5 Example: the cyclic cohomology of Λ = k[θ]
By way of illustration let us consider a simple, yet important, example of a graded algebra. This is given by the Grassmann algebra Λ = k[θ] with the only generator θ of degree 1 subject to the relation θ 2 = 0.
Actually, Λ is a bialgebra with the coproduct defined by ∆θ = θ ⊗ e + e ⊗ θ. As explained in Sec. A.4.4, the space HC • (Λ) is given the structure of a graded commutative algebra. Multiplying the generators (A.41) according to (A.33), one can find [81,Prop. 5.1.4]: The element λ + 0 plays the role of unit in HC • (Λ). It is easy to see, that all λ − 's are in the kernel of the homomorphism induced by the inclusion k → Λ. An earlier discussion of Hochschild and cyclic cohomology for Grassmann algebras can be found in [115], [116].

A.6 Künneth theorems for Hochschild and cyclic cohomology
Let N be a bimodule over a k-algebra B such that all the groups of Hochschild cohomology HH p (B, N * ) are finite-dimensional k-vector spaces. Then the cup product (A.28) defines a natural isomorphism Here α is a homomorphism of degree −1. In general, the cup product (A.30) defines only an injective homomorphism from the tensor product of HC • (k)-modules. This homomorphism, however, becomes an isomorphism whenever either of the HC • (k)-modules is torsion free.

A.7 Relations between various cohomology theories
The fact that the cyclic complex C • cyc (A) is a subcomplex of the Hochschild complex C • (A, A * ) gives rise to the long exact sequence in cohomology The sequence involves the periodicity map (A.34) and is known as Connes' Periodicity Exact Sequences. In many interesting cases it reduces the problem of computation of cyclic cohomology to that of Hochschild cohomology. The map I is induced by the inclusion , while the definition of B is more complicated, see [110]. In low dimensions, Connes' exact sequence takes the form hence, HC 0 (A) ≃ HH 0 (A, A * ) (which is clear from the definition of cyclic cohomology).
Suppose for instance that HH p (A, A * ) = 0 for all p > n. Then applying the exact sequence above, one readily concludes that the periodicity map S : HC q (A) → HC q+2 (A) is an isomorphism for all q ≥ n and an epimorphism for q = n − 1. If the whole Hochschild Recall that Mat n (A) denotes the associative algebra of n × n-matrices with entries in A. When equipped with matrix commutator it becomes a Lie algebra denoted by gl n (A). The same matrix commutator turns the k-space Mat n (M) into an adjoint module of the Lie algebra gl n (A) for any A-bimodule M. (There is no need to antisymmetrise all p + 1 arguments in the second relation due to cyclicity of g and tr.) Among important applications of cyclic cohomology is computation of the cohomology of the Lie algebra gl(A) of 'big matrices'. By definition, the algebra gl(A) consists of infinite matrices with only finitely many entries different from zero. Formally, it is defined through the inductive limit gl(A) = lim → gl n (A) corresponding to the natural inclusions gl n (A) ⊂ gl n+1 (A) (an n × n-matrix is augmented by zeros). A precise relationship between the cohomology of the Lie algebra of matrices and cyclic cohomology is established by the following Tsygan-Loday-Quillen theorem [118], [119].  In other words, the cohomology group H p (gl n (A)) does not depend on the size of matrices provided it is large enough.
There is also an analogue of the above theorem for cohomology with coefficients in the adjoint representation, see [109,Sec. 10.4], [120]. In studying invariants of a HSGRA associated with a given higher spin algebra A we are interested in cohomology of the Lie algebra gl(A) with coefficients in symmetrized tensor powers of the coadjoint module gl(A) * . There is a trick that allows one to incorporate the tensor module into the structure of a Lie algebra reducing thus the problem to the case of trivial coefficients. The construction goes as follows. Let us take for instance M = A 1 . Then the first equality in (B.3) identifies HH 0 (A 1 , A 1 ) with the centre of A 1 , which is given by ke. Introducing now the pair of k-linear operators Hence, HH 1 (A 1 , A 1 ) = HH 2 (A 1 , A 1 ) = 0 and we conclude that Vanishing of the second cohomology group HH 2 (A 1 , A 1 ) means that the first Weyl algebra A 1 is rigid, i.e., admits no nontrivial deformation, while the equality HH 1 (A 1 , A 1 ) = 0 says that all derivations of A 1 are inner.
Taking the n-fold tensor product A 1 ⊗ · · · ⊗ A 1 , one gets the n-th Weyl algebra A n . This is generated by 2n elements q i and p j satisfying Heisenberg's commutation relations The groups (B.6) being finite-dimensional, we can apply the Künneth theorem (A.44) to get 42 Therefore, all the Weyl algebras A n are rigid, have no outer derivations, and their centers are generated by the unit element. The symmetrized quadratic monomials in q's and p's form the Lie algebra sp 2n (k) w.r.t. the commutator.
The Koszul resolution for A n is constructed in a way similar to above and can be used to establish the isomorphism

B.2 Skew group algebras and twisted bimodules
Let A be an associative k-algebra and G ⊂ Aut(A) a finite group of automorphisms of A.
The skew group algebra A⋊G (aka smash product algebra) is defined to be the k-vector space Here a g denotes the result of action of g ∈ G on a ∈ A.
With any element g ∈ G one can associate a g-twisted bimodule Ag over A. As a k-vector space, Ag is isomorphic to A and the action of A on Ag is given by As is seen, the left action is the usual action of A on itself, while the right action is twisted by the automorphism g.
The following statement relates the Hochschild cohomology of a skew group algebra A⋊G with the G-invariant cohomology of the g-twisted bimodules Ag.
Theorem B.1. If a finite group G acts by automorphisms on an algebra A, then The poof can be found in [124,Lemma 9.3].
We are going to apply the general constructions above to the n-th Weyl algebra A n . The automorphism group of A n contains a subgroup Sp 2n (k) acting by linear transformations on the 2n-dimensional vector space V spanned by the generators q's and p's. Clearly, the action of Sp 2n (k) preserves the commutation relations (B.7) inducing thus automorphisms of the whole algebra A n . Now let G be a finite subgroup of Sp 2n (k) and suppose the ground field k to be algebraically closed, say C. Then g |G| = 1 for any g ∈ G and the action of g is diagonalizable in V . Denote by 2µ g the multiplicity of the eigenvalue 1 of the operator g : V → V . The groups of Hochschild cohomology HH • (A n , A n g) were first computed by Alev, Farinati, Lambre and Solotar in [123] (see also [125]).
Theorem B.2 (AFLS). With the definitions and assumptions above HH • (A n , A n g) ≃ HH 2(n−µg) (A n , A n g) ≃ k .
When g = e, this yields (B.8). As is seen the odd cohomology groups are all zero.
Let us combine the last theorem with Theorem B.1. The elements of the direct sum g∈G HH • (A n , A n g) are represented by cocycles where τ g are basis cocycles 43 for nontrivial groups HH 2µg (A n , A n g) ≃ k. G-invariance implies that (τ γ ) h = τ γ for all h ∈ G. On the other hand, it follows from the definition that (τ g ) h = τ hgh −1 and µ g = µ hgh −1 . The latter equality means that the set of all element g ∈ G with 2µ g = p is invariant under conjugation. Hence, the G-invariance condition amounts to γ(hgh −1 ) = γ(g), that is, γ : G → k is a class function on G. In such a way we arrive at the second AFLS theorem.
Theorem B.3 (AFLS). Let n p (G) denote the number of conjugacy classes of elements g ∈ G with 2µ g = p, then By way of illustration, consider the involutive automorphism κ ∈ Aut(A n ) defined by This equips A n with the natural Z 2 -grading. Associated to this Z 2 -grading is the supertrace Str : A n → k defined as a unique homomorphism of unital k-algebras (projection on the unit). By definition, the supertrace vanishes on supercommutators, i.e., Str 14) The associated bilinear form κ(a, b) = Str(ab) is known to be nondegenerate [126]. This allows one to identify the dual A n -bimodule A * n with the κ-twisted bimodule A n κ. Clearly, 2µ κ = 0 and applying Theorem B.2 yields The coincidence of the cohomology groups (B.8) and (B.15) is a particular manifestation of the duality (B.9).

B.3 The Feigin-Felder-Shoikhet cocycle
An explicit formula for a nontrivial 2n-cocycle τ 2n generating the group (B.15) has been found by Feigin, Felder, and Shoikhet [79] as a consequence of Shoikhet's proof [127] of Tsygan's formality conjecture. In order to write it down we need a couple of definitions.
First, we identify the elements of the Weyl algebra A n with polynomials a(q, p) in (commuting) variables q i and p j endowed with the Weyl-Moyal product and m(a ⊗ b) = ab. Next, we introduce the maps and π 2n (a 0 ⊗ · · · ⊗ a 2n ) = where y 2i = q i and y 2i−1 = p i , 1 ≤ i ≤ n. Finally, we define the homomorphisms µ m : A ⊗(m+1) n → k by µ m (a 0 ⊗ · · · ⊗ a k ) = a 0 (0)a 1 (0) · · · a m (0) . (B.20) Here a(0) is the constant term of the polynomial a(q, p). Notice that all the operators introduced are Sp 2n (k)-invariant.
As the choice of a representative cocycle is not unique, we are free to impose some additional conditions on it. For example, it follows from the long exact sequence (A.46) that the natural embedding I : HC 2 (A 1 ) → HH 2 (A 1 , A * 1 ) is an isomorphism. Therefore, the cocycle τ 2n has to be cohomologous to a cyclic cocycle τ cyc 2n . An explicit expression for τ cyc 2 is obtained, for example, by mere replacement of the symbol φ F F S with (4.14). Using the cup product (A.30), one can then obtain similar expressions for all higher Weyl algebras A n . In terms of the so-called (b, B)-complex the cyclic cocycles on Weyl algebras were first constructed in [128], [129].
B.4 Example: the cohomology of A = A 1 ⋊ Z 2 and A ⊗ Λ The skew group algebra A = A 1 ⋊ Z 2 is a toy model for and a building block of the higher spin algebra in 4d HSGRA. Having in mind this application, we specify the ground field k to be C. The group Z 2 = {e, κ} acts on A 1 by the involution (B.13). Since 2µ e = 2 and 2µ κ = 0, it follows from Theorem B.3 that all nontrivial groups of Hochschild cohomology are HH 2 (A, A) ≃ HH 0 (A, A * ) ≃ C ≃ HH 2 (A, A * ) ≃ HH 0 (A, A) .

(B.22)
Among other things these isomorphisms tell us that the algebra A admits a one-parameter deformation and its center is spanned by the unit.
B.5 The cohomology of (extended) higher spin algebra in four dimensions By definition, the extended higher spin algebra associated with 4d HSGRA is given by the tensor square where A = A 1 ⋊Z 2 is the complex algebra of the previous subsection. It can also be regarded as the smash product of the second Weyl algebra A 2 and the Klein group Z 2 × Z 2 acting on A 2 by symplectic reflections. The associated Lie algebra L(A) contains a finite-dimensional subalgebra sp 4 (R) generated by the homogeneous quadratic polynomials in q's and p's over reals. The well known isomorphism sp 4 (R) ≃ so (3,2) relates this algebra with the group of isometries of 4d anti-de Sitter space, thereby explaining the relevance of the algebra (B.29) to 4d HSGRA. Now the cyclic cohomology of A can easily be computed from the Connes exact sequence. Moving from left to right, we find meaning that the cyclic cohomology groups on the right are obtained by taking cup products of classes (B.23). As the tensor product on the left is over HC • (C), we may fix either factor to be a primary cocycle. This yields the four infinite series: 2n+2 = S n φ 2 ⊔φ 0 .

(B.34)
Here φ 0,2 andφ 0,2 denote the primary cohomology classes of the left and right factors in (B.33). Combining the classes of these series according to their degree, we re-derive the isomorphisms (B.32) above.
Rels. (B.34) also say that HC • (A) is a free HC • (C)-module of rank 4 generated by the products φ 0 ⊔φ 0 , φ 0 ⊔φ 2 , φ 2 ⊔φ 0 , and φ 2 ⊔φ 2 . Again, this allows one to compute the cyclic cohomology of the tensor product A ⊗ Λ from the Künneth isomorphism The result of application of the generators (A.41) to the primary cohomology classes is presented in Table 6. The same complex dimensions of the cohomology groups HC • (A ⊗ Λ) follow directly from Theorem A.3.
When constructing the HSGRA equations of motion it is important to know some of the Hochschild cohomology groups HH • (A⊗Λ, A⊗Λ) that control interaction. These can easily be obtained from (B.30) by the Künneth formula Writing ϕ 0 ϕ 2 ,φ 2 , and ϕ 4 for the basis elements of (B.30), we can produce eight infinite series of cohomology classes that span HH • (A ⊗ Λ, A ⊗ Λ) by taking cup product with the classes ψ ± n defined by (A.37). The result is presented in Table 5, where these classes are grouped according to their degrees. Among these classes only the elements of the series ψ + n ⊔ ϕ 2 and ψ + n ⊔φ 2 are actually relevant to deformation of the free equations of motion 44 . Now we can use the above results on the cyclic and Hochschild cohomology of the algebra A⊗Λ for the description of the Lie algebra cohomology of 'big matrices' gl(A⊗Λ). It is these cohomology groups that control the structure of HSGRA interactions and the corresponding characteristic cohomology. By straightforward adaptation of Theorems A.1 and A.2, we obtain the following two statements.
n dim HH n ψ ± -series  Proposition B.4. The Lie algebra cohomology H • gl(A ⊗ Λ) is an exterior algebra of the graded vector space spanned by the classes of Table 6.
Proposition B.5. The Lie algebra cohomology H • gl(A⊗Λ), gl(A⊗Λ) is a free H • gl(A⊗ Λ) -module generated by the elements of Table 5.
We conclude with some remarks on the relation of the extended higher spin algebra A to the algebra A 0 = A e 2 ⋊ Z 2 underlying 4d HSGRA, see Sec. 4.2. Let us consider first the algebra where Z 2 acts on A 1 by the symplectic reflection (B.13). This action obviously commutes with the full reflection in A 2 defined by the same formula (B.13). The algebra A 0 is now identified with the subalgebra (A 2 ⋊ Z 2 ) Z 2 ⊂ A 2 ⋊ Z 2 of elements that are invariant under the full reflection. It is generated by the even polynomials in q's and p's. Since both the algebras A 2 ⋊Z 2 and (A 2 ⋊Z 2 ) Z 2 are simple and the full reflection is an outer automorphism, the algebra A 0 = (A 2 ⋊ Z 2 ) Z 2 is Morita equivalent to the skew group algebra (A 2 ⋊ Z 2 ) ⋊ Z 2 , see [130,Thm. 2.5]. On the other hand, as the actions of Z 2 groups commute to each other. This means the Morita equivalence As a consequence, all our computations collected in Table 6 and summarized in Proposition B.4 hold true for the algebra A 0 .
n dim HC n λ + -series λ − -series Table 6: The cyclic cohomology classes of the algebra A ⊗ Λ. As is seen, the dimensions of the groups HC n (A ⊗ Λ) stabilize starting from degree four.