We study solution sets to systems of generalized linear equations of the form ℓi(x1, x2, · · · , xn) ∈ Ai (mod m) where ℓ1, . . . , ℓt are linear forms in n Boolean variables, each Ai is an arbitrary subset of Zm, and m is a composite integer that is a product of two distinct primes, like 6. Our main technical result is that such solution sets have exponentially small correlation, i.e. exp − Ω(n) , with the boolean function MODq, when m and q are relatively prime. This bound is independent of the number t of equations. This yields progress on limiting the power of constant-depth circuits with modular gates. We derive the first exponential lower bound on the size of depth-three circuits of type MAJ ◦ AND ◦ MODA m (i.e. having a MAJORITY gate at the top, AND/OR gates at the middle layer and generalized MODm gates at the base) computing the function MODq. This settles a decade-old open problem of Beigel and Maciel [5], for the case of such modulus m. Our technique mak...