How is a difference-in-differences model represented in a causal diagram (or directed acyclic graph)? Unlike a standard causal model with A = Treatment, X = Confounder, and Y = Outcome:

a difference-in-differences (DiD) model is concerned with estimating the Average Treatment Effect on the Treated (ATT) $= E(Y_1-Y_0|A=1)$.
Hence we're interested in the causal effects of confounders on the trends in the outcome over time (pre and post periods) between the treatment and control groups. (See see Daw & Hatfield (2018) and Zeldow & Hatfield (2021))
Therefore, for the purposes of drawing a DiD causal diagram is it as simple as replacing Y with ATT:

or perhaps $Y_{post} - Y_{pre}$?


Here, the outcome of interest
is the difference between the pre- and post-treatment period, $Y1 - Y0$. This difference is influenced by the
treatment, unobserved factors $U$, and observed covariates $X$. The dashed arrow between $U$ and $A$ indicates a
statistical dependency between the variables, but where we remain agnostic to the precise causal mechanism.
For example, in the minimum wage example, $U$ might be the average income in restaurant’s neighbourhood,
which is dependent on the state, and hence also the treatment.
Source:https://github.com/probml/pml2-book/releases/tag/2022-10-16
