Sometimes soy sauce flavors can come from oxidation and even autolysis, but since this problem is unique to your dark beers and fades over time, it is unlikely to be the culprit.
Do you brew extract or all grain? Do you use any Black Patent in your stouts and porters? What water do you use, and do you adjust it in any way?
If you brew extract, you may consider switching to a light malt extract and increasing the amount of roasted malts in the steep to compensate for the color/flavor difference.
Back off on the black patent - in porters, use chocolate malts (I like Briess Dark Chocolate 420L), and in stouts use Roasted Barley (and some chocolate malt if you wish).
As for the water, if you are not comfortable with mineral additions, I'd suggest a 50/50 blend of RO and spring water, assuming your spring water comes from a limestone aquifer and has a decent amount of carbonates in it. That's a wild stab in the dark, but usually results in a balance of minerals that suits these kinds of darker beers.