I have a pomeranian that does this at odd times, it's getting better though. What I quickly learned with Dakota, it's not always based around what the boundaries/punishment is for doing this, as much as it is into finding what SETS it off.
We found him in a Wyoming dumpster a few years back as a puppy, so don't know his history.
It all started a week or so after we got him. For one thing, this dog is a VERY heavy sleeper, and the first time it occured, we had accidently startled him, he came out with a parania type attitude and biting. Not just a nip or two, no this dogs mouth moves in a speed of light type action with little parania bites on your hand. It's hard to explain, but when you look into his eyes during this time, it's like he doesn't even know who he is, like he's wigged out and on drugs...it's really weird.
Other times of his parania type biting began occuring....like when someone would wear yellow and try to come near him; or when someone would try to put him either on their lap or on the floor when HE wasn't ready; there were many many instances when the biting would occur. In the beginning, and even now, we never get upset with him cause we can tell he doesn't know what he was doing....he'd shake his head almost immediately and then be back to the sweet little Pom.
We've had him a few years now...we've learned a few things that set it off, for one, he's highly allergic to sage and dairy, either one of those come in contact with him and he'll be hell on wheels for a day or so; one other HIGHLY cause of his anger was the fact that he has bad luxating patella's, it took us quite a few vet visits to determine that this was the leading cause of his ferocious attacks at times. He's been on Glycoflex for over a year and it's made a remarkable difference in his overall attitude.
He's come a LONG way...in the beginning people couldnt' understand why we kept him, cause this little 6# dog can REALLY tear your skin apart literally, but we've learned together what makes him tick, and overall, he's a very sweet dog to own...just do NOT disturb him or even think about coming close to him while he's resting, no kidding, this dog sleeps so heavily that it's scary at times. If there was ever a house fire, he'd never be able to move fast enough.
His true to the saying....Let sleeping dogs lie!
One corrective behavior we use on Dakota when he starts the paranoa attitude is a squirt bottle...no harming him, just water in the face, quickly puts his brain back in check and we don't get bit, cause man IT HURTS! He has razor like teeth that just shred the skin.