CD8 T cell dysfunction is observed in diverse settings of chronic antigen exposure, including in cancer and chronic viral infection. We carried out a unified analysis of over 300 ATAC-seq and RNA-seq experiments across studies of CD8 T cell dysfunction in cancer and infection to define a shared differentiation trajectory towards terminal dysfunction and underlying transcriptional drivers and reveal a universal early bifurcation of functional and dysfunctional T cell activation states. We further dissected acute and chronic viral infection using scATAC-seq and allele-specific scRNA-seq to identify state-specific transcription factors and capture the emergence of highly similar TCF1+ progenitor-like populations at an early branch point, at which epigenetic features of functional and dysfunctional T cells diverge. We will also present recent work in the group to develop predictive models of gene regulation by incorporating 3D connectivity data from chromatin conformation capture data sets. Our framework uses graph neural networks to predict gene expression from 3D connectivity data from 1D epigenomic inputs or from genomic DNA sequence. We will show how to use feature attribution on the trained models to identify functional enhancers for genes, as validated by CRISPRi screens.