'04/'05 had same engine as the '04/'05 STi. '06-'08 have similar engine as the WRX, except for the compression ratio being a bit higher, 8.2:1 vs. 8.4:1. I'm not sure if it's just pistons, or if the volume in the heads is different. Cranks seem to be the same on all of them, rods probably are also. Not sure about STi cams vs. WRX and ours. There is alot of conflicting info about this for some reason, but I've seen threads with posts by shops breaking this down, and the consensus is all USDM engines are very similar with cast pistons being the weak link.
Stan