Are there any motion-analysis algorithms to detect the difference between 2d face motion and 3d face motion?
I assume you are talking about a video.
You can extract 3d landmarks for each one of the frames in the video and then analyze the change in those 3d landmarks to get motion analysis of the face.
A simple way to extract the 3d landmarks is to use https://github.com/1adrianb/face-alignment
So lets say your video as 1..i..N frames and you extracted 3d landmark LMK_i for each frame.
To analyze the motion between the frames you can find the 3d rigib body transformation between LMK_i and LMK_i+1. (example: python implementation of 3D rigid body translation and rotation
After you have the transformation you can extract from the matrix the rotation translation and scale.
Note the motion analysis assumes the camera is stationary and not moving. If the camera is also moving you need to add take into consideration this movement when you calculate the motion analysis