Suppose I am a Ph.D. student in machine learning and have an idea about developing a model that I presume to be more efficient than existing models. Although I have a broad idea of coding to some extent, I don't know to code my model on a deeper level and it will take much time.

In order to publish a paper on the model, there is no need to prove the efficiency of the model mathematically. It is sufficient to show empirically that my model performs better than the existing ones.

As undergraduates have more machine learning programming exposure due to the lab sessions, project works they handle, etc., they can do coding much more easily compared to Ph.D. students.

I have three options, either ethical or unethical:

  1. Use an undergraduate student and ask the person to code by giving them all my requirements. Then publish the paper with me as the first author and the coder as the second author.

Although many of my fellow students use this option, I don't like it. Coding alone generally does not fit to offer authorship as packages in Machine learning generally have the inbuilt functions and my model can be developed using them.

  1. Use an undergraduate student and ask the person to code by giving them all my requirements. Then publish the paper with me as the sole author.

I personally don't like this idea as a rule of my institute says that a Ph.D. student should be the first and most significant author in the papers they publish. And I am aware that I cannot publish my idea quickly without the help of an undergraduate person. So I am feeling that it is not a complete contribution on my own as I need the help of the person for executing all my intermediate ideas in developing the model as I am not well aware of the functions provided by the package.

  1. Learn coding by spending time and then do it on my own and then publish the paper as the sole author.

I am biased towards the third one as it is ideal and ethical to do. But the only issue is that the option is time-consuming. It can take so much time to learn to code and then develop my model. There is a chance that some others may publish the same idea during this time.

I am confused about the first two options. To be honest, In the situation, I am discussing, coding seems to be an important resource than the idea. Because many ideas in machine learning papers are easy and publishing papers also does not need any mathematical proof, so the implementation is a key factor for publication.

In this context, I want to know whether options 1 and 2 are ethical or not.

  • Some discussion about working in teams and about the idea that undergrads are better at coding than grad students has been moved to chat. The discussion can continue in chat, but please see this FAQ before posting a comment below this one (remember, we can only move comments to chat once).
    – cag51
    Jun 27, 2022 at 19:50

4 Answers 4


This question seems to mix up a number of different threads.

Much research is collaborative in its nature. A project may involve multiple individuals who each bring different things to the table. There is nothing wrong with deciding that the most efficient way to execute a particular piece of work is to bring other people on board. There are many reasons one might do this: sometimes it is because they have knowledge or expertise; sometimes it is because they have access to particular resources; sometimes it's simply about having spare time to work on something.

However, having other people involved creates new problems. It is important to make sure that everyone is on the same page about 'what they get in return for their involvement', and that expectations align with community norms. This involves many questions that we see here all the time, such as:

  • Who will be an author on any papers? Who will be first/last/etc author?
  • Is anyone expecting to be paid for their involvement? What about reimbursement of costs? Where is the money coming from?
  • Is anyone expecting to submit the work to be examined/assessed for any purpose? What do they need to do and when are the deadlines? Will it be possible to isolate their contribution sufficiently from anyone else's?

So, there is nothing intrinsically wrong in having an idea and asking an undergraduate to help you implement it. However, you need to:

  1. Be clear on 'what they get out of it': are they getting course credits for it? Are you paying them? Are you just offering 'experience' and 'warm fuzzy feelings'?
  2. Make sure everything is above board. If they are getting credits: congratulations, you are now a supervisor! Do you and the student both understand what is required, when it has to be completed, and how it is marked? What paperwork needs to be done? How are you going to make sure they get a fair opportunity to demonstrate their skills and get good marks? What happens if the project doesn't go as well as you hope? If you are paying them: where is the money coming from? What are your obligations under employment law?
  3. Make sure everyone understands the position regarding authorship on any papers, and that this aligns with the norms of your field. Generally, writing all the code would seem to meet the test of 'substantial contribution' to a paper, and merit co-authorship.

The situation is more complicated if you are hoping to submit this piece of work as part of your own portfolio for an examination (e.g. as part of a PhD thesis). You need to check the rules and regulations at your institution. As a matter of general ethics, you cannot pass off the undergraduate's work as your own. You need to make sure you clearly identify which parts of a project are "your" contributions, and that these are substantial enough to merit inclusion in your thesis in their own right. So, for example, you might write:

In this chapter I show that volume of a U-basket is proportional to its dimensionality.... [several pages of maths]. To test this formula, simulations were performed for the 3 dimensional case (J Smith, Undergraduate thesis, Bigname University, 2022) and results are summarised in Fig. 1. We see that... and this supports the results developed in this thesis.

Bear in mind that supervising someone else to do research is often harder than doing it yourself. You need to make sure they understand what is required, and then you need to convince yourself that what they actually did matches what you wanted them to do. You need to make sure you understand how to use their code to produce publishable results, or you need to coach them to produce publication-quality figures for you. And you take on the risk that they misunderstand the task, or their code has bugs, or they turn out to be an idiot, or they get bored halfway through and walk away. So perhaps learning to write your own code isn't so bad after all!


Let me at least add to the answer of tschwarz. Long term if you want to stay in this field you need to learn the necessary tools to be successful. This would seem to me to include programming. The problem is that if you simply specify a program you may not know when it is done whether it is appropriate for your situation or not. If you can't evaluate it you can't really depend on it to give accurate results. This might be especially valuable if you are comparing a new model with existing models.

For the current situation, I'd suggest that you are at least first author. But ask yourself whether it would be important for those evaluating your work to have access to the code you use. If you expect that it should be published along with the paper or that interested parties are likely to ask for it, then the programmer is most likely an author as well. The quality of the code can subtly affect the outcome.

My guess is that in this case, readers will want the code. And you will need to work closely with them to assure that it actually represents your model ideas.

However, if the code is simply something like standard statistical measures (tabulating and descriptive statistics) then, like the linked answer, there is little creativity in it and the code isn't necessary to publish, leading to sole authorship (with thanks to the programmer). But, you still need to be able to verify it's correctness and you are on shaky ground here if you can't do that.


This whole situation is completely, utterly baffling. After reading the exchange in the chat, it seems apparent that you, a PhD student in machine learning of all things, do not feel comfortable around standard packages such as sklearn or PyTorch.

This is bad. Really, really bad. That the professors are not interested in getting up to speed with the newest research is unfortunate, but you can not - should not! - accept this as a "natural order of things" and follow their example. They have likely secured their place in life. You have not.

Even if you get very lucky with long-term collaborations and people who could cover the implementations, your joint projects would still benefit immensely from you learning to code a thing or two. Yes, if you had an authority and have previously demonstrated a deep understanding of the subject, you could then assume a command over an army of students, but you are not at that stage of the career yet. Students have ideas of their own, in a few short years they will reach your stage and you will end up being far behind.

Truly, by being reluctant to learn now, in (probably) the fastest-moving field to boot, you are endangering your entire future career. I can not overstress how important it is for you to catch up on tools of the trade. As soon as possible.

Further, it is extremely unlikely for that idea of yours to strike a gold vein and for the student employed to not realize that immediately, and with possibly better understanding than you will have - kaggle trains people to think about these things. In no universe stating "oh it was just coding, all the important ideas were mine" would be ethical: either you can not be sure the results were correct (and you should not be publishing them then), or the person employed did a substantial amount of intellectual work not just putting them together, but analyzing and verifying them.

All in all, the best strategy would be humbling yourself, acknowledging you will need some basic coding skills in this career, and possibly even attending the same classes undergrads take as an auditor or enlisting outside help otherwise. Collaborating on a paper is possible, too, but they will have to get co-authorship, and there are many additional concerns @avid has listed in their answer.

I am sorry for the strong wording in this post, but also... not really. I firmly believe that following your professors' example would do you an enormous disservice here, so get to learning - painful as it might be. I know firsthand it is daunting, but it can be done and, in your case, definitely should.


Nuances are important here.

Learning programming to implement your idea is probably too time consuming.

If the programming is a standard task at the level of a programming assignment in the third or fourth year or something contracted via the mechanical turk or a similar website, then the programmer would work essentially as a handy-man. If you were a 19th century physicist, you might go to a glas-blower in order to have a tube in which you can create a vacuum. Any result of the research would not have the glas-blower as its author. Similarly, a programmer that translates your ideas into code makes no intellectual contribution to your research. Both the programmer and the glas-blower are absolutely essential and without them, you cannot be successful, but they are not intellectual authors. Of course, programming is an intellectually challenging endeavor.

The situation changes the moment that the programmer would go beyond translating your ideas into code. Depending on the amount of contribution, the programmer would then become an intellectual author.

Thus, sole authorship (and thanking the programmer explicitly) would be most likely the more realistic way of publishing your method.

Allow me to add a warning: You seem to be somewhat inexperienced in research. You might need to have a mentor for your project. Also, do not underestimate the costs of programming. You will have to pay the programmer a reasonable rate and most non-programmers underestimate the time it takes to develop good code. In addition, you need to spend some time to write good specifications of the code. When you do this, you might find out that you did not think out your idea well. In view of this, finding a student colleague who can program and can act as an interlocutor for you so that they contribute materially to the paper and become second author might be preferable.

  • 2
    "Thus, sole authorship (and thanking the programmer explicitly) would be most likely the more realistic way of publishing your method." That seems inconsistent with the previous paragraph. Please clarify. Are you suggesting that the programmer makes no real contribution in this case?
    – Buffy
    Jun 27, 2022 at 17:58
  • 5
    Indeed, the poor undergraduate will have to code up an efficient implementation of the ‘standard’ algorithm, then an efficient implementation of the ‘new’ idea to compare. Needs experience and insight into the particular language and field. The hired help is doing all the hard work, with the OP not understanding what is required.
    – Jon Custer
    Jun 28, 2022 at 2:40
  • 3
    I strongly disagree with this answer. "Translating ideas into code" in this case sounds like it involves much more than a "non-intellectual contribution", especially since "ideas" can be rather vague, but all the details will need to be worked out for a concrete implementation. There is no reason to refuse authorship to the programmer who did all the work.
    – Stef
    Sep 16, 2022 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .