  Let $G$ be a simple complex group of adjoint type. In his unpublished work,
Z. Yun associated to each $\theta$-group $(G_0, \mathfrak g_1)$ and a vector
$X\in\mathfrak g_1$ a flat $G$-connection $\nabla ^X$ on $\mathbb
P^1-\{0,\infty\}$, generalizing the construction of Frenkel and Gross in [FG].
In this paper we study the local monodromy of those flat $G$-connections and
compute the de Rham cohomology of $\nabla^X$ with values in the adjoint
representations of $G$. In particular, we show that in many cases the
connection $\nabla^X$ is cohomologically rigid.
