Scientific writing: structure and argument of a paper
A paper is an argument: study ML paper structure and section roles, the abstract, introductions with verifiable contributions, related-work positioning, prose oriented to reader expectations, and a writing process that starts before experiments and uses reverse outlines.
After this lesson you can
- Design paper structure from its claim hierarchy.
- Write an abstract covering context, gap, approach, quantified main result, and implication.
- Draft an introduction with verifiable contributions linked to sections.
- Rewrite paragraphs using topic and emphasis positions.
- Use reverse outlines and automated checks to review draft flow and coherence.
Before you start
The manuscript is an argument
A sequence of experiments tells how you reached a result. A paper should help another person decide what you established, how, and under which conditions. Abstract, first figure, and contributions are often entry points; each should lead to evidence without promising more than it provides. Begin with the claim hierarchy and identify the main comparison and supporting tests.
Paper structure distributes work across sections: introduction situates problem and proposal, methods enable reproduction, experiments evaluate claims, discussion bounds meaning, limitations guide use, and references position it. Exact order varies by conference or discipline. A claim-section-result mapping prevents an announced contribution from disappearing from the body.
Suppose a hypothetical study compares two estimators under limited budget. The main thesis might be that on a particular problem family estimator B reduces error relative to A at equal budget. Primary evidence is a comparison on held-out evaluation data with a difference interval; supporting evidence can include sensitivity analysis and cost measurement. Hyperparameter selection protocol belongs in methods, the test in results, and explanation of failure conditions in discussion and limitations. A cost table does not replace error comparison.
Turn that argument into a map before drafting: each row has a claim, primary evidence, section, and condition limiting interpretation. For example, if test observations come from one domain, the run interval does not identify between-domain variation. That row forces you to state scope as “in the studied domain” or design another evaluation. If the map has no evidence for a claim, do not hide it in prose: obtain evidence or remove the claim.
Five moves of the abstract
The five-move formula is a checklist, not a compulsory template: context, gap or problem, approach, main result, and implication. A move may occupy part of a sentence and some abstracts omit one. For empirical results, a figure with unit, dataset, and comparator is often more informative than “improves significantly” without context. Calibrated language also applies to the paper’s first words.
The practice sentence mentioning a 0.5-point difference refers to the synthetic A-versus-C example in communicating results, where calculated means are 80.00 and 80.50. The figure illustrates abstract structure and is not a published result.
In Adam, the abstract describes an algorithm based on adaptive moments and claims favorable empirical comparison, but gives no specific figure. The ResNet abstract reports 3.57% ImageNet error for an ensemble: the figure belongs to the ensemble, not each individual network. Lottery Ticket reports subnetworks under 10 to 20% of several architectures’ sizes on MNIST and CIFAR10; it does not guarantee this for every network or task. Compare linked versions when studying a citation: a later revision may change the abstract.
An implication should follow from the result’s actual scope. For an observation on one architecture and task, “motivates checking other architectures” differs from “generalizes to all”. A mathematical proof carries its assumptions. Do not force a number when the main result is not numerical; explain what was established and how it was checked.
An isolated figure can mislead even if correct. “3.57% error” is incomplete without dataset, metric, or the fact it comes from an ensemble; it also does not state cost or uncertainty. A useful version says what was measured and avoids turning a published result into one you reproduced. When the central result is comparative, include the baseline, not only the proposed method’s value. If the word limit prevents stating a key condition, narrow the claim or prioritize that condition over secondary implementation details.
When reviewing an abstract, separately underline question, result, and population. Can a reader locate evidence for each sentence? Is there a number without units? Was relative improvement confused with percentage points? Does an implication present an untested explanation as fact? The last distinction matters: an experiment can support improvement without identifying its mechanism. An implication may state a possibility but must distinguish it from observed result.
Introduction and contributions
The introduction moves from problem to a specific tension, from tension to idea, and from idea to tests. Verifiable contributions name an object, condition, and where it is checked. For example, “We propose a paired comparison for the section-3 protocol and measure its intervals in section 4” lets the reader verify what was done. “We propose a novel and efficient method” identifies no object or efficiency definition.
Do not confuse types: a theorem, dataset, and experimental study are different contributions. The list does not replace their contents and should not present a local observation as general. After drafting, check that every item links to a section containing its announced evidence. If not, add evidence or narrow the claim.
Develop the introduction as a verifiable path. First state a concrete need: comparing two procedures with equal data and compute. Then explain the contextual difficulty: for example, between-run variation can change observed ranking. The idea is not simply “use statistics”, but to specify unit, pairing, and estimand. Finally preview what the reader receives: a protocol, assumptions, and a study showing results and cases where comparison is imprecise.
The contribution list can follow that sequence. A methodological contribution identifies input and output; a theoretical one states assumptions and conclusion; an experimental one names comparison and measure. Do not turn every code change into an independent contribution. If two items depend on the same evidence, identify that dependence: five sentences are not five pieces of evidence. Reading sections backward also helps: a figure serving no claim may be supplementary material or reveal a missing explanation of its importance.
Related work that positions
Positioning in related work groups papers by questions, assumptions, or approaches and explains what distinguishes the study. The literature map moves from a chronological list to comparison by properties. A useful structure is what a family solves, what remains open under your study’s conditions, and how your proposal relates to that limit.
Do not attribute a gap to a paper without checking it. Different purpose does not prove superiority. If earlier work already solved the same problem under the same conditions, correct your novelty claim. Cite the primary source and describe controls with the care used for your own result.
A positioning matrix forces relationships into view: rows for work families and columns for problem, data, assumptions, evaluation, and relevant difference. One family might use a run as unit, another an evaluation example; your work could study a design with both variation sources. That distinction does not make one family wrong: each answers a different question. Write a paragraph per conceptual relationship and cite sources supporting each characterization.
Avoid an overly broad negative claim such as “nobody has studied this” after reviewing only part of the literature. Explain search criteria, update the review, and state what the search supports. Lipton and Steinhardt’s discussion of ML communication invites distinguishing results, explanations, and prior-work relationships; it does not replace reading sources for the particular problem.
Topic and emphasis
Prose oriented to reader expectations distinguishes a sentence’s opening topic and information emphasized at its end. This is a revision tool, not a syntactic law. Gopen and Swan propose considering sentence structure from reader expectations; it does not follow that every sentence must obey a fixed order.
A topic chain can advance from a known concept to the result to explain. Each paragraph’s topic sentence offers a hypothesis about its function; then check that remaining sentences develop it. Rewriting a sentence does not fix weak experimental design: clear prose should reveal that weakness, not hide it.
In Gopen and Swan’s text, emphasis relates to the end of a syntactic unit and topic to its beginning. It is not a mechanical rule of “old first, new last”: order depends on the paragraph’s intended story. Consider “We calculate a difference per seed. That difference preserves pairing.” The second sentence recalls the first’s object and delivers its property at the end. If the next paragraph concerns cost, starting with budget may be more natural even if it is not yet known information.
Also review distance between subject and verb. If a long condition interrupts the main action, the reader must retain the subject until finding what it does. Move the condition to the start or split it into another sentence where logical relationships permit. Avoid changing grammatical subject in every sentence without signaling it: a sequence of “the method”, “the data”, “the table”, and “we” may require extra effort if all describe one thread. Do not sacrifice an essential exception for a shorter sentence: preserve the claim first, then improve its path.
Write to discover what is missing
The writing process starts with an outline before experiments finish. Write questions and possible figures without filling in results. As you run the plan, link each number to its origin, check whether claims remain justified, and mark unanswered questions in the draft. An outside reader can reveal jumps the author no longer sees; then decide whether the problem is explanation or evidence.
A reverse outline selects the sentence expressing each paragraph’s function. A paragraph with two distinct ideas may need two entries; if no sentence states the idea, an automatic extractor cannot reliably invent it. Review in layers: argument and evidence first, then section order, paragraphs, sentences, and finally formatting. Adjusting commas before deciding what is demonstrated consumes effort without solving the main problem.
The interactive illustrates layered revision. “Our comparison uses paired differences and code will be public” mixes design and artifact availability. The first helps interpret the estimator; the second informs reproducibility. Separating them lets each paragraph develop one decision. A jump from problem directly to interval interpretation can be fixed by placing the generating procedure first. Repetition about few seeds can merge with the initial framing unless it adds a distinct perspective.
In an external review, ask the reader before explaining what they think the main claim is and which figure proves it. If they identify another, do not assume they misread: compare their interpretation with the text. After correcting structure, provide a change list with where each can be checked. Retain an earlier version and claim map to reconstruct why the conclusion changed. The result is an argument whose strength matches available evidence, not text made persuasive at any cost.
Lab: a bounded mechanical reviewer
A program can flag broken references and potentially undefined acronyms, but LaTeX is extensible. The following analyzer operates on an explicit subset: line comments, paragraphs separated by blank lines, acronyms of two or more uppercase letters defined in parentheses, mathematics delimited by dollars, escaped parentheses or brackets, and equation and align environments with or without an asterisk. It does not interpret macros, nested delimiters, or verbatim: manually review its notices and do not use it as a semantic-correctness guarantee.
import re
def quitar_comentarios(tex):
return re.sub(r'(?<!\\)%[^\n]*', '', tex)
def quitar_matematicas(tex):
return re.sub(r'\\begin\{(equation\*?|align\*?)\}.*?\\end\{\1\}|\$\$.*?\$\$|\$[^$]*\$|\\\(.*?\\\)|\\\[.*?\\\]',
' ', tex, flags=re.S)
def undefined_acronyms(tex):
text = quitar_matematicas(quitar_comentarios(tex))
tokens = re.finditer(r'\(([A-Z]{2,})\)|\b[A-Z]{2,}\b', text)
defined, missing = set(), set()
for token in tokens:
if token.group(1):
defined.add(token.group(1))
elif token.group() not in defined:
missing.add(token.group())
return sorted(missing)
def reverse_outline(tex):
text = quitar_comentarios(tex)
paragraphs = [p.strip() for p in re.split(r'\n\s*\n', text) if p.strip()]
return [re.split(r'(?<=[.!?])\s+', p, maxsplit=1)[0] for p in paragraphs]
def broken_refs(tex):
labels = set(re.findall(r'\\label\{([^}]+)\}', tex))
refs = set(re.findall(r'\\(?:ref|autoref)\{([^}]+)\}', tex))
return sorted(refs - labels)
example = r'''La tasa de error (TE) se mide por tarea. La TE tiene incertidumbre.
La comparación pareada aporta precisión. Mira la figura \ref{fig:parejas}.
El valor $CPU$ es una variable matemática.'''
print('Contorno:', reverse_outline(example))
print('Siglas sin definición:', undefined_acronyms(example))
print('Referencias no resueltas:', broken_refs(example))A definition in parentheses does not check whether preceding words actually expand the acronym, and an acronym used before its definition still appears in the warning. For mathematical symbols we use a deliberately restricted convention: \defsym{x} records definition of one letter and dollar-delimited formulas are checked in order. To check contributions, require each \item in the specified section to have a \ref; the link could point to the wrong section, so review remains essential. Word count is only a reading signal, not a sentence-length rule.
To use that marker in a compilable manuscript, define it in the preamble as \newcommand{\defsym}[1]{}: it prints nothing and only makes an author decision visible to the analyzer. This is a lab convention, not a standard command or a check that the explanation is correct. Do not confuse it with a mathematical definition, which belongs in prose.
def long_sentences(tex, limit=25):
text = quitar_matematicas(quitar_comentarios(tex))
sentences = re.split(r'(?<=[.!?])\s+', text)
return [s.strip() for s in sentences if len(re.findall(r'\b\w+\b', s)) > limit]
def symbols_before_definition(tex):
pattern = r'\\defsym\{([a-z])\}|\$([^$]+)\$'
defined, missing = set(), set()
for item in re.finditer(pattern, quitar_comentarios(tex)):
if item.group(1):
defined.add(item.group(1))
else:
# Solo letras independientes, no comandos ni palabras LaTeX.
symbols = re.findall(r'(?<![\\a-zA-Z])[a-z](?![a-zA-Z])', item.group(2))
missing.update(set(symbols) - defined)
return sorted(missing)
def unlinked_contributions(section):
items = re.split(r'\\item\b', section)[1:]
return [i+1 for i, item in enumerate(items) if not re.search(r'\\ref\{[^}]+\}', item)]
fragment = r'''Primero $x$. \defsym{x} Luego $x$.
\item Proponemos un método en la sección \ref{sec:metodo}.
\item Mostramos un experimento.'''
print('Símbolos usados antes:', symbols_before_definition(fragment))
print('Contribuciones sin enlace:', unlinked_contributions(fragment))
print('Frases largas:', len(long_sentences(fragment, limit=8)))This convention does not recognize an ordinary verbal definition, compound mathematical commands, or reference semantics; output is an inventory of candidates. To extend researchkit, download researchkit_writing.py alongside researchkit.py from the first lesson and import functions locally. Cells are self-contained because each lesson has an independent browser session.
Exercises
undefined_acronyms(text). A definition is an acronym of two or more uppercase letters in parentheses. Ignore math between dollars, parenthesis or bracket delimiters, and equation and align environments with or without an asterisk. Return acronyms used before their first definition, sorted. There are no comments or nested delimiters.def undefined_acronyms(text):
pass