A general approach to characterize compositional heterogeneity in polymer thin films using Fourier transform infrared (FTIR) spectroscopy has been demonstrated Polymer films with varying degrees of heterogeneity were prepared using a model chemically amplified photoresist where a photoacid catalyzed reaction-diffusion process results in the formation of methacrylic acid (MAA)-rich domains. Within these domains, the carboxylic acid groups dimenze through hydrogen bonding. FTIR measurements of the relative fraction of hydrogen-bonded versus free carboxylic groups are used to quantify the degree of compositional heterogeneity. It was shown that the degree of the spatial heterogeneity varies with changes in the deprotection level and initial copolymer composition. The degree of heterogeneity is small at very low and very high deprotection level and maximize when the deprotection level is around 0.25. Increased non-reactive comonomer content decreases the degree of heterogeneity by reducing the hydrogen bonding efficiency.