From this online document, it is assumed that we have a treatment and control group, with $N_1$ and $N_0$ being the number of treated and control units, respectively. $D$ is the treatment variable while $Y^1$ and $Y^0$ are the treated and control potential outcomes. Then, they define a "Native" Average Treatment Effect and decompose it into the ATE, Selection Bias, and Differential Effect Bias.
\begin{align} & E\left[\frac{1}{N_1} \sum_{i:d_i=1}{Y_i} - \frac{1}{N_0} \sum_{i:d_i=0}{Y_i}\right] \\ & \\ & = \underbrace{E[Y^1 | D=1] - E[Y^0 | D=0]}_{\text{NATE}} \\ &= \underbrace{E[Y^1 - Y^0]}_{\text{ATE}} + \underbrace{E[Y^0 | D=1] - E[Y^0 | D=0]}_{\text{Selection bias}} + \underbrace{E[D]*(E[\Delta | D=1] - E[\Delta | D=0])}_{\text{Differential effect bias}} \end{align}
I am uncertain if the third line holds without assumptions, as I cannot figure out how it is derived. Are there certain assumptions invoked above?