There is a TSB for that, but when I took mine with the TSB to the dealer, they said mine doesn't apply since it's a newer VIN number. Mine was built September 2013, and still has that rattle. They applied some padding anyways, and told me that my aftermarket tint is adding more to the rattle. I don't believe them, and it's still not fixed.
It's pretty stupid that Mazda designed it to rattle so much. Keep the window open about 1 inch, and if I close the door, it almost feels like the windows would crack.
My passenger side visor also rattles time by time. It's just a tad loose, and hits against the ceiling. These small things make the car feel cheap.