Dogs pick up on your body language a lot more - a lOT more - than you think.
Your dog has an idea that it may be punished - not that it has done something wrong.
The feeling of fear that it experienced after doing something it shouldn't have stays with the dog, not the memory of what it did wrong. So, while it knows that punishment is likely, it does not remember the action that caused the fear and therefore what the anger or punishment is for. The dog can not feel guilty for the action.

Scientifically this can be proved....
A dog that is house trained when the owner is at home but messes when left for more than two hours (20 dogs were studided and all exhibited the same behaviour) will act "guilty" when the owner returns.
If half the dogs are taken into the room where they have messed and half are taken into a different room (controlled by only having access to one room other than the living room) all show the same behaviour. The dogs taken to the room they haven't messed in still act "guilty".
Take this a step further and admonish verbally the "guilty" looking dog - it will make no difference if the punishment is given in the clean room or the dirty room. The dog accepts the punishment, clearly not understanding what it is for and waits for the owner to become friendly again before losing the "guilty"look.
It is simply a reaction to fear and percieved status.

If the human really thinks the dog is displaying guilt there is a real danger that the dog will never learn exactly what is right and wrong. It is also highly confusing for the dog to be recognised instantly the owner comes home ( a respectful gesture from the owner towards a higher ranking dog) and then that recognition turning into dissaproval. The dog doesn't know why the dissaproval is apparent but is further confused by the conflicting signals of being treated as Alpha one second and omega the next.

Sorry - I'm going on rather a LOT on this one, had you noticed??

Oh, you had..........ummmm