Performant Lightweight Encoders for Spanish in the Legal and Administrative Domains

Sara Dueñas-Romero, Alba María Mármol-Romero, Adrián Moreno-Muñoz, Miguel Montoya-Gavilán, Jaime Collado-Montañez, Lucas Molino-Piñar, Isabel Cabrera-de-Castro, Samuel Sánchez-Carrasco, Fabián Suárez-Maroto, Sergio González-Del-Moral, M. Teresa Muñoz-Martín, M. Estrella Vallecillo-Rodríguez, M. Victoria Cantero-Romero, Manuel García-Vega, Miguel Ángel García-Cumbreras, M. Rosario García-Viedma, M. Dolores Molina-González, Fernando Martínez-Santiago, Manuel Carlos Díaz-Galiano, Salud María Jiménez-Zafra, M. Teresa Martín-Valdivia, Eugenio Martínez-Cámara, L. Alfonso Ureña-López, Arturo Montejo-Ráez

Resumen


This work introduces two lightweight, domain-adapted models for Spanish legal and administrative information retrieval, developed within the ALIA initiative: a bi-encoder and a cross-encoder built on the MrBERT-es backbone. Training combines a synthetic data generation pipeline grounded in legal-administrative sources with a six-phase curriculum of progressively increasing difficulty and positive-aware hard-negative mining. Evaluation on general-domain and domain-specific MTEB benchmarks shows that the bi-encoder achieves the best results on legal-administrative retrieval, outperforming larger general-purpose models such as bge-m3 and Qwen3-Embedding. The cross-encoder remains competitive with substantially larger rerankers on specialized Spanish legal datasets. These findings demonstrate that targeted domain adaptation and careful training design can compensate for model scale in specialized retrieval.

Texto completo:

PDF