Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
---
|
| 2 |
title: "MoMa: Modular Deep Learning Framework for Material Property Prediction"
|
| 3 |
-
emoji: π§ͺ
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: static
|
|
@@ -14,14 +13,12 @@ tags:
|
|
| 14 |
- pytorch
|
| 15 |
---
|
| 16 |
|
| 17 |
-
#
|
| 18 |
|
| 19 |
<div align="center">
|
| 20 |
|
| 21 |
[](https://arxiv.org/abs/2502.15483)
|
| 22 |
[](https://opensource.org/licenses/MIT)
|
| 23 |
-
[](https://www.python.org/downloads/)
|
| 24 |
-
[](https://pytorch.org/)
|
| 25 |
[](https://huggingface.co/yuanhangtangle-air/moma-modules)
|
| 26 |
|
| 27 |
**[π Paper](https://arxiv.org/abs/2502.15483) | [π Project Page](https://yuanhangtangle-air.github.io/moma-modules/) | [π» Code](https://github.com/your-repo) | [π Datasets](https://huggingface.co/datasets/your-datasets)**
|
|
@@ -55,14 +52,14 @@ Our repository contains **107 pre-trained modules** spanning **6 major domains**
|
|
| 55 |
|
| 56 |
| Domain | Count | Description |
|
| 57 |
|--------|-------|-------------|
|
| 58 |
-
| **
|
| 59 |
-
| **
|
| 60 |
-
| **
|
| 61 |
-
| **
|
| 62 |
-
| **
|
| 63 |
-
| **
|
| 64 |
-
| **
|
| 65 |
-
| **
|
| 66 |
|
| 67 |
### π Featured Modules
|
| 68 |
|
|
@@ -104,24 +101,13 @@ Our repository contains **107 pre-trained modules** spanning **6 major domains**
|
|
| 104 |
|
| 105 |
</details>
|
| 106 |
|
| 107 |
-
## π οΈ Installation & Usage
|
| 108 |
|
| 109 |
-
##
|
| 110 |
-
|
| 111 |
-
```bash
|
| 112 |
-
# Install required packages
|
| 113 |
-
pip install torch huggingface_hub pandas tqdm
|
| 114 |
-
|
| 115 |
-
# Clone or download the modules
|
| 116 |
-
git clone https://huggingface.co/yuanhangtangle-air/moma-modules
|
| 117 |
-
```
|
| 118 |
-
|
| 119 |
-
### π₯ Download Individual Modules
|
| 120 |
|
| 121 |
```python
|
| 122 |
import shutil
|
| 123 |
from huggingface_hub import hf_hub_download
|
| 124 |
-
|
| 125 |
# Download a specific module
|
| 126 |
cached_file = hf_hub_download(
|
| 127 |
repo_id="yuanhangtangle-air/moma-modules",
|
|
@@ -134,7 +120,7 @@ save_path = "./moma-hub/"
|
|
| 134 |
shutil.copy(cached_file, save_path)
|
| 135 |
```
|
| 136 |
|
| 137 |
-
##
|
| 138 |
|
| 139 |
```python
|
| 140 |
import shutil
|
|
@@ -142,93 +128,31 @@ import pandas as pd
|
|
| 142 |
from huggingface_hub import hf_hub_download
|
| 143 |
from tqdm import tqdm
|
| 144 |
|
| 145 |
-
#
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
-
|
| 151 |
cached_files = []
|
| 152 |
-
for module_name in tqdm(
|
| 153 |
cached_file = hf_hub_download(
|
| 154 |
-
|
| 155 |
-
filename=
|
| 156 |
repo_type="model"
|
| 157 |
)
|
| 158 |
cached_files.append(cached_file)
|
| 159 |
|
| 160 |
-
#
|
| 161 |
save_path = "./moma-hub/"
|
| 162 |
for cached_file in cached_files:
|
| 163 |
shutil.copy(cached_file, save_path)
|
| 164 |
```
|
| 165 |
|
| 166 |
-
##
|
| 167 |
-
|
| 168 |
-
```python
|
| 169 |
-
# Import the framework (pseudo-code - actual implementation may vary)
|
| 170 |
-
from moma import MaterialPropertyPredictor, ModularNetwork
|
| 171 |
-
|
| 172 |
-
# Initialize with pre-trained modules
|
| 173 |
-
model = MaterialPropertyPredictor(
|
| 174 |
-
network=ModularNetwork.from_pretrained('material-property-base'),
|
| 175 |
-
modules=['structure_encoder', 'property_decoder']
|
| 176 |
-
)
|
| 177 |
-
|
| 178 |
-
# Load your material data
|
| 179 |
-
materials = load_material_dataset('your_dataset.csv')
|
| 180 |
-
|
| 181 |
-
# Train the model
|
| 182 |
-
model.train(materials, epochs=100, batch_size=32)
|
| 183 |
-
|
| 184 |
-
# Make predictions
|
| 185 |
-
predictions = model.predict(new_materials)
|
| 186 |
-
|
| 187 |
-
# Evaluate performance
|
| 188 |
-
metrics = model.evaluate(test_materials)
|
| 189 |
-
print(f"Accuracy: {metrics['accuracy']:.3f}")
|
| 190 |
-
```
|
| 191 |
-
|
| 192 |
-
## π Performance Results
|
| 193 |
-
|
| 194 |
-
Our experimental evaluation across **17 datasets** demonstrates MoMa's superior performance:
|
| 195 |
-
|
| 196 |
-
- π₯ **Rank 1.35** average ranking among 5 competing methods
|
| 197 |
-
- π **14/17 tasks** achieve state-of-the-art performance
|
| 198 |
-
- π **14% average improvement** over strongest baseline
|
| 199 |
-
- β‘ **Superior few-shot learning** capabilities
|
| 200 |
-
- π **Excellent continual learning** performance
|
| 201 |
-
|
| 202 |
-
## π Module File Structure
|
| 203 |
-
|
| 204 |
-
```
|
| 205 |
-
moma-modules/
|
| 206 |
-
βββ README.md # This file
|
| 207 |
-
βββ domain-dataset-concept-en.csv # Module descriptions
|
| 208 |
-
βββ Electronic_Structure/ # 28 modules
|
| 209 |
-
β βββ HL_Gap.pt
|
| 210 |
-
β βββ HOMO_Energy.pt
|
| 211 |
-
β βββ LUMO_Energy.pt
|
| 212 |
-
β βββ ...
|
| 213 |
-
βββ Thermodynamics/ # 20 modules
|
| 214 |
-
β βββ jarvis_eform.pt
|
| 215 |
-
β βββ gibbs_free_energy.pt
|
| 216 |
-
β βββ ...
|
| 217 |
-
βββ Spectroscopy/ # 24 modules
|
| 218 |
-
β βββ spec_EXAFS_Fe_EdgeEnergy.pt
|
| 219 |
-
β βββ spec_XANES_Co_PeakHeight.pt
|
| 220 |
-
β βββ ...
|
| 221 |
-
βββ Other_Domains/ # 35 modules
|
| 222 |
-
βββ Mechanical/
|
| 223 |
-
βββ Photovoltaic/
|
| 224 |
-
βββ Adsorption/
|
| 225 |
-
βββ Thermoelectric/
|
| 226 |
-
βββ ...
|
| 227 |
-
```
|
| 228 |
-
|
| 229 |
-
## π¬ Research Impact
|
| 230 |
-
|
| 231 |
-
### π Citation
|
| 232 |
|
| 233 |
If you use MoMa in your research, please cite our paper:
|
| 234 |
|
|
@@ -241,31 +165,17 @@ If you use MoMa in your research, please cite our paper:
|
|
| 241 |
}
|
| 242 |
```
|
| 243 |
|
| 244 |
-
### π Key Contributions
|
| 245 |
-
|
| 246 |
-
1. **Novel Modular Paradigm**: First framework to replace pre-training with specialized module composition
|
| 247 |
-
2. **Comprehensive Evaluation**: Extensive benchmarking across 17 diverse material property datasets
|
| 248 |
-
3. **Open Science**: All 107 modules freely available to accelerate materials discovery
|
| 249 |
-
4. **Superior Performance**: Consistent improvements over traditional approaches
|
| 250 |
-
|
| 251 |
-
## π€ Community & Support
|
| 252 |
-
|
| 253 |
-
- π§ **Contact**: [Your contact information]
|
| 254 |
-
- π **Issues**: [Report bugs or request features]
|
| 255 |
-
- π¬ **Discussions**: [Community discussions]
|
| 256 |
-
- π **Documentation**: [Detailed documentation]
|
| 257 |
-
|
| 258 |
## π License
|
| 259 |
|
| 260 |
-
This project is licensed under the MIT License
|
| 261 |
|
| 262 |
## π Acknowledgments
|
| 263 |
|
| 264 |
We gratefully acknowledge the materials science community and the datasets that made this research possible. Special thanks to:
|
| 265 |
|
| 266 |
-
- Materials Project
|
| 267 |
-
- Open Quantum Materials Database
|
| 268 |
-
- Joint Automated Repository for Various Integrated Simulations
|
| 269 |
- And all other data contributors
|
| 270 |
|
| 271 |
---
|
|
|
|
| 1 |
---
|
| 2 |
title: "MoMa: Modular Deep Learning Framework for Material Property Prediction"
|
|
|
|
| 3 |
colorFrom: blue
|
| 4 |
colorTo: purple
|
| 5 |
sdk: static
|
|
|
|
| 13 |
- pytorch
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# MoMa: Modular Deep Learning Framework for Material Property Prediction
|
| 17 |
|
| 18 |
<div align="center">
|
| 19 |
|
| 20 |
[](https://arxiv.org/abs/2502.15483)
|
| 21 |
[](https://opensource.org/licenses/MIT)
|
|
|
|
|
|
|
| 22 |
[](https://huggingface.co/yuanhangtangle-air/moma-modules)
|
| 23 |
|
| 24 |
**[π Paper](https://arxiv.org/abs/2502.15483) | [π Project Page](https://yuanhangtangle-air.github.io/moma-modules/) | [π» Code](https://github.com/your-repo) | [π Datasets](https://huggingface.co/datasets/your-datasets)**
|
|
|
|
| 52 |
|
| 53 |
| Domain | Count | Description |
|
| 54 |
|--------|-------|-------------|
|
| 55 |
+
| ** Electronic Structure** | 28 | Band gaps, HOMO-LUMO, DOS, dielectric properties |
|
| 56 |
+
| ** Thermodynamics** | 20 | Formation energy, Gibbs free energy, stability |
|
| 57 |
+
| ** Spectroscopy** | 24 | EXAFS, XANES spectral features |
|
| 58 |
+
| ** Mechanical** | 8 | Elastic moduli, piezoelectric properties |
|
| 59 |
+
| ** Photovoltaic** | 8 | Solar cell performance metrics |
|
| 60 |
+
| ** Adsorption** | 8 | Gas adsorption in MOFs |
|
| 61 |
+
| **Thermoelectric** | 8 | Seebeck coefficients, thermal conductivity |
|
| 62 |
+
| ** Other Properties** | 3 | Specialized material characteristics |
|
| 63 |
|
| 64 |
### π Featured Modules
|
| 65 |
|
|
|
|
| 101 |
|
| 102 |
</details>
|
| 103 |
|
|
|
|
| 104 |
|
| 105 |
+
## π₯ Download Individual Modules
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
```python
|
| 108 |
import shutil
|
| 109 |
from huggingface_hub import hf_hub_download
|
| 110 |
+
# see all module names at https://huggingface.co/yuanhangtangle-air/moma-modules/blob/main/module-names.csv
|
| 111 |
# Download a specific module
|
| 112 |
cached_file = hf_hub_download(
|
| 113 |
repo_id="yuanhangtangle-air/moma-modules",
|
|
|
|
| 120 |
shutil.copy(cached_file, save_path)
|
| 121 |
```
|
| 122 |
|
| 123 |
+
## π¦ Download All Modules
|
| 124 |
|
| 125 |
```python
|
| 126 |
import shutil
|
|
|
|
| 128 |
from huggingface_hub import hf_hub_download
|
| 129 |
from tqdm import tqdm
|
| 130 |
|
| 131 |
+
# fetch
|
| 132 |
+
cached_file = hf_hub_download(
|
| 133 |
+
repo_id="yuanhangtangle-air/moma-modules",
|
| 134 |
+
filename="module-names.csv",
|
| 135 |
+
repo_type="model"
|
| 136 |
+
)
|
| 137 |
+
df = pd.read_csv(cached_file)
|
| 138 |
|
| 139 |
+
MODULE_LIST = df['module_names']
|
| 140 |
cached_files = []
|
| 141 |
+
for module_name in tqdm(MODULE_LIST, desc="Downloading Modules"):
|
| 142 |
cached_file = hf_hub_download(
|
| 143 |
+
repo_id="yuanhangtangle-air/moma-modules",
|
| 144 |
+
filename=module_name + ".pt",
|
| 145 |
repo_type="model"
|
| 146 |
)
|
| 147 |
cached_files.append(cached_file)
|
| 148 |
|
| 149 |
+
# save to local path
|
| 150 |
save_path = "./moma-hub/"
|
| 151 |
for cached_file in cached_files:
|
| 152 |
shutil.copy(cached_file, save_path)
|
| 153 |
```
|
| 154 |
|
| 155 |
+
## π Citation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
|
| 157 |
If you use MoMa in your research, please cite our paper:
|
| 158 |
|
|
|
|
| 165 |
}
|
| 166 |
```
|
| 167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
## π License
|
| 169 |
|
| 170 |
+
This project is licensed under the MIT License.
|
| 171 |
|
| 172 |
## π Acknowledgments
|
| 173 |
|
| 174 |
We gratefully acknowledge the materials science community and the datasets that made this research possible. Special thanks to:
|
| 175 |
|
| 176 |
+
- [Materials Project](https://legacy.materialsproject.org/)
|
| 177 |
+
- [Open Quantum Materials Database](https://oqmd.org/materials/)
|
| 178 |
+
- [Joint Automated Repository for Various Integrated Simulations](https://jarvis.nist.gov/)
|
| 179 |
- And all other data contributors
|
| 180 |
|
| 181 |
---
|