Depends. Spencer's a genius, that's for sure. Ali's cleverness comes from her ability to manipulate people, which, I believe, is what got her in this whole mess in the first place. So I'm not sure she's all that clever. Ezra's a teacher and got them, and some of us, like me, fooled with his nice teacher act.
So, I would say it's very close between Ezra and Spencer.
Spencer is basically a genius and although Ezra is a teacher Spencer was smart enough to figure out all about his past with Alison. Ali is also pretty smart due to the fact that she stayed hidden for so long but most of that was due to Mona. So I'd say Spencer. Melissa is also clever. Mona is also extremely smart, like she says to Spencer 'You're not the only genius in this car!'.