I have had over half my games where the dogs did not attack me and a couple games where they did. I think its just random, like maybe each game has a % chance of the dogs being friendly. Not sure. If I play the beginning enough times I might see a pattern. It could be triggered by some small event.
For example. The last game I played the dogs were friendly but There was just one dog, the one named Lar that attack me (The one in the Blue boar Inn). I remeber Raze saying that if you go to the Dwarven village before you go to the Blue Boar inn that the dog Lar is in the back room instead of the dwarf who want to give you a gem.
In this game where the dogs are hostile I wetn to the blue Boar Inn 1st and talked to the dwarve in the back room and just as I got outside a dog chased me and then another joined it. Its possible that this is the scenario that determines whether dogs are friendly or hostile.
I suppose I could confirm it be saving before I go to either the village or the Blue Boar Inn and seeing what the dogs do after I try both orders a few times. I'll save this experiment for when I get real bored some time.
edit- also when Lar is in the game, I do not attack him but leave and he doesn't follow me. Then the doags are still friendly except for him. If I killed Lar its likely the other doags might then be hostile as well.
I don't use any meat from the dogs, it seems a bit wierd. Like when the kitty in Aleroth got killed and didn't pick up the meat. That would be cruel. There should be an option to bury the cats and dogs 9or creamate) and have a funeral in a pet cemetary.