According to the police, the incident occurred yesterday near the college where the youth was studying and they got to know about it only through media reports.
A purported video of the incident has gone viral on the internet showing around half-a-dozen men thrashing the student.
It was alleged that he had also made comments, which were later deleted, against the ongoing Cauvery water agitation in Karnataka on the social media.
The group is understood to have let off the youth, who was born and brought up in the city, after he apologised, police said, adding that none of the sides came forward to register any complaint.
"I appeal to Twitter users to not support any hate campaign. It is irresponsible and mischievous to support hate messages of any kind," he has tweeted.
Protests by farmers and pro-Kannada outfits have been reported from several parts of the state since the Supreme Court order asking Karnataka to release water to Tamil Nadu.