Jeans escape

Jeans escape is classical a thermal escape mechanism. It is the escape of individual molecules from the high tail of the Maxwell distribution, at a level in the atmosphere where the mean free path is comparable to the scale height. Maxwell's distribution prescribes the kinetic energy distribution of the molecules, which depends on the mass and the velocity according to $$E_{\mathit{kin}}=\frac{1}{2}mv^2$$.

From this dependence, we see that the more massive a gas molecule is, the lower its average speed at a given temperature, meaning it is less likely to reach escape velocity and leave the atmosphere. This is why hydrogen escapes from a given atmosphere more easily than carbon dioxide. Also, if the planet has a higher mass, the escape velocity is greater, and fewer particles will escape. This is why the gas giant planets are able to have significant amounts of hydrogen, while they escape on Earth. The distance to the star also plays a part; a close planet has a hotter atmosphere, which generally leads to a faster range of velocities, and more chance of escape. This helps Titan, which is small compared to Earth but further from the Sun, keep its atmosphere.

The mechanism of Jeans escape regarding Helium in atmosphere
"Above exosphere (exobase) collisions between molecules are so infrequent as to be negligible and below which collisions are sufficiently frequent to maintain a completely isotropic and random distribution of molecular velocities. At or below the exosphere, therefore, the velocity distribution of the molecules of a given atmospheric constituent is the Maxwellian distribution. Since collisions are negligible above the exosphere, the molecules in this region, called the exosphere, move along ballistic trajectories under the action of the earth’s gravitational field. Some of the upward-moving molecules have velocities sufficiently great to carry them on hyperbolic trajectories away from the earth, into space."