| # π SpecCLIP: Aligning and Translating Spectroscopic Measurements for Stars | |
| [](https://arxiv.org/abs/2507.01939) | |
| [](https://github.com/Xiaosheng-Zhao/SpecCLIP) | |
| [](https://github.com/Xiaosheng-Zhao/SpecCLIP/blob/main/LICENSE) | |
| **SpecCLIP** is a contrastive + domain-preserving foundation model designed to align **LAMOST LRS** spectra with **Gaia XP** spectrophotometric data. | |
| It learns a **general-purpose spectral embedding (768-dim)** that supports: | |
| * **Stellar parameter estimation** | |
| * **Cross-survey spectral translation** (LAMOST LRS β· Gaia XP) | |
| * **Similarity retrieval** across LAMOST LRS and GAIA XP spectra | |
| For full documentation, installation instructions, examples, and end-to-end usage, please visit the **GitHub repository**: | |
| π [https://github.com/Xiaosheng-Zhao/SpecCLIP](https://github.com/Xiaosheng-Zhao/SpecCLIP) | |
| --- | |
| ## π§ Available Models | |
| The following pretrained weights are included in this model repository: | |
| | File | Description | Embedding Dim | Param | | |
| | -------------------------------------------- | ------------------------------------- | ------------- | ------| | |
| | `encoders/lrs_encoder.ckpt` | LAMOST LRS masked transformer encoder | 768 | 43M | | |
| | `encoders/xp_encoder.ckpt` | Gaia XP masked transformer encoder | 768 | 43M | | |
| | `encoders/xp_encoder_mlp.ckpt` | Gaia XP autoencoder (MLP head) | 768 | 43M | | |
| | `specclip/specclip_model_base.ckpt` | Gaia XP β· LAMOST contrastive | 768 | 100M | | |
| | `specclip/specclip_model_predrecon_mlp.ckpt` | CLIP alignment + pred+recon | 768 | 168M | | |
| | `specclip/specclip_model_split_mlp.ckpt` | CLIP alignment + split pred/recon | 768 | 126M | | |
| --- | |
| ## π§ What the Model Does | |
| SpecCLIP consists of: | |
| * **Two masked transformer encoders** | |
| β LAMOST LRS | |
| β Gaia XP | |
| * **Contrastive alignment loss (CLIP-style)** | |
| * **Domain-preserving prediction & reconstruction heads** | |
| * **Cross-modal decoder** for spectrum translation | |
| It produces **shared embeddings** enabling multi-survey astrophysical analysis. | |
| --- | |
| ## π Full Documentation | |
| To keep the Hugging Face card concise, **all detailed instructions**, including: | |
| * Installation | |
| * Parameter prediction | |
| * Spectral translation | |
| * Retrieval | |
| * Full examples (Python + figures) | |
| * Acknowledgments | |
| are available at the GitHub repo: | |
| π **[https://github.com/Xiaosheng-Zhao/SpecCLIP](https://github.com/Xiaosheng-Zhao/SpecCLIP)** | |
| --- | |
| ## π Citation | |
| ```bibtex | |
| @ARTICLE{2025arXiv250701939Z, | |
| author = {{Zhao}, Xiaosheng and {Huang}, Yang and {Xue}, Guirong and {Kong}, Xiao and | |
| {Liu}, Jifeng and {Tang}, Xiaoyu and {Beers}, Timothy C. and | |
| {Ting}, Yuan-Sen and {Luo}, A-Li}, | |
| title = "{SpecCLIP: Aligning and Translating Spectroscopic Measurements for Stars}", | |
| journal = {arXiv e-prints}, | |
| keywords = {Instrumentation and Methods for Astrophysics, Solar and Stellar Astrophysics, | |
| Artificial Intelligence, Machine Learning}, | |
| year = 2025, | |
| month = jul, | |
| eid = {arXiv:2507.01939}, | |
| pages = {arXiv:2507.01939}, | |
| doi = {10.48550/arXiv.2507.01939}, | |
| archivePrefix = {arXiv}, | |
| eprint = {2507.01939}, | |
| primaryClass = {astro-ph.IM}, | |
| } | |
| ``` | |
| --- | |
| ## π¬ Contact | |
| * GitHub Issues: [https://github.com/Xiaosheng-Zhao/SpecCLIP/issues](https://github.com/Xiaosheng-Zhao/SpecCLIP/issues) | |
| * Email: [[email protected]](mailto:[email protected]) | |