Have been using iPhone these years, 4 to 5 yo 6 plus. Came to the dark side last week, got a Samsung Galaxy Note 4 with Android 4.4.4. Have been quite happy with Android, embracing an open world which makes just can't use a phone properly...

Issue

Installed Google Pinyin input method, but randomly, every few minutess, the input method just reverts back to the Samsung default one.

Cause

Greenify! I guessed it.
If Google Input Method is added to Greenify, then this is most likely your issue, just remove it and the issue will be gone.