Even ignoring the observations we can make, the computers have maps programmed in. Yes they do know the locations of intersections, no training necessary.
And the usual setup of an autonomous car is an object recognition system feeding into a rules system. If the object recognition system says an object is there, and that object is there, that's good enough to call "knowing" for the purpose of talking about what the cars should do.
Or to phrase things entirely differently: Finding lights is one of the easy parts. It's basically a solved problem. Cutting your speed when there isn't a green or yellow light is table stakes. These cars earn 2 good boy points for that, and lose 30 for blocking the road.