The incident happened on the 3.04pm ScotRail service between Perth and Edinburgh on Wednesday June 7.
A 24-year-old woman was travelling on the service when she saw a man with his jacket lying across his lap.
He was then seen to touch himself inappropriately.
As the train pulled into Inverkeithing in Fife, he became aggressive to the woman and then quickly left the service.
The man is described as white, about 5ft 9in and is believed to be aged around 50-60 with dark, thinning hair.
He was wearing a white shirt with an open collar, black leather jacket and black trousers.