Why data decisions shape a machine learning thesis
Machine learning research learns from data, so the dataset is part of the method rather than a resource you pick up at the end. Whether your thesis develops new algorithms, studies the foundations of learning or applies models to a domain such as health, finance or security, examiners will ask where the data came from, who labelled them, whether they represent the problem and whether you were allowed to use them.
Machine learning data are often unstructured (images, text, audio, network traffic) rather than structured tables, and many projects need labels that no existing source provides. This is why data collection for machine learning has become a research field in its own right. Roh et al. (2021) reviewed it from the perspective of both data management and machine learning and grouped the options into three activities: acquiring data, labelling them and improving the data or models you already have.
Three routes to acquiring data
The acquisition part of the framework by Roh et al. (2021) is a useful checklist when you plan a project.
| Route | What it involves | Typical doctoral use |
|---|---|---|
| Data discovery: sharing | Publishing and indexing datasets so others can find them (repositories, collaborative platforms) | Depositing your own dataset at the end of the PhD |
| Data discovery: searching | Finding existing datasets in repositories, data lakes and the web | Starting from a recognised benchmark so results are comparable |
| Data augmentation (enrichment) | Adding attributes or records from external sources, for example by data integration or entity augmentation | Linking sensor data with weather records, or text with metadata |
| Data generation: crowdsourcing | Collecting or labelling examples through many human contributors | Creating labels for a new task when no labelled data exist |
| Data generation: synthetic data | Producing artificial examples from simulators, generative models or rules | Rare events, privacy-restricted settings, stress-testing models |
Most theses combine routes. A common pattern is to train and compare on a public benchmark, then test the best approach on a smaller dataset you collect or label yourself, which shows that the method works beyond the benchmark. For the general logic of primary and secondary data, see how to collect data for your PhD thesis.
Finding and judging existing datasets
Before collecting anything, search for datasets that already address your task. Benchmarks make your results comparable with published work, but they are not neutral. Ask who collected the data, when, from which population and for what purpose. In security, for example, widely used intrusion detection datasets differ greatly in realism and age, and models tuned to one often fail on real traffic (Sommer & Paxson, 2010; Arp et al., 2022).
- Fit. Does the dataset contain the inputs, outputs and conditions your research question needs?
- Provenance. Is the collection process described, and is there a datasheet or paper that explains it (Gebru et al., 2021)?
- Quality. Are there duplicates, label errors, missing values or class imbalance you will need to handle?
- Representativeness. Which groups, settings or time periods are missing, and how will that limit your claims?
- Permission. What does the licence allow, and does the dataset contain personal data?
Datasets of uncertain or illicit origin, such as leaked databases, raise separate ethical questions even when they are easy to obtain, and research ethics committees will expect you to justify their use (Thomas et al., 2017).
Augmentation, synthetic data and labelling
Keep the two meanings apart in your thesis. Enrichment adds information from other sources. Transformation augmentation creates modified copies of existing training examples, such as cropped, flipped or colour-shifted images, to make a model robust to variation; Krizhevsky et al. (2012) used image translations, reflections and colour changes in this way to reduce overfitting. Transformations must preserve the label: flipping a handwritten "6" can turn it into a "9".
Synthetic data are useful when real data are scarce, sensitive or dangerous to collect, but a model trained only on synthetic data may learn the simulator rather than the world. Report how the generator was built and evaluate final models on real data. Synthetic data generated from personal records can still reveal information about individuals, so they do not automatically fall outside data protection rules.
Labelling is often the most expensive step. Write a labelling guide with definitions and borderline examples, pilot it, measure agreement between labellers and resolve disagreements by a documented rule. If you use crowdworkers, report how they were recruited, paid and checked. A small, carefully labelled test set is worth more than a large one with unknown error.
Licensing, consent and data protection
Check permission before you download, scrape or share. Open datasets carry licences that may forbid commercial use or redistribution, and websites have terms of service. In the UK, a copyright exception allows text and data analysis of lawfully accessed works for non-commercial research (Copyright, Designs and Patents Act 1988), but it does not override data protection law or contracts you have signed, and other countries have different rules.
If your data contain information about identifiable people, you need a lawful basis, ethics approval and a data management plan covering minimisation, pseudonymisation, storage and retention. In the European Union, the Artificial Intelligence Act, adopted in 2024, sets data governance requirements for training, validation and testing data used in high-risk AI systems, including attention to relevance, representativeness and possible bias (European Parliament & Council of the European Union, 2024). A doctoral prototype may not be in scope, but the same questions are a good standard for any thesis. Plan to make data findable, accessible, interoperable and reusable where you can (Wilkinson et al., 2016), and explain any restrictions.
Protecting validity: leakage, bias and poisoning
Data problems are a leading cause of machine learning results that do not hold up. Kapoor and Narayanan (2023) found data leakage, where information from the test set reaches training, across many fields that use machine learning, producing over-optimistic results. Typical causes are random splits of data that should be split by time, patient or user; duplicates across splits; and preprocessing fitted on the whole dataset.
A review of COVID-19 imaging models by Roberts et al. (2021) found that problems with data sources, such as mixing images from different populations so that a model could learn where an image came from rather than the disease, made many published models unsuitable for clinical use. Web-scale data bring a further risk: Carlini et al. (2024) showed that attackers can poison widely used web-crawled datasets at low cost, so record exactly which snapshot you used and check integrity where possible.
Worked example (illustrative)
A hypothetical PhD aims to detect plant diseases from leaf photographs taken by farmers on smartphones. The researcher starts from a public leaf-image benchmark (data discovery) and notes that its photographs were taken against plain backgrounds, unlike field images. She therefore collects 2,000 field photographs with farmers' consent, removes location metadata, and writes a labelling guide that two plant pathologists apply independently, with agreement reported and disagreements resolved by discussion. Transformation augmentation (rotation, brightness, blur) is applied to training images only. The test set is split by farm, not by image, to avoid leakage (Kapoor & Narayanan, 2023). Synthetic images of a rare disease are used to explore class imbalance, but all reported results come from real field images. The thesis appendix contains a datasheet (Gebru et al., 2021) and the code and split files needed to reproduce the results (Pineau et al., 2021).
What to report about your data
| Element | What to state |
|---|---|
| Source and version | Repository, snapshot date or version, and the licence or terms of use |
| Collection | Who collected the data, how, when and from whom; consent and ethics approval |
| Labels | Labelling guide, who labelled, agreement statistics and how disagreements were resolved |
| Augmentation and synthesis | Which meaning of augmentation; transformations used; generator for synthetic data |
| Splits | How training, validation and test sets were formed and why this prevents leakage |
| Limitations | Groups, settings or periods not represented, and known label noise or imbalance |
| Availability | Where data, code and documentation can be accessed, or why access is restricted |
Common mistakes
- Treating a downloadable dataset as free to use without reading its licence.
- Using the word augmentation without saying whether data were enriched or transformed.
- Splitting data randomly when related records belong together, which leaks information into the test set.
- Reporting results only on synthetic data or only on an old benchmark.
- Leaving labelling undocumented, so that examiners cannot judge label quality.
- Collecting personal data before ethics approval and a data management plan are in place.
For related reading, see the PhD data analytics guide, programming for AI research and ethics and security in machine learning research.
Key takeaways
- Plan data acquisition as part of the method, combining discovery, enrichment and generation as the question requires (Roh et al., 2021).
- Distinguish enrichment from transformation augmentation, and validate any synthetic data against real data (Krizhevsky et al., 2012).
- Check licences, copyright exceptions, consent and data protection before using data (Copyright, Designs and Patents Act 1988; European Parliament & Council of the European Union, 2024).
- Prevent leakage and source bias, which have undermined many published models (Kapoor & Narayanan, 2023; Roberts et al., 2021).
- Document your dataset with a datasheet and share data and code where you can (Gebru et al., 2021; Wilkinson et al., 2016; Pineau et al., 2021).
