Disadvantages to publishing outside field of projected study? As a recent B.S. recipient interested in pursuing a PhD in molecular biology in the future, are there any disadvantages to publishing outside of that field? I have a strong background in computer science and have been approached separately by a public health professor and a linguistics professor who are interested in collaborating on their respective projects and perhaps working towards a paper over the summer.

While I enjoy solving computational problems, I'm not sure whether this is a good idea professionally. Does publishing papers in other fields take away from the research I've already done?  I've so far only contributed to two papers in my "field of expertise".

What are the downsides to collaborating on a paper outside of one's field? Is this frowned upon by the academic community/graduate admission programs?

Related question -- advantages to publishing outside of primary research field
Although I cannot speak directly to the field of computer sciences, I can say that in social sciences any peer reviewed publications would be viewed positively on an applicant's CV. At this stage in your career this shows you're motivated, capable of contributing to academic work, and have some familiarity with the writing process. The fact is that many undergraduates may not have access to opportunities to publish in the field they hope to enter, but instead seek to gain research experience and publication opportunities with faculty who are willing to work with and train them. Many academic skills, such as writing articles, are transferable between disciplines, and working with these professors may provide you with strong reference letters when you do apply to graduate school. So long as this opportunity is not coming at the expense of something more directly related to your major, I think it could be a very valuable experience which could positively impact (or at least will not hurt) your future applications. 

As a final note, be sure that you are able to explain the project and your role in the project in future application materials and interviews. If this is outside your field of study, don't be shy about asking the professors questions so that you have a solid grasp of the project's purpose. The only time I have seen undergraduate publications backfire is when the person is unable to explain the work, and it becomes clear they did nothing but data entry.