anrilombard/safe-20m

Model

SAFE_20M

0

28 commits

1 linked in READMEs

updated Jan 11, 2025

See the code

README

SAFE_20M

SAFE_20M is a transformer-based model designed for molecular generation tasks. This model was trained from scratch on the MOSES dataset, which has been converted from SMILES to the SAFE (SMILES Augmented For Encoding) format to enhance molecular representation for machine learning applications.

Evaluation Results

On the evaluation set, SAFE_20M achieved the following result:

  • Loss: 0.4024

Model Description

SAFE_20M leverages the SAFE framework to generate valid and diverse molecular structures. By converting the MOSES dataset from SMILES to SAFE format, the model benefits from improved molecular encoding, facilitating better performance in various applications such as:

  • Drug Discovery: Identifying potential drug candidates with desirable properties.
  • Materials Science: Designing new materials with specific characteristics.
  • Chemical Engineering: Innovating chemical processes and compounds.

SAFE Framework

The SAFE framework, integral to SAFE_20M, was introduced in the following paper:

@article{noutahi2024gotta,
  title={Gotta be SAFE: a new framework for molecular design},
  author={Noutahi, Emmanuel and Gabellini, Cristian and Craig, Michael and Lim, Jonathan SC and Tossou, Prudencio},
  journal={Digital Discovery},
  volume={3},
  number={4},
  pages={796--804},
  year={2024},
  publisher={Royal Society of Chemistry}
}

We acknowledge and thank the authors for their valuable contribution to the field of molecular design.

Intended Uses & Limitations

Intended Uses

SAFE_20M is primarily intended for:

  • Generating Molecular Structures: Creating novel molecules with desired properties.
  • Exploring Chemical Space: Navigating the vast landscape of possible chemical compounds for research and development.
  • Assisting in Material Design: Facilitating the creation of new materials with specific functionalities.

Limitations

  • Validation Required: Outputs should be validated by domain experts before practical application.
  • Synthetic Feasibility: Generated molecules may not always be synthetically feasible.
  • Dataset Scope: The model's knowledge is limited to the chemical space represented in the MOSES dataset.

Training and Evaluation Data

The model was trained on the MOSES (MOlecular SEtS) dataset, a benchmark dataset for molecular generation. The dataset was converted from SMILES to the SAFE format to enhance molecular representation for machine learning tasks.

Training Procedure

Training Hyperparameters

The following hyperparameters were used during training:

  • Learning Rate: 0.0005
  • Training Batch Size: 32
  • Evaluation Batch Size: 32
  • Seed: 42
  • Gradient Accumulation Steps: 2
  • Total Training Batch Size: 64
  • Optimizer: Adam (betas=(0.9, 0.999), epsilon=1e-08)
  • Learning Rate Scheduler: Linear with 20,000 warmup steps
  • Number of Epochs: 10

Training Results

Training LossEpochStepValidation Loss
1.15480.040710001.0531
0.83840.081320000.7846
0.73270.122030000.6928
0.68250.162640000.6570
0.64680.203350000.6206
0.62350.244060000.5964
0.60630.284670000.5838
0.59040.325380000.5679
0.57910.366090000.5593
0.56990.4066100000.5527
0.56410.4473110000.5441
0.55370.4879120000.5399
0.55180.5286130000.5355
0.55010.5693140000.5353
0.5420.6099150000.5278
0.54220.6506160000.5263
0.53670.6912170000.5239
0.53660.7319180000.5206
0.53390.7726190000.5206
0.53490.8132200000.5160
0.52480.8539210000.5158
0.52210.8945220000.5082
0.51720.9352230000.5077
0.51220.9759240000.5030
0.50941.0165250000.5002
0.5071.0572260000.4983
0.5081.0979270000.4935
0.50411.1385280000.4934
0.5021.1792290000.4920
0.50211.2198300000.4888
0.50051.2605310000.4882
0.49731.3012320000.4876
0.49541.3418330000.4859
0.49141.3825340000.4843
0.49461.4231350000.4837
0.49081.4638360000.4810
0.49051.5045370000.4806
0.48811.5451380000.4791
0.48681.5858390000.4780
0.48961.6264400000.4777
0.4841.6671410000.4774
0.48551.7078420000.4742
0.48371.7484430000.4742
0.48741.7891440000.4743
0.48171.8298450000.4727
0.48111.8704460000.4732
0.48011.9111470000.4713
0.48081.9517480000.4710
0.47971.9924490000.4703
0.47652.0331500000.4697
0.47622.0737510000.4684
0.47762.1144520000.4682
0.47442.1550530000.4691
0.47562.1957540000.4674
0.47412.2364550000.4661
0.47462.2770560000.4669
0.47262.3177570000.4660
0.47162.3583580000.4647
0.47182.3990590000.4648
0.47112.4397600000.4638
0.47182.4803610000.4643
0.46992.5210620000.4631
0.47062.5617630000.4622
0.4732.6023640000.4623
0.46712.6430650000.4613
0.46772.6836660000.4621
0.46812.7243670000.4609
0.47182.7650680000.4600
0.46492.8056690000.4598
0.46592.8463700000.4596
0.46612.8869710000.4589
0.46512.9276720000.4586
0.46592.9683730000.4581
0.46293.0089740000.4580
0.46313.0496750000.4589
0.46383.0902760000.4574
0.46233.1309770000.4566
0.46313.1716780000.4565
0.46333.2122790000.4557
0.46093.2529800000.4549
0.46163.2936810000.4546
0.46133.3342820000.4557
0.46023.3749830000.4544
0.46123.4155840000.4550
0.45883.4562850000.4532
0.46023.4969860000.4531
0.4593.5375870000.4537
0.45983.5782880000.4528
0.46063.6188890000.4530
0.46143.6595900000.4523
0.45753.7002910000.4515
0.46013.7408920000.4517
0.45783.7815930000.4517
0.45733.8221940000.4507
0.4573.8628950000.4508
0.45963.9035960000.4507
0.45663.9441970000.4498
0.45713.9848980000.4491
0.45294.0255990000.4504
0.45154.06611000000.4496
0.45254.10681010000.4492
0.45344.14741020000.4489
0.45334.18811030000.4484
0.45444.22881040000.4471
0.45244.26941050000.4473
0.45244.31011060000.4478
0.45354.35071070000.4462
0.45314.39141080000.4463
0.4524.43211090000.4467
0.45354.47271100000.4460
0.45234.51341110000.4459
0.45124.55401120000.4454
0.44874.59471130000.4454
0.45034.63541140000.4453
0.45284.67601150000.4444
0.44824.71671160000.4444
0.45084.75741170000.4435
0.45174.79801180000.4438
0.44844.83871190000.4441
0.45094.87931200000.4437
0.44854.92001210000.4429
0.45074.96071220000.4428
0.44625.00131230000.4424
0.44695.04201240000.4419
0.44545.08261250000.4421
0.44785.12331260000.4413
0.4455.16401270000.4413
0.44565.20461280000.4404
0.44475.24531290000.4405
0.44515.28591300000.4405
0.44645.32661310000.4411
0.44415.36731320000.4392
0.44465.40791330000.4405
0.44275.44861340000.4391
0.44315.48931350000.4390
0.44695.52991360000.4391
0.44215.57061370000.4387
0.44445.61121380000.4378
0.44315.65191390000.4374
0.44225.69261400000.4369
0.44095.73321410000.4373
0.4445.77391420000.4368
0.44235.81451430000.4376
0.44185.85521440000.4370
0.44095.89591450000.4352
0.44165.93651460000.4358
0.445.97721470000.4357
0.4376.01791480000.4347
0.43556.05851490000.4350
0.43716.09921500000.4346
0.43646.13981510000.4350
0.43656.18051520000.4336
0.43746.22121530000.4336
0.43546.26181540000.4335
0.43646.30251550000.4335
0.4366.34311560000.4327
0.43656.38381570000.4332
0.43686.42451580000.4320
0.43636.46511590000.4317
0.43676.50581600000.4320
0.4366.54641610000.4316
0.43516.58711620000.4317
0.4366.62781630000.4310
0.43346.66841640000.4307
0.43486.70911650000.4301
0.43576.74981660000.4293
0.43276.79041670000.4295
0.43486.83111680000.4294
0.43236.87171690000.4284
0.43346.91241700000.4283
0.43176.95311710000.4279
0.4336.99371720000.4284
0.42737.03441730000.4279
0.42727.07501740000.4275
0.42657.11571750000.4269
0.42877.15641760000.4268
0.42827.19701770000.4264
0.42677.23771780000.4267
0.42717.27831790000.4256
0.42827.31901800000.4254
0.4277.35971810000.4251
0.42627.40031820000.4249
0.42727.44101830000.4248
0.42717.48171840000.4243
0.42617.52231850000.4236
0.42737.56301860000.4237
0.42627.60361870000.4238
0.4267.64431880000.4232
0.42437.68501890000.4226
0.42427.72561900000.4219
0.4277.76631910000.4215
0.42367.80691920000.4211
0.4227.84761930000.4211
0.42247.88831940000.4204
0.42377.92891950000.4201
0.4247.96961960000.4200
0.41618.01021970000.4196
0.41728.05091980000.4193
0.41658.09161990000.4192
0.41518.13222000000.4189
0.4178.17292010000.4184
0.41728.21362020000.4182
0.41818.25422030000.4180
0.41678.29492040000.4170
0.41848.33552050000.4168
0.41488.37622060000.4164
0.41718.41692070000.4157
0.4178.45752080000.4158
0.41748.49822090000.4153
0.41598.53882100000.4149
0.41418.57952110000.4149
0.41418.62022120000.4144
0.41218.66082130000.4139
0.41348.70152140000.4133
0.41268.74212150000.4135
0.41418.78282160000.4125
0.41268.82352170000.4125
0.41178.86412180000.4119
0.41148.90482190000.4115
0.41028.94552200000.4113
0.41238.98612210000.4103
0.40459.02682220000.4104
0.40399.06742230000.4104
0.40429.10812240000.4100
0.40639.14882250000.4092
0.40459.18942260000.4091
0.40529.23012270000.4086
0.40419.27072280000.4082
0.40429.31142290000.4077
0.4039.35212300000.4077
0.40479.39272310000.4070
0.40149.43342320000.4067
0.40329.47402330000.4062
0.40189.51472340000.4059
0.40159.55542350000.4054
0.40059.59602360000.4050
0.40169.63672370000.4049
0.40129.67742380000.4043
0.40149.71802390000.4040
0.39959.75872400000.4037
0.3989.79932410000.4035
0.39799.84002420000.4032
0.39659.88072430000.4029
0.39839.92132440000.4026
0.39979.96202450000.4025

Framework Versions

  • Transformers: 4.43.3
  • PyTorch: 2.4.0+cu121
  • Datasets: 2.20.0
  • Tokenizers: 0.19.1

Acknowledgements

We acknowledge and thank the authors of the SAFE framework for their valuable contribution to the field of molecular design.

References

@inproceedings{
  lombard2024molecular,
  title={Molecular Generation with State Space Sequence Models},
  author={Anri Lombard and Shane Acton and Ulrich Armel Mbou Sob and Jan Buys},
  booktitle={NeurIPS 2024 Workshop on AI for New Drug Modalities},
  year={2024},
  url={https://openreview.net/forum?id=1ib5oyTQIb}
}
@article{noutahi2024gotta,
  title={Gotta be SAFE: a new framework for molecular design},
  author={Noutahi, Emmanuel and Gabellini, Cristian and Craig, Michael and Lim, Jonathan SC and Tossou, Prudencio},
  journal={Digital Discovery},
  volume={3},
  number={4},
  pages={796--804},
  year={2024},
  publisher={Royal Society of Chemistry}
}
datamol-io
generated_from_trainer
gpt2
molecule-design
safe
safetensors
smiles

anrilombard/safe-20m

Model

SAFE_20M

0

28 commits

1 linked in READMEs

updated Jan 11, 2025

See the code

README

SAFE_20M

SAFE_20M is a transformer-based model designed for molecular generation tasks. This model was trained from scratch on the MOSES dataset, which has been converted from SMILES to the SAFE (SMILES Augmented For Encoding) format to enhance molecular representation for machine learning applications.

Evaluation Results

On the evaluation set, SAFE_20M achieved the following result:

  • Loss: 0.4024

Model Description

SAFE_20M leverages the SAFE framework to generate valid and diverse molecular structures. By converting the MOSES dataset from SMILES to SAFE format, the model benefits from improved molecular encoding, facilitating better performance in various applications such as:

  • Drug Discovery: Identifying potential drug candidates with desirable properties.
  • Materials Science: Designing new materials with specific characteristics.
  • Chemical Engineering: Innovating chemical processes and compounds.

SAFE Framework

The SAFE framework, integral to SAFE_20M, was introduced in the following paper:

@article{noutahi2024gotta,
  title={Gotta be SAFE: a new framework for molecular design},
  author={Noutahi, Emmanuel and Gabellini, Cristian and Craig, Michael and Lim, Jonathan SC and Tossou, Prudencio},
  journal={Digital Discovery},
  volume={3},
  number={4},
  pages={796--804},
  year={2024},
  publisher={Royal Society of Chemistry}
}

We acknowledge and thank the authors for their valuable contribution to the field of molecular design.

Intended Uses & Limitations

Intended Uses

SAFE_20M is primarily intended for:

  • Generating Molecular Structures: Creating novel molecules with desired properties.
  • Exploring Chemical Space: Navigating the vast landscape of possible chemical compounds for research and development.
  • Assisting in Material Design: Facilitating the creation of new materials with specific functionalities.

Limitations

  • Validation Required: Outputs should be validated by domain experts before practical application.
  • Synthetic Feasibility: Generated molecules may not always be synthetically feasible.
  • Dataset Scope: The model's knowledge is limited to the chemical space represented in the MOSES dataset.

Training and Evaluation Data

The model was trained on the MOSES (MOlecular SEtS) dataset, a benchmark dataset for molecular generation. The dataset was converted from SMILES to the SAFE format to enhance molecular representation for machine learning tasks.

Training Procedure

Training Hyperparameters

The following hyperparameters were used during training:

  • Learning Rate: 0.0005
  • Training Batch Size: 32
  • Evaluation Batch Size: 32
  • Seed: 42
  • Gradient Accumulation Steps: 2
  • Total Training Batch Size: 64
  • Optimizer: Adam (betas=(0.9, 0.999), epsilon=1e-08)
  • Learning Rate Scheduler: Linear with 20,000 warmup steps
  • Number of Epochs: 10

Training Results

Training LossEpochStepValidation Loss
1.15480.040710001.0531
0.83840.081320000.7846
0.73270.122030000.6928
0.68250.162640000.6570
0.64680.203350000.6206
0.62350.244060000.5964
0.60630.284670000.5838
0.59040.325380000.5679
0.57910.366090000.5593
0.56990.4066100000.5527
0.56410.4473110000.5441
0.55370.4879120000.5399
0.55180.5286130000.5355
0.55010.5693140000.5353
0.5420.6099150000.5278
0.54220.6506160000.5263
0.53670.6912170000.5239
0.53660.7319180000.5206
0.53390.7726190000.5206
0.53490.8132200000.5160
0.52480.8539210000.5158
0.52210.8945220000.5082
0.51720.9352230000.5077
0.51220.9759240000.5030
0.50941.0165250000.5002
0.5071.0572260000.4983
0.5081.0979270000.4935
0.50411.1385280000.4934
0.5021.1792290000.4920
0.50211.2198300000.4888
0.50051.2605310000.4882
0.49731.3012320000.4876
0.49541.3418330000.4859
0.49141.3825340000.4843
0.49461.4231350000.4837
0.49081.4638360000.4810
0.49051.5045370000.4806
0.48811.5451380000.4791
0.48681.5858390000.4780
0.48961.6264400000.4777
0.4841.6671410000.4774
0.48551.7078420000.4742
0.48371.7484430000.4742
0.48741.7891440000.4743
0.48171.8298450000.4727
0.48111.8704460000.4732
0.48011.9111470000.4713
0.48081.9517480000.4710
0.47971.9924490000.4703
0.47652.0331500000.4697
0.47622.0737510000.4684
0.47762.1144520000.4682
0.47442.1550530000.4691
0.47562.1957540000.4674
0.47412.2364550000.4661
0.47462.2770560000.4669
0.47262.3177570000.4660
0.47162.3583580000.4647
0.47182.3990590000.4648
0.47112.4397600000.4638
0.47182.4803610000.4643
0.46992.5210620000.4631
0.47062.5617630000.4622
0.4732.6023640000.4623
0.46712.6430650000.4613
0.46772.6836660000.4621
0.46812.7243670000.4609
0.47182.7650680000.4600
0.46492.8056690000.4598
0.46592.8463700000.4596
0.46612.8869710000.4589
0.46512.9276720000.4586
0.46592.9683730000.4581
0.46293.0089740000.4580
0.46313.0496750000.4589
0.46383.0902760000.4574
0.46233.1309770000.4566
0.46313.1716780000.4565
0.46333.2122790000.4557
0.46093.2529800000.4549
0.46163.2936810000.4546
0.46133.3342820000.4557
0.46023.3749830000.4544
0.46123.4155840000.4550
0.45883.4562850000.4532
0.46023.4969860000.4531
0.4593.5375870000.4537
0.45983.5782880000.4528
0.46063.6188890000.4530
0.46143.6595900000.4523
0.45753.7002910000.4515
0.46013.7408920000.4517
0.45783.7815930000.4517
0.45733.8221940000.4507
0.4573.8628950000.4508
0.45963.9035960000.4507
0.45663.9441970000.4498
0.45713.9848980000.4491
0.45294.0255990000.4504
0.45154.06611000000.4496
0.45254.10681010000.4492
0.45344.14741020000.4489
0.45334.18811030000.4484
0.45444.22881040000.4471
0.45244.26941050000.4473
0.45244.31011060000.4478
0.45354.35071070000.4462
0.45314.39141080000.4463
0.4524.43211090000.4467
0.45354.47271100000.4460
0.45234.51341110000.4459
0.45124.55401120000.4454
0.44874.59471130000.4454
0.45034.63541140000.4453
0.45284.67601150000.4444
0.44824.71671160000.4444
0.45084.75741170000.4435
0.45174.79801180000.4438
0.44844.83871190000.4441
0.45094.87931200000.4437
0.44854.92001210000.4429
0.45074.96071220000.4428
0.44625.00131230000.4424
0.44695.04201240000.4419
0.44545.08261250000.4421
0.44785.12331260000.4413
0.4455.16401270000.4413
0.44565.20461280000.4404
0.44475.24531290000.4405
0.44515.28591300000.4405
0.44645.32661310000.4411
0.44415.36731320000.4392
0.44465.40791330000.4405
0.44275.44861340000.4391
0.44315.48931350000.4390
0.44695.52991360000.4391
0.44215.57061370000.4387
0.44445.61121380000.4378
0.44315.65191390000.4374
0.44225.69261400000.4369
0.44095.73321410000.4373
0.4445.77391420000.4368
0.44235.81451430000.4376
0.44185.85521440000.4370
0.44095.89591450000.4352
0.44165.93651460000.4358
0.445.97721470000.4357
0.4376.01791480000.4347
0.43556.05851490000.4350
0.43716.09921500000.4346
0.43646.13981510000.4350
0.43656.18051520000.4336
0.43746.22121530000.4336
0.43546.26181540000.4335
0.43646.30251550000.4335
0.4366.34311560000.4327
0.43656.38381570000.4332
0.43686.42451580000.4320
0.43636.46511590000.4317
0.43676.50581600000.4320
0.4366.54641610000.4316
0.43516.58711620000.4317
0.4366.62781630000.4310
0.43346.66841640000.4307
0.43486.70911650000.4301
0.43576.74981660000.4293
0.43276.79041670000.4295
0.43486.83111680000.4294
0.43236.87171690000.4284
0.43346.91241700000.4283
0.43176.95311710000.4279
0.4336.99371720000.4284
0.42737.03441730000.4279
0.42727.07501740000.4275
0.42657.11571750000.4269
0.42877.15641760000.4268
0.42827.19701770000.4264
0.42677.23771780000.4267
0.42717.27831790000.4256
0.42827.31901800000.4254
0.4277.35971810000.4251
0.42627.40031820000.4249
0.42727.44101830000.4248
0.42717.48171840000.4243
0.42617.52231850000.4236
0.42737.56301860000.4237
0.42627.60361870000.4238
0.4267.64431880000.4232
0.42437.68501890000.4226
0.42427.72561900000.4219
0.4277.76631910000.4215
0.42367.80691920000.4211
0.4227.84761930000.4211
0.42247.88831940000.4204
0.42377.92891950000.4201
0.4247.96961960000.4200
0.41618.01021970000.4196
0.41728.05091980000.4193
0.41658.09161990000.4192
0.41518.13222000000.4189
0.4178.17292010000.4184
0.41728.21362020000.4182
0.41818.25422030000.4180
0.41678.29492040000.4170
0.41848.33552050000.4168
0.41488.37622060000.4164
0.41718.41692070000.4157
0.4178.45752080000.4158
0.41748.49822090000.4153
0.41598.53882100000.4149
0.41418.57952110000.4149
0.41418.62022120000.4144
0.41218.66082130000.4139
0.41348.70152140000.4133
0.41268.74212150000.4135
0.41418.78282160000.4125
0.41268.82352170000.4125
0.41178.86412180000.4119
0.41148.90482190000.4115
0.41028.94552200000.4113
0.41238.98612210000.4103
0.40459.02682220000.4104
0.40399.06742230000.4104
0.40429.10812240000.4100
0.40639.14882250000.4092
0.40459.18942260000.4091
0.40529.23012270000.4086
0.40419.27072280000.4082
0.40429.31142290000.4077
0.4039.35212300000.4077
0.40479.39272310000.4070
0.40149.43342320000.4067
0.40329.47402330000.4062
0.40189.51472340000.4059
0.40159.55542350000.4054
0.40059.59602360000.4050
0.40169.63672370000.4049
0.40129.67742380000.4043
0.40149.71802390000.4040
0.39959.75872400000.4037
0.3989.79932410000.4035
0.39799.84002420000.4032
0.39659.88072430000.4029
0.39839.92132440000.4026
0.39979.96202450000.4025

Framework Versions

  • Transformers: 4.43.3
  • PyTorch: 2.4.0+cu121
  • Datasets: 2.20.0
  • Tokenizers: 0.19.1

Acknowledgements

We acknowledge and thank the authors of the SAFE framework for their valuable contribution to the field of molecular design.

References

@inproceedings{
  lombard2024molecular,
  title={Molecular Generation with State Space Sequence Models},
  author={Anri Lombard and Shane Acton and Ulrich Armel Mbou Sob and Jan Buys},
  booktitle={NeurIPS 2024 Workshop on AI for New Drug Modalities},
  year={2024},
  url={https://openreview.net/forum?id=1ib5oyTQIb}
}
@article{noutahi2024gotta,
  title={Gotta be SAFE: a new framework for molecular design},
  author={Noutahi, Emmanuel and Gabellini, Cristian and Craig, Michael and Lim, Jonathan SC and Tossou, Prudencio},
  journal={Digital Discovery},
  volume={3},
  number={4},
  pages={796--804},
  year={2024},
  publisher={Royal Society of Chemistry}
}
datamol-io
generated_from_trainer
gpt2
molecule-design
safe
safetensors
smiles