Continuum from collaboration on homework to copying
That is why I have a rule that for each homework a group of students is selected "at random", and asked by the TA to explain what they turned in. The grade of the interrogation replaces the homework grade.

Rationale is that I really don't care (too much) if they copied from the Internet, got it in an obscure book somewhere, or worked it out in a group. I want them to understand, and this forces them to at least be somewhat familiar with the solution they hand in.