Here’s some techniques you can do when you have guard position, but your opponent pins your arms to the floor.
These are demonstrated on the Submission Master Grappling Dummy.
First, you can take your arms over your head, then switch direction quickly and be under your opponents arms.
Second, you can put your foot on his hip and shrimp your hips to one side. That gives you space to put a knee inside of his arm and drive it off your biceps.
You can continue the above tactic by continuing to a straight arm lock.
The next technique is to take your arms over head, grip his wrist, then go to an arm bar.
If your opponent puts his hands too close to your arm pits, you can grip your
hands together to put enough pressure on his wrists that it becomes painful and he has to release.
If he puts his head to your chest and follows you side to side, fake to one side, then quickly sit up to the other side.