>How does a home invader know if I am armed?
They don't. As with many things in life, they have to estimate that risk. A would-be home invader correctly estimates this particular risk to be higher in jurisdictions where guns are legally permitted -- and especially in areas where keeping a gun in the house is known to be common.
Does that would-be home invader themselves own a gun that they are prepared to use, which would tend to neutralise this risk? Possibly. I don't know how that probability varies with legality of gun ownership, but I would expect that in both cases (gun ownership legal, gun ownership illegal), more home invaders than home owners have access to guns. If that's true, then more home owners with guns fired act as a deterrent.
>It seems like it instead paves the road to escalating to violence in less-severe scenarios.
Yes, it probably also (not "instead") does this. There's no dichotomy here.
At the end of the day, the reasons for and against legalising gun ownership are similar to the reasons for and against arming your military. Doing either one raises the stakes -- the hope (assumption) being that the other party will then find the stakes too high to engage, even if they themselves are similarly armed.