You do not need to attack anyone to aggro guards/npc. You can aggro guards with any of the following:
- Having a guard or NPC witness a Theft/Stealing.
- NPC finds evidence of items being looted/stolen (I looted Priestess Gut's room without anyone seeing, she then goes into the room and immediately notices things were taken and blamed it on me)
- Lockpicking or opening a chest with a red border, in front of a guard/NPC
- Lockpicking or entering a door with a red border, in front of a guard/NPC
^ Basically if they witness your crime, have evidence of your crime, or see anything you are not supposed to be doing, they will call you out for it. From what I can tell, the AI is behaving correctly.
If you want the save state to go back to normal, you need a save file before you spoke to any NPCs, and preferably before you entered that floor.