Electromagnetic duality symmetry This question arose while reading http://prd.aps.org/abstract/PRD/v13/i6/p1592_1 (Duality transformations of Abelian and non-Abelian gauge fields, by Stanley Deser and Claudio Teitelboim). It is well known that the source-free Maxwell equations $dF=0,\;d\;^\star F=0$ are invariant under duality transformations  $$\mathbf{E}^\prime=
\cos{\theta}\;\mathbf{E}+\sin{\theta}\;\mathbf{B},\;\;\mathbf{B}^\prime= 
\cos{\theta}\;\mathbf{B}-\sin{\theta}\;\mathbf{E}\;\;\;\;\;\;(1),$$ while the action functional
$S=\frac{1}{2}\int\limits_{-\infty }^{\infty }dt\int\limits_{R^3}dV\;[\mathbf{E}^{2}-\mathbf{B}^{2}]$ is not. In fact the duality 
symmetry of the action should be implemented on the level of dynamical coordinates, that is the transverse part of the vector potential $\mathbf{A}_{\perp}$, with $\mathbf{\nabla}\cdot \mathbf{A}_{\perp}=0$. In temporal $A_0=0$ gauge, the action functional is $S=\frac{1}{2}\int\limits_{-\infty }^{\infty}dt\int\limits_{R^3}dV\;[\mathbf{\dot{A}}_{\perp }^{2}-\left( \mathbf{\nabla }\times \mathbf{A}_{\perp }\right) ^{2}]$.
Deser and Teitelboim give an explicite (non-local) implementation of such a symmetry transformation as $$\mathbf{A}_{\perp }^\prime=\cos{\theta}\;\mathbf{A}_{\perp }-\sin{\theta}\;\nabla^{-2}\mathbf{\nabla}\times\dot{\mathbf{A}}_{\perp }\;\;\;\;\;\;(2),$$ and show that the action is invariant under the infinitesimal version of (2) because such a transformation alters the Lagrangian by a total time-derivative term (of Chern-Simons type) if sufficiently rapid falloff of fields at spatial infinity is assumed. The generator of this infinitesimal transformation, given by Deser and Teitelboim, is (in the sense that the changes in $\mathbf{E}$ and $\mathbf{A}$ are given by the Poisson brackets of those quantities with $\theta G$)
$$G=\frac{1}{2}\int\limits_{R^3}dV\;(\mathbf{B}\cdot\nabla^{-2}\mathbf{\nabla}\times\mathbf{B}+\mathbf{E}\cdot\nabla^{-2}\mathbf{\nabla}\times\mathbf{E})\;\;\;\;\;\;(3),$$ where $\mathbf{E}=-\dot{\mathbf{A}}_{\perp }$ and $\mathbf{B}=\mathbf{\nabla }\times \mathbf{A}_{\perp}$.
What is the finite transformation generated by (3)? It can not be (2), because on the mass shell, when $\ddot{\mathbf{A}}_{\perp }=\nabla^2 \mathbf{A}_{\perp }$, (2) reproduces (1) under which the action is not invariant (acquires a scale factor $\cos^2{\theta}-\sin^2{\theta}$ after the total time-derivative part is neglected).
Is here any analogy with the Wess-Zumino term which is closed (as a differential form) but not globally exact?
 A: If one considers the reduced phase space of the electromagnetic field,
i.e., the space of the fields and their conjugate momenta modulo gauge transformations (which is an infinite dimensional symplectic space), then the electric-magnetic duality can be obtained from the Hamiltonian version of the Noether's theorem, given for example in Marsden and Ratiu: Introduction to mechanics and symmetry theorem 11.4.1.
This is basically what Deser and Teitelboim performed when they restricted the vector potential to be transversal. In this point of view, the quantity $G$ is the momentum map associated with the symmetry.
This approach is advanced by Przanowski, Rajka and Tosiek, where they find a family of nonlocal symmetries of the sourceless Maxwell theory generalizing the electric magnetic duality. 
In particular, they are able to explain, along the same lines, what is known as the Lipkin's
zilch symmetry (D. Lipkin. Existence of a New Conservation Law in Electromagnetic Theory - 1964. J.Math.Phys.,5,696 ).  Please see a modern exposition of this symmetry in the following article  by Philbin.
Przanowski, Rajka and Tosiek used the Fourier modes of the fields as their canonical variables. They reduced the gauge symmetry by implementing the Gauss’s law and working in the Coulomb gauge. They reasoned that this infinite family of symmetries can be considered as Lie-Bäcklund transformations of the Maxwell's equations. 
The answer to your second question is that the finite transformation associated with the generator $G$ is indeed the electric-magnetic duality transformation. Przanowski, Rajka and Tosiek computed the finite transformation for the zilch symmetry explicitly in their article, and they wrote all the equations needed to do the same computation for the electric-magnetic duality transformation.
Now, according to the Lagrangian version of the Noether’s theorem, the Lagrangian must be on shell invariant or change by a total time derivative upon the application of the symmetry transformation. This is indeed true in our case (in the Coulomb gauge), the variation is proportional on shell to the time derivative of the electromagnetic field helicity  density:
$$ \frac{d}{dt} \int d^3x \mathbf{E}.\mathbf{A} \propto   \int d^3x(\mathbf{E}^2 - \mathbf{B}^2 )$$
