1. You have to try and beat him on the transition. As he is passing or coming into the position is your chance to shrimp, scoot, get on your hip, get your arms where they are supposed to be(they are supposed to be tucked underneath his arm, 2nd option is making a frame in his neck to keep him from pinning ... but ALWAYS go for underneath his arm. For example, if he passed to your right, your left arm should be under his right armpit. Everyone should know this, and if you wait till he pins you its hard to get out. This prevents any arm attacks and gives you leverage to keep the pin off. If you have to go for the frame because you cant get the arm under, forearm in the throat and hand cupped around his shoulder... life with the wrist and watch the look on his face as he tries to pin. This isnt as good because he can fight for the arm.
2. If you get stuck, arm out, you have to hide it and bend it and fight it to hold of the submisstion.... again try and put the arm where it is supposed to go, and be working for the 1/2 guard. Once you get to 1/2 you can then work your 1/2guard game or try for the full guard.
3. Have your partner put you in side mount kimura, arm bar, americana etc... and work fighting them off and getting your arms where they need to be. Also work him passing and training yourself to beat him during the transition. This has to become habit, or you will get stuck over and over.