been applied at redshifts higher than $\sim$2. The aim of this paper is to extend the studies of dust emission and gas fractions derived from dust masses to z$\sim$4 and analyze possible differences in trends as redshift increases.\
In this paper, we combine the information provided by the *Herschel* data and a mass-selected sample of galaxies built from the UltraVISTA data [@Ilbert2013] in COSMOS to study the mean dust emission of galaxies up to z=4 (Sect.\[data\]). We measure the mean SED of galaxies on the main sequence and strong starbursts using a stacking analysis. We then deduce the mean intensity of the radiation field and the mean dust mass in these objects using the @Draine2007 model (Sect.\[stackfit\]). We discuss the observed evolution of these quantities in Sect.\[results\] and the consequences on the nature of star formation processes at high redshift in Sect.\[discussion\]. Throughout this paper, we adopt a $\Lambda$CDM cosmology with $\Omega_m = 0.3$, $\Omega_\Lambda = 0.7$, $H_0 = 70$km/s/Mpc and a @Chabrier2003 initial mass function (IMF).\

Data
====

Stellar mass and photometric redshift catalog using UltraVISTA data {#masscat}
-------------------------------------------------------------------

Deep Y, J, H, and K$_{\rm s}$ data (m$_{\rm AB, 5\sigma} \sim$ 25 for the Y band and 24 for 