A discrete value like ID can not be antialiased because each pixel can have one value only and interpolating them is meaningless. If you need antialiased mattes you can render them as separate renderlayers and use alpha as matte or supersample the ID passes - render them in higher resolution, pull the mattes and downscale the mattes to comp resolution.
Thanks. I’ll give this a go. This solution might work with another answer I found that overrides and randomises the material colour in a scene and renders them flat. From which I think you could easily generate masks for a complicated scene in an image editor.
Richard Merklew posted a suggestion here, using a random node, colour ramp and emission node to generate a multi colour, material ID-like output from which you could lift object masks in an image editor.