# Designing Chelators for Radiopharmaceuticals

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Source: the 2023/24 task collection of the National Technology Olympiad (NTO), "Artificial Intelligence" profile, Final Stage, engineering tour, pp. 115–118 and 128–129: [original PDF](https://ntcontest.ru/upload/problembooks-2324/13_%D0%98%D1%81%D0%BA%D1%83%D1%81%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9%20%D0%B8%D0%BD%D1%82%D0%B5%D0%BB%D0%BB%D0%B5%D0%BA%D1%82.pdf#page=115).*

## Engineering tour

### General information

The finalists will take part in the search for new radiopharmaceuticals: drugs that use radioactivity for the diagnosis and therapy of cancer. To work successfully, these drugs must deliver a medical radionuclide to a cancerous tumour, and the finalists have to find precisely those molecules that can do this most effectively.

A drug must not turn out to be more dangerous than the disease, so additional constraints will be imposed on the molecules that the participants propose.

### Background to the task

In its original form, the task belongs to the field of pharmaceutics and relies on knowledge of the biochemistry of cancerous tumour behaviour. However, breaking it down into separate stages leads us to the chemical problem of binding a medical radionuclide. A purely chemical solution of this problem is very resource-intensive, and the use of artificial intelligence technologies helps to find potential drugs considerably faster. The best solutions can be obtained by integrating knowledge of chemistry and biology on the one hand with artificial intelligence technologies on the other.

Radiopharmaceuticals consist of three parts:

- a biological vector, which is responsible for delivering the drug;
- a radionuclide, which delivers the therapy itself;
- a chelator, which binds these two parts together.

In the task, the participants have to find chelators that can bind medical radionuclides as strongly as possible

*[Figure: the structure of a radiopharmaceutical. A chelator (labelled "Chelator") and a biological vector (labelled "Biological vector") are joined into a conjugate, whose chelator then holds a radionuclide (labelled "Radionuclide"). See the [original statement](https://ntcontest.ru/upload/problembooks-2324/13_%D0%98%D1%81%D0%BA%D1%83%D1%81%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9%20%D0%B8%D0%BD%D1%82%D0%B5%D0%BB%D0%BB%D0%B5%D0%BA%D1%82.pdf#page=115), page 115.]*

### Requirements for the team and the participants' competences

Number of participants in a team: 2 people.

Competences that the team members must have:

- data analysis;
- QSAR methods;
- chemical databases.

Participants must be able to work:

- with molecular data (for example, `rdkit`);
- with machine learning methods (for example, `scikit-learn`), including neural networks (for example, `pytorch`).

Roles that must be represented in the team.

*[Figure: the team roles. Participant 1 builds the "Predictive model" and Participant 2 builds the "Structure generator"; both feed into "Directed design". See the [original statement](https://ntcontest.ru/upload/problembooks-2324/13_%D0%98%D1%81%D0%BA%D1%83%D1%81%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9%20%D0%B8%D0%BD%D1%82%D0%B5%D0%BB%D0%BB%D0%B5%D0%BA%D1%82.pdf#page=116), page 116.]*

### Equipment and software

Participants are provided with laptops:

- RAM: 16 GB;
- SSD storage: 256 GB;
- processor: Intel Core i5.

Pre-installed software:

- Chrome browser;
- PyCharm;
- Jupyter Lab;
- Python 3.5;
- GIT;
- MS Office 2016.

### Task description

#### Task

The finalists will take part in the search for new radiopharmaceuticals: drugs that use radioactivity for the diagnosis and therapy of cancer. To work successfully, these drugs must deliver a medical radionuclide to a cancerous tumour, and the finalists have to find precisely those molecules that can do this most effectively. Moreover, one should not forget that a drug must not turn out to be more dangerous than the disease, which means that additional constraints will be imposed on the molecules that the participants propose.

#### Data provided

A set of molecules in text representation (`SMILES`) and the corresponding values of the binding efficiency of a medical radionuclide.

#### Goal

Generate a sample of 100 molecules with the maximum value of the target property.

#### Additional conditions

The sample of molecules must satisfy the following criteria:

- Each molecule must contain only elements from the list: C, H, O, N, P, S.
- Each molecule must contain at least three different elements from the list above.
- Each molecule must contain in total no more than 12 atoms of the following elements: O, N, P, S.
- The molecules must not occur in the training set.
- The molecular weight of each molecule is $\leqslant 500$ Da.
- The synthetic accessibility score of each molecule is $< 5$ (calculated according to the instructions at <https://greglandrum.github.io/rdkit-blog/posts/2023-12-01-using_sascore_and_npscore.html>).
- The mean pairwise similarity of the molecules in the set is $< 0.5$ (calculated with the Tanimoto metric with the "default" parameter values, as described in the instructions at <https://www.rdkit.org/docs/GettingStartedInPython.html>).

Solving the task involves two intermediate phases, which two team members can work on in parallel for maximum efficiency.

#### Phase 1

One of the participants can work on building a predictive model trained on the data provided to the participants. The best predictive model ensures the highest quality of selecting molecules for the final solution. The participants already have experience of building predictive models from the preparatory stages; however, the final task is complicated by a lack of data, and the participants must choose a method of dealing with this problem.

A team that has successfully completed only this phase can then use this model to screen open databases, which potentially makes it possible to obtain a solution to the whole task. However, the quality of such a solution will be noticeably lower than that of participants who have completed both phases.

A team that fails to build a predictive model can rely only on an undirected (random) search for a solution, or on building an evaluator of generated molecules based on deterministic rules; even with a knowledge of chemistry that considerably exceeds what the task requires, this still does not make it possible to obtain a solution capable of reaching the prize-winning places.

#### Phase 2

The second phase of solving the task is to build a generative model capable of a directed search for molecules that meet the specified conditions. A simpler version of such a task was offered to the participants earlier; however, the final task is complicated by the need to create a model that can take into account several constraints on the generated objects at once, and constraints of different types: continuous or categorical.

Participants who succeed in building such a model can conduct a directed search for solutions even with a predictive model (obtained in the first phase) of less than the best quality, although, of course, they would lose to participants who have successfully completed both phases. Without such a model, the choice of molecules is limited to screening existing databases and to random or manual generation of new molecules, which, especially with a limited number of attempts, has a very low probability of leading to a competitive solution.

### Assessment system

The proposed molecules are checked for compliance with the stated conditions, and the target property is evaluated on a subsample of the proposed sample. There is a model, hidden from the participants, that can evaluate the target property of the molecules proposed by the participants. The sets of molecules will be analysed by this model, and the participants' rating will be the mean value of the property over the best half of the generated molecules. The metric used is the mean binding efficiency of a medical radionuclide, estimated on a data sample from the set uploaded by the participants. Software hidden from the participants was used to calculate this value.

*Translator's note: the next part of the original, "Solution of the task" (the winning team's solution, pages 119–128), is given in the separate solution file for this task.*

### Preparation materials

Before the final, the "Molecule" hackathon was held, in which participants had the opportunity to immerse themselves in the fascinating process of developing a project for interpreting chemical formulae. The task was to create a system capable of recognising images of organic molecules and converting them into the `SMILES` format, a unique language that turns complex chemical compounds into easily readable text strings, and also to practise all the machine learning skills needed to solve the final task successfully.

Training tasks: <https://ai-academy.ru/training/training-tasks/>.

Video lessons:

1. AI Academy lessons (playlist): <https://www.youtube.com/playlist?list=PLxF_rYtB5vBC6MIx4Y3VX_O67jX0iG6U->.
2. AI lectures for school students by Microsoft (playlist): <https://www.youtube.com/playlist?list=PL6XUtJhtlpPOJu1OTwZ4I7xmnoyqQ_BFR>.
3. Machine learning course (basic level) by the AI Academy: <https://stepik.org/course/125587/promo>.
4. Machine learning course (advanced level) by the AI Academy: <https://stepik.org/course/134942/promo>.
5. Docker and Git course by the AI Academy: <https://ai-academy.ru/training/courses/docker-git/>.
6. "Introduction to Linux" course by the AI Academy: <https://ai-academy.ru/training/courses/vvedenie-v-linux/promo/>.
7. "Mathematics for Data Science" course by the AI Academy: <https://ai-academy.ru/training/courses/matematika-dlya-data-science/promo/>.
8. "Ready-made stacking for you": <https://www.kaggle.com/c/allstate-claims-severity/discussion/25743>.
9. "Building ensembles wisely": <https://mlwave.com/kaggle-ensembling-guide/>.
10. "How to 'farm' Kaggle properly": <https://habr.com/ru/company/ods/blog/426227/>.
11. "How to win a competition with CatBoost alone": <https://habr.com/ru/company/ods/blog/475182/>.
12. 10 articles of the "ODS Open Machine Learning Course": <https://habr.com/en/company/ods/blog/322626/>.
13. Beginner's guide to create a Time Series Forecast: <https://www.analyticsvidhya.com/blog/2016/02/time-series-forecasting-codes-python/>.
14. CatBoost vs. Light GBM vs. XGBoost: <https://towardsdatascience.com/catboost-vs-light-gbm-vs-xgboost-5f93620723db>.
15. Recommender systems:
    - introduction: <https://habr.com/ru/post/476222/>;
    - life hacks: <https://habr.com/ru/post/476224/>.
