A set of problems which includes for example the Langevin equation, a spin system in a random magnetic field or the quantization of gauge theories, share a common algebraic structure: the field from which correlation functions are calculated is given by a local equation in terms of a second field (called generically in this article the noise) for which a probability distribution is provided. For all these problems one can construct an effective action which is automatically BRS invariant (in special cases it is even supersymmetric). This BRS invariance is responsible for the structural stability of the effective action after renormalization. These properties are illustrated on the Langevin equation. A Langevin equation associated with two-dimensional field theories on manifolds is presented.