So far, I have canceled a few interviews via email but have not received confirmation. Of course, we should cancel/decline as soon as possible so that other applicants can be offered the spot. I think that 'a couple of days before' would not provide adequate time for other applicants to be notified and for travel arrangements, but better to let them know than not to show up at all. And it's better to cancel late than to waste your own time or the program's time.