  This work builds on earlier work of the first three authors where a notion of
congruence modules in higher codimension is introduced. The main new results
are a criterion for detecting regularity of local rings in terms of congruence
modules, and a more refined version of a result tracking the change of
congruence modules under deformation is proved. Number theoretic applications
include the construction of canonical lines in certain Galois cohomology groups
arising from adjoint motives of Hilbert modular forms.
