Many studies are mainly revolved around solving optimization problems; formulating a cost function and getting the gradient w.r.t some elements. This part can be somewhat challenging mathematically and is required to solve the problem in practice. Or at least, it used to be. I note that I'm not talking about the research of optimization but rather using optimization as a tool.

Symbolic toolboxes (such as Theano, TensorFlow, etc., mainly used when designing neural networks) are abundant and widely used. Using these, we can skip the manual calculation of gradients - we write only the cost function, and the derivation is done for us. Usually even the optimization is performed automatically.

While in the computer vision field it is very common to find studies that skip the math almost entirely, in other fields it is still very common to write the cost function, and at least provide the final equations needed for reproducing the results (more elaborate calculations are usually found in the appendix or supplementary material).

I'm wondering - if I choose to use these symbolic toolboxes in another field, in which it's common to write the entire derivation (or at least the gist of it), will it be frowned upon, even if I specify which software I use and even provide code? I somehow feel as if some fields consider themselves to be more 'mathematical' in substance and will therefore want to see I can calculate myself rather than let a computer do that for me...


  • 2
    A note for the answers: Theano is not like Mathematica, that computes a nice, human readable expression. It generates a function in its internal representation that can be exported to utterly unreadable C/CUDA code. – Davidmh Jul 27 '16 at 8:45
  • 1
    If the software you are using is not free/not universally used in the field, you may want to give enough information so that people that don't own the software can follow your results and/or check the result by hand, or with a similar software. – Taladris Jul 27 '16 at 13:55

It's always been normal not to write out long but straightforward calculations in a scientific paper. If there are certain intermediate steps in the calculation that are of interest for their own sake, show them.

will it be frowned upon, even if I specify which software I use and even provide code?

If the calculation is something that can be straightforwardly (but tediously) verified by anyone with knowledge of the field, then I don't see any point in saying what software you used or supplying source code. The reason to give this type of information would be if there was something in the software that could be nontrivial, controversial, etc., so that other people with knowledge of the state of the art might not get the same answer you did.

| improve this answer | |
  • 11
    I think that in any case it's nice to add source code so that the results in paper are easily reproducible. I thought reproducibility is one of key elements of modern science in general. – Tomáš Zato - Reinstate Monica Jul 27 '16 at 9:45
  • 12
    Source code isn't just nice to add, it should be a requirement. – Davidmh Jul 27 '16 at 9:50

Do not write out the long boring calculation in a middle of an exposition devoted to a different idea. That makes reading harder. But do present the calculations somehow, e.g., delegate them to a separate section/appendix/supplementary material. Extremely often I found that calculations that I find trivial aren't for others, and sometimes that is because they are wrong.

| improve this answer | |
  • 4
    This doesn't really address the situation. Here we have a software that computes the gradients as a black box, so they are available, but, should they be explicitly computed too? – Davidmh Jul 27 '16 at 9:53

I am in a very different field as yours - Computational Fluid Dynamics - but the use of external software in simulations is common. In general, a mention of the software and a reference to its documentation or source code if available is given. Providing the mathematical procedure is not necessary since you did not develop it yourself.

The access to a given article and the attached references, and not the article alone as mentioned by others, should enable the reader to reproduce the results.

This is how it usually is presented::

The computation of the cost Function was done using the Tensor Flow toolkit. The reader is referred to [ref] for more details.

| improve this answer | |

The way I use such software is that it is easier to derive the result manually if you know what the outcome is. In addition I only treat it as an intermediate answer. I usually need to spent quite some time staring and rearanging the result such that it makes sense to a human. This "post-processing" tends to improve the paper a lot: you move from a black box to something intuitive, and possible special cases and limitations tend to naturally folow from such a discussion.

So I consider those very useful tools, but I check every result and every result needs considerable "post-processing" by hand.

| improve this answer | |
  • Theano doesn't give you a formula for the gradients for human consumption, so it won't help you in your derivation more than checking your results. – Davidmh Jul 27 '16 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.