Moduli of stable and semistable $G$-Higgs bundles on curves Let $X$ be an irreducible smooth projective curve of genus $g \geq 2$ over $\mathbb{C}$. Let $G$ be a connected reductive affine algebraic group over $\mathbb{C}$. Let $\mathcal{M}_{G,Higgs}^s$ (resp., $\mathcal{M}_{G,Higgs}^{ss}$) be the moduli space of stable (resp., semistable) principal $G$-Higgs bundles on $X$. Is it correct that the codimension of the complement of $\mathcal{M}_{G,Higgs}^s$ inside $\mathcal{M}_{G,Higgs}^{ss}$ has codimension at least $2$? Can anyone give reference for this? Is it true that the same holds for the case of moduli stack of $G$-Higgs bundles also? 
 A: As far as I know this is an open problem outside the case $G=GL_n(\mathbb{C})$ or $G=SL_n(\mathbb{C})$.
In those cases, work of Simpson (Moduli of representations of the fundamental group of a smooth projective variety II, Publications Mathématiques de l'IHÉS,  Volume 80  (1994),  p. 5-79)
implies the moduli spaces of Higgs bundles is normal (he proved it for $G=GL_n(\mathbb{C})$, but his proof works for $G=SL_n(\mathbb{C}$)).  Hence, the singular locus is in codimension at least 2 (as is clear from the reference, I am considering the case of trivial topological type here; that is, bundles with vanishing rational Chern classes).
But in those cases I believe the stable locus is the smooth locus. It is well-known that the stable $GL_n(\mathbb{C})$ or $SL_n(\mathbb{C})$-Higgs bundles are smooth points.  The converse should follow since the underlying holomorphic principal bundle is singular except in the $g=2=n$ case (and in that case the strictly polystable Higgs bundles should be seen to be singular directly).
For general complex reductive $G$, I believe that Simpson's normality result generalizes (although it is open presently).  However, in general, the stable locus is not always the smooth locus (there can be orbifold singularities in the stable locus).  So to establish the codimension result along the same lines as above you would have to consider the orbifold singular locus in the stable locus.  But there should be a proof of the codimension result from this point-of-view regardless.
In fact, I believe the following stronger result holds: the codimension of the stable locus for $G$-Higgs is $\geq 2(g-1)$ for a Riemann surface of genus $g\geq 2$.  Here is a rough outline why:


*

*Let $N$ be the $G$-principal bundles and $M$ the $G$-Higgs and put a $*$ on
each for stable subspace.  The smooth locus of $N$ is open and dense and the cotangent bundle of the smooth locus is contained in $M$ as an open dense subset.  So $\dim M=2\dim N$

*The complement $N-N^*$ consists of polystable and not stable bundles and
so correspond to a direct sum of stable subbundles. This locus is
stratified by smooth sub-spaces and so the top strata determines the
dimension.  Call this strata $S$.  Then the cotangent bundle of $S$ should determine the dimension of $M-M^*$.  Therefore, $\dim(M-M^*)=2\dim(N-N^*)$.

*We have by a theorem of Biswas, Hoffmann $\mathrm{codim}(N-N^*) \geq g-1$ which implies $\dim(N)-\dim(N-N^*)\geq g-1$ which implies $2\dim(N)-2\dim(N-N^*)\geq 2(g-1)$ which implies $\mathrm{codim}(M-M^*) \geq 2(g-1).$  And so we have the codimension is $\geq 2$ if $g\geq 2$.


Step 2 is not obvious since a strictly semistable principal bundle may admit a non-zero Higgs field which make it stable.  But I believe the dimension will be right regardless (unless I am missing something Steps 1 and 3 are correct though).
