I'm not 100% sure, but if the things have some thorns they could be
suckers from a moptop (Robinia). We have suckers from nearby Robinias that pop up and they look and have similar characteristics to the weed you have described, I can't however verify the flower characteristics. If they are Robinia suckers they should be controlled as they can be very invasive and appear some distance from the parent tree.