That operator looks eerily similar to the one in Clifford Algebra. And C.A. generalizes nicely* out of 3D, too.

* I found that current Clifford Algebra Python libraries don't handle high dimensional (even 32D, fairly primitive by ML standards) spaces.

Time to give Julia a shot! It has this amazing package [1] for geometric algebras in up to a very high number of dimensions.

[1]: https://github.com/chakravala/Grassmann.jl