I'm pretty sure the aliens were the advanced descendents of robots, come to study their forebearers. But the scenes at the end are probably meant to be slightly ambiguous. However, there are many hints in the dialogue that they are, in fact, advanced robots.
From sfy.ru -AI script:
These machines were trapped under the wreckage
before the freezing. Therefore, these robots are originals. They knew
The aliens say "these robots are originals", suggesting that they are taking special note of the fact these are prized first-gen robots.
Scene before the end, explaining the beings' interest in humanity:
David, I often felt a sort of envy of human beings and that
thing they call 'spirit'. Human beings had created a million
explanations of the meaning of life in art, in poetry, in mathematical
formulas. Certainly, human beings must be the key to the meaning of
existence, but human beings no longer existed.
David, you are the enduring memory of the human race, the most lasting
proof of their genius. We only want for your happiness. David, you've
had so little of that.
The "aliens" obviously have the total record of humanity on file. Which while possible for a true alien, would be much more difficult to achieve.
The robots felt that they lacked something the humans had. One would think the writers are suggesting that the robots lack a soul of some sort (I bet Kubrick would have left that kind of cheesy bit out). Or some form of existentialism or lack of passion has driven the advanced robots to seek a purpose for existence in their ancient human creators.