Asme Sahimi was attacked outside her place of work. "They kind of watched and went about their day," she said. At the time, Ms Sahimi, 33, was a project co-ordinator for the NSW government. The attack happened in full view of her workplace. "Not even the people who I bought coffee from every day said anything," she said. "They were right in front of me and I was visibly distraught. He was spitting on me."

Ms Sahimi's traumatic experience occurred last year, but a recent spate of attacks on Muslims, and vision of a racist attack on a Brisbane train guard on Sunday, have prompted questions about when to step in if you see someone being physically or verbally abused. In the past three weeks at least 30 Muslims have been attacked. There is the occasional tale of heroism.

Earlier this month, a group of skaters in Newcastle stopped an attack on two Muslim women wearing a hijab. "People need to know that this is not OK," said Patrick Burgess, one of the skaters who stopped the abuse. "The way this situation has got is so not acceptable, and people need to start taking action and actively condemning this sort of activity." Last week, students from Macquarie University launched the Muslim Hate social experiment. The video shows members of the public in Sydney's Hyde Park stopping offensive verbal attacks against young Muslim men and women. "We wanted to stage a social experiment to see how entrenched Islamophobia is," said one of the members of the group, Hannah el-Gashingi.

"We were overwhelmed by the response. "Every time we initiated an attack, someone stepped in." The director of the health psychology unit at the University of Technology, Sydney, Rachel Murrihy said the decision whether or not to step in to protect another is called the bystander effect. There are a number of factors at play, including the number of people who witness an attack, risk of harm, self-confidence and a clear plan of action. "People weigh up their own personal responsibility to intervene. There is a diffusion when there is more than one person present," she said.

"The old adage that there is safety in numbers isn't always true." David Mutton from the University of Western Sydney's School of Social Sciences and Psychology agrees. "If everyone else is just watching with their mouth open, then that's what people will do. In many instances it's not a fear of harm, but a fear of embarrassment," Mr Mutton said. Dr Murrihy said that without a clear plan of action, people think they might seem foolish. One factor that is relevant in the current climate is a cultural similarity with the victim.

"If you perceive someone to be similar to you, you are more likely to act," Dr Murrihy said. Social media has also started having an impact on how we perceive, and respond to, situations. Where once it was a choice between voyeurism and activism, now people can record attacks for evidence and distribution. But is the smartphone mightier than the sword? NSW Police believe so.

They have urged witnesses to call triple-0 immediately if they see an assault. The next course of action, if it is safe to do so, is to record any information that might assist police with any subsequent investigation, Chief Superintendent Brad Shepherd said. "As in the case of the incident on the central coast train, people can record incidents on their mobile phone and let police know that they have information that may assist. "Recording someone is much less threatening than having to haul them away and it provides some sort of evidence," said Dr Murrihy. "It replaces self-efficacy." Mr Mutton is more sceptical

"People just record everything that they think is unusual. That way, they can upload it to YouTube and gain plaudits for sharing it around. "Australia is an individualistic society; the good news is that if you train and talk to people about taking action, then they are far more likely to intervene."