There are several different theories about the attribution process and how it works. It is related to perception in that it encompasses ways of helping us deal with what we perceive by simplifying and labeling it. You can find an overview of some of the ideas behind attribution theory here, and also if you put the words 'attribution process' in a search engine you will find severa articles on this subject.