it could be your lockring. if you dont tighten your cog enough first time and then it gets naturally tightened by you pedalling then because the lockring hasn't been tightened in turn there is a small amount of 'give' between the cog and lockring ie the cog can slip slightly either way.