Post Made Community Wiki by Hailong Dao
show/hide this revision's text 2 deleted 2 characters in body

My answer is fairly simple, perhaps due to my own ignorance and inexperience, but since you asked:

There is a non-zero risk. But the rewards for talking and sharing with people about math far outweight this risk.

A more practical advice if you are really worried: I would try to cultivate and develop as many friendships as I could before starting collaborations. It works in two ways: 1) friends are less likely to steal from you, 2) people who walked walk with companies are less likely to be mugged.

show/hide this revision's text 1

My answer is fairly simple, perhaps due to my own ignorance and inexperience, but since you asked:

There is a non-zero risk. But the rewards for talking and sharing with people about math far outweight this risk.

A more practical advice if you are really worried: I would try to cultivate and develop as many friendships as I could before starting collaborations. It works in two ways: 1) friends are less likely to steal from you, 2) people who walked with companies are less likely to be mugged.