We study the equation E_fc of flat connections in a fiber bundle and discover a specific geometric structure on it, which we call a flat representation. We generalize this notion to arbitrary PDE and prove that flat representations of an equation E are in 1-1 correspondence with morphisms f: E\to E_fc, where E and E_fc are treated as submanifolds of infinite jet spaces. We show that flat representations include several known types of zero-curvature formulations of PDE. In particular, the Lax pairs of the self-dual Yang-Mills equations and their reductions are of this type. With each flat representation we associate a complex C_f of vector-valued differential forms such that its first cohomology describes infinitesimal deformations of the flat structure, which are responsible, in particular, for parameters in Backlund transformations. In addition, each higher infinitesimal symmetry S of E defines a 1-cocycle c_S of C_f. Symmetries with exact c_S form a subalgebra reflecting some geometric properties of E and f. We show that the complex corresponding to E_fc itself is 0-acyclic and 1-acyclic (independently of the bundle topology), which means that higher symmetries of E_fc are exhausted by generalized gauge ones, and compute the bracket on 0-cochains induced by commutation of symmetries.