Ito drift term of extrinsic Brownian motion aka Mean curvature of intersection of hypersurfaces Suppose we have manifold in the form $M=f^{-1}(\{\vec{0}\})$, where $f:\mathbb{R}^d\to \mathbb{R}^p$ where $p=D-d$, and $f \in C^{\infty}$ ands its Jacobian, $J_f(x)$ has full rank on $M$. Here, we take the convention that the $i$-th row of $J_f(x)$ is $\nabla f^i(x)^T$. The orthogonal projection of a point $y\in \mathbb{R}^D$ to the tangent space $TM_x$ of $M$ at $x$ is given by
$$P(x)=I_{D\times D} -N(x)^TN(x),$$
where $N(x)$ is the matrix obtained by orthonormalizing the rows of $J_f(x)$. See my previous question for a discussion of this.
The Stratonovich SDE of Brownian motion on the manifold $M\subset \mathbb{R}^D$ driven by a $D$-dimensional Brownian motion $B_t$ is simply
$$dX_t = P(X_t)\circ dB_t.$$
For a variety of purposes (simulation, studying Fokker-Planck equation) I have the following
Question
What is the Ito form of the above SDE?
Attempt
Obviously, we start by applying the conversion formula. In this case, the $i$-th component of the drift term in the Ito SDE is given by
$$\mu^i(x)=\frac12 \sum_{k=1}^D \sum_{j=1}^D P_{kj}(x)\frac{\partial }{\partial x_k} P_{ij}(x).$$
Well some simplification are obvious. Let $A(x)=N(x)^T N(x)$. After applying the definition of $P_{ij}(x)$, simplifying the partial, and using properties of $\delta_{ij}$, we obtain
$$2 \mu^{i}(x)=-\operatorname{div} A_{i \cdot} (x)+\sum_{k=1}^D \sum_{j=1}^D A_{kj}(x) \frac{\partial A_{ij}(x)}{\partial x_k}.$$
The first term is the (negative of the) divergence of the $i$-th row of $A=N^TN$. The second term I cannot simplify any further with anything clever.
Special case and connection to mean curvature of hypersurfaces:
I do know if $p=1$, then things simplify a bit. We have instead $P(x)=I-n(x)n(x)^T$ where $n(x)=\nabla f(x)/\|\nabla f(x)\|$ is the unit normal vector to $M$ at $x$. The computations then simplify to
$$\mu^i(x) = -\frac12 \operatorname{div}(n(x)) n^i(x),$$
if I am not mistaken. In this case, then
$$\mu(x)=c(x)n(x),$$
where $c(x)=-\frac12 \operatorname{div}(n(x))$ is actually the mean curvature of $M$. We would be tempted to guess then that in the general case, the drift should contain the mean curvature of $M$ as a factor. Perhaps something like $N(x)^T c(x)$? Here, $N$ is the $p\times D$ matrix defined above while $c$ would be a $p\times 1$ vector. Not sure if this is along the right path, but it leads me to ask: what is the mean curvature of a manifold defined by a set of implicit equations
$$f^1(x)=0,\dotsc, f^p(x)=0?$$
Summary questions
Does anyone have any idea how to simplify the above double summation? Asked in another manner, what is the mean curvature of $M$ in this case?
 A: Update 2/5/2023
Looking into some examples I think my previous guess is incorrect. There is an additional term, that is often zero but not always.
We claim
$$\mu = N^T[q+c],$$
where the $r$-th component of the vector $c$ is given by the mean-curvature vector in the direction of the normal vectors
$$c^r = -\frac12 \operatorname{div}(n_r),$$
$n_r$ is the transpose of the $r$-th row of $N$, and
$$q^r = \frac12 \operatorname{Tr}(N J_{n_r} N^T),$$
for $r=1,2\dotsc, p$.
The proof is relatively straightforward actually. One continues from the expression obtained in the OP
$$2 \mu^{i}(x)=-\operatorname{div} A_{i \cdot} (x)+\sum_{k=1}^D \sum_{j=1}^D A_{kj}(x) \frac{\partial A_{ij}(x)}{\partial x_k}.$$
Plug in the expression for the entries of $A=N^T N$, apply product rule, one term will cancel after everything and we will be left with
$$\sum_{k=1}^D \sum_{j=1}^D \sum_{r=1}^p \sum_{l=1}^p N_{lk} N_{ri} N_{lj} \partial_k [N_{rj}]-(N^T c)^i.$$
The first term is exactly, after a little thought, $(N^T q)^i$, as defined above. This completes our sketch.
Older answer/guess
This will be an incomplete answer, but I believe I found the correct expression. I have verified it for many examples but have yet to completely derive it in general. Nevertheless, the drift, I claim, is given by
$$\mu(x)=N(x)^Tc(x)$$
where $c(x)$ is the vector of mean curvatures in the direction of the (ortho)normal vectors to the manifold making up the rows of $N$, i.e.
$$c^i(x)=-0.5 \operatorname{div}(n_i(x))$$ where $n_i$ is the $i$-th row of $N$ written as a column vector.
Again, I don’t have proof yet but I will add it as soon as I can flesh it out, but if someone beats me to it, I’ll be just as happy, so I figured I would share the claim as answer.
