We propose a public goods game model wherein individuals can adaptively adjust their social ties. Individuals have expectation towards the groups they are involved in. They drop out of these groups which do not satisfy their expectation and explore some new ones in the evolutionary process. The time scale ratio of natural selection to interaction determines how fast interaction happens relatively to selection. The results show that cooperation is greatly enhanced when interaction happens quickly. Furthermore, we find that there exists an optimal interval of intermediate expectation level most favoring cooperation. Robustness of the results has been checked by means of an extended model, where individuals' expectation is subject to evol...