We characterize Yang--Mills connections in vector bundles in terms of covariant derivatives of stochastic parallel transport along variations of Brownian bridges on the base manifold. In particular, we prove that a connection in a vector bundle $E$ is Yang--Mills if and only if the covariant derivative of parallel transport along Brownian bridges (in the direction of their drift) is a local martingale, when transported back to the starting point. We present a Taylor expansion up to order $3$ for stochastic parallel transport in $E$ along small rescaled Brownian bridges and prove that the connection in $E$ is Yang--Mills if and only if all drift terms in the expansion (up to order 3) vanish or, equivalently, if and only if the average rotation of parallel transport along small bridges and loops is of order $4$.
"Yang--Mills fields and random holonomy along Brownian bridges." Ann. Probab. 31 (2) 769 - 790, April 2003. https://doi.org/10.1214/aop/1048516535