This paper considers both the cost of direct access to knowledge and network spillover effect,and develops game models with non-synergetic effect and synergistic effect. The result shows that there is free-riding phenomenon when there is non-synergetic effect. Firms don't worry about their knowledge spillover risk when there is synergetic effect,and are willing to be embedded in the network in order to obtain more heterogeneous knowledge. On the other hand,with the increasing cost of direct access to knowledge,firms tend to become less willing to be embedded in alliance network. Finally,it offers several policy suggestions to promote inter-firm knowledge sharing efficiency.