  Detection and attribution (D&A) studies are cornerstones of climate science,
providing crucial evidence for policy decisions. Their goal is to link observed
climate change patterns to anthropogenic and natural drivers via the optimal
fingerprinting method (OFM). We show that response theory for nonequilibrium
systems offers the physical and dynamical basis for OFM, including the concept
of causality used for attribution. Our framework clarifies the method's
assumptions, advantages, and potential weaknesses. We use our theory to perform
D&A for prototypical climate change experiments performed on an energy balance
model and on a low-resolution coupled climate model. We also explain the
underpinnings of degenerate fingerprinting, which offers early warning
indicators for tipping points. Finally, we extend the OFM to the nonlinear
response regime. Our analysis shows that OFM has broad applicability across
diverse stochastic systems influenced by time-dependent forcings, with
potential relevance to ecosystems, quantitative social sciences, and finance,
among others.
