OJALÁ: Optimizing J-PAS Astronomy for Large-scale Analysis. A transformer-based model for source classification and physical-parameter inference
The advent of large-scale surveys requires efficient machine learning techniques to exploit massive datasets. We present OJALA, a transformer-based autoregressive model that classifies astronomical objects and infers their physical parameters from 54-band J-PAS photometry combined with broad-band data from the DESI Legacy Imaging Surveys and WISE. The model is trained on approximately 20 million synthetic SEDs generated from DESI DR1 spectra and validated using a cross-matched sample of approximately 121,000 J-PAS and DESI objects. OJALA classifies stars, galaxies, and QSOs and estimates photometric redshifts for galaxies and QSOs. It recovers galaxy stellar masses and star formation rates, predicts optical emission-line equivalent widths and extinction-corrected H$α$ luminosities, and reproduces the BPT and WHAN diagnostic diagrams. It also estimates stellar atmospheric parameters, including effective temperature and metallicity. Comparisons with dedicated multilayer perceptrons show that a single OJALA model generally matches or outperforms specialized predictors and remains robust under incomplete photometric coverage. We release the code, model weights, and a Value Added Catalog for the J-PAS Early Data Release.