Personalized Federated Fine-Tuning of Language Models
Resumo
Atualmente, modelos de linguagem vêm sendo utilizados em diversas aplicações, frequentemente adaptados com dados de maior qualidade das tarefas alvo. Porém, o difícil acesso aos dados, distribuídos em diversas fontes e com restrições de privacidade, inviabiliza o treinamento tradicional centralizado. O Aprendizado Federado surge como alternativa, possibilitando o treinamento distribuído sem o compartilhamento de dados brutos. No entanto, a adaptação federada apresenta dois principais desafios: altos custos de treinamento e comunicação e heterogeneidade dos dados, variando em domínios e distribuições. Dessa forma, essa dissertação desenvolve soluções baseadas na personalização dos modelos através do agrupamento de clientes combinadas a técnicas de ajuste eficiente, em quatro principais contribuições: (i) um método agrupamento de clientes baseado em similaridade de modelos para cenários clássicos de FL (ii) um pipeline de ajuste eficiente de modelos de linguagem federados e seus trade-offs (iii) um metodo que une o agrupamento de clientes com adaptação eficiente para construir modelos multilíngues especializados por idioma e (iv) um novo método de personalização centrado na tarefa, juntando mecanismos de agrupamento local e global com roteamento adaptativo na inferência a tempo de teste. Os resultados e desenvolvimentos destacam a melhora das métricas de performance e eficiência de treinamento quando comparados com diversas soluções da literatura para cenários restritos de recursos e sobre heterogeneidade de dados, demonstrando sua eficácia e importância.
Referências
Allal, L. B., Lozhkov, A., Bakouch, E., von Werra, L., and Wolf, T. (2024). Smollm - blazingly fast and remarkably powerful.
Arivazhagan, M. G., Aggarwal, V., Singh, A. K., and Choudhary, S. (2019). Federated learning with personalization layers. arXiv preprint arXiv:1912.00818.
Babakniya, S., Elkordy, A. R., Ezzeldin, Y. H., Liu, Q., Song, K.-B., El-Khamy, M., and Avestimehr, S. (2023). Slora: Federated parameter efficient fine-tuning of language models. arXiv preprint arXiv:2308.06522.
Bai, J., Chen, D., Qian, B., Yao, L., and Li, Y. (2024). Federated fine-tuning of large language models under heterogeneous language tasks and client resources. arXiv e-prints, pages arXiv–2402.
Braun, C., Jarczewski, R. O., Talasso, G. U., Villas, L. A., and de Souza, A. M. (2025). Beyond shortest path: Agentic vehicular routing with semantic context. arXiv preprint arXiv:2511.04464.
Cho, Y. J., Wang, J., and Joshi, G. (2022). Towards understanding biased client selection in federated learning. In International Conference on Artificial Intelligence and Statistics, pages 10351–10375. PMLR.
de Souza, A. M., da Costa, J. B., Guidoni, D., Talasso, G., Maciel, F., Gonzalez, L. F., Cerqueira, E., Bittencourt, L. F., Loureiro, A. A., and Villas, L. A. Fine-tuning federado de modelos de linguagem na era da comunicaçao.
Dettmers, T., Pagnoni, A., Holtzman, A., and Zettlemoyer, L. (2024). Qlora: Efficient finetuning of quantized llms. Advances in Neural Information Processing Systems, 36.
Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., Fan, A., et al. (2024). The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
Guo, H., Yuan, S., and Wu, X. (2021). Logbert: Log anomaly detection via bert. In 2021 international joint conference on neural networks (IJCNN), pages 1–8. IEEE.
Guo, P., Zeng, S., Wang, Y., Fan, H., Wang, F., and Qu, L. (2024). Selective aggregation for low-rank adaptation in federated learning. arXiv preprint arXiv:2410.01463.
Houlsby, N., Giurgiu, A., Jastrzebski, S., Morrone, B., De Laroussilhe, Q., Gesmundo, A., Attariyan, M., and Gelly, S. (2019). Parameter-efficient transfer learning for NLP. In Chaudhuri, K. and Salakhutdinov, R., editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2790–2799. PMLR.
Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., and Chen, W. (2021). Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685.
Jarczewski, R. O., Talasso, G. U., Villas, L., and de Souza, A. M. (2026). Agentic federated learning: The future of distributed training orchestration. arXiv preprint arXiv:2604.04895.
Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., and Amodei, D. (2020). Scaling laws for neural language models. arXiv preprint arXiv:2001.08361.
Kornblith, S., Norouzi, M., Lee, H., and Hinton, G. (2019). Similarity of neural network representations revisited. In International conference on machine learning, pages 3519–3529. PMLR.
Kuang, W., Qian, B., Li, Z., Chen, D., Gao, D., Pan, X., Xie, Y., Li, Y., Ding, B., and Zhou, J. (2024). Federatedscope-llm: A comprehensive package for fine-tuning large language models in federated learning. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 5260–5271.
Li, Q., Diao, Y., Chen, Q., and He, B. (2022). Federated learning on non-iid data silos: An experimental study. In 2022 IEEE 38th international conference on data engineering (ICDE), pages 965–978. IEEE.
Long, G., Shen, T., Jiang, J., Blumenstein, M., et al. (2024). Dual-personalizing adapter for federated foundation models. Advances in Neural Information Processing Systems, 37:39409–39433.
Lu, Z., Li, X., Cai, D., Yi, R., Liu, F., Zhang, X., Lane, N. D., and Xu, M. (2024). Small language models: Survey, measurements, and insights. arXiv preprint arXiv:2409.15790.
McMahan, B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A. (2017). Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pages 1273–1282. PMLR.
Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al. (2019). Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
Sun, Y., Li, Z., Li, Y., and Ding, B. (2024). Improving lora in privacy-preserving federated learning. arXiv preprint arXiv:2403.12313.
T Dinh, C., Tran, N., and Nguyen, J. (2020). Personalized federated learning with moreau envelopes. Advances in neural information processing systems, 33:21394–21405.
Talasso, G., de Souza, A., Guidoni, D., Cerqueira, E., and Villas, L. (2025a). Fine-tuning eficiente de modelos de linguagem para detectar anomalias em logs privados usando aprendizado federado. In Anais do XLIII Simpósio Brasileiro de Redes de Computadores e Sistemas Distribuídos, pages 126–139, Porto Alegre, RS, Brasil. SBC.
Talasso, G., Souza, A., and Villas, L. (2026a). Feddale: Detecção de anomalias eficiente em logs distribuídos com pequenos modelos de linguagem federados. In Anais do I Workshop de Inteligência Artificial para Redes de Computadores, pages 85–98, Porto Alegre, RS, Brasil. SBC.
Talasso, G. U., de Souza, A. M., Bittencourt, L. F., Cerqueira, E., Loureiro, A. A. F., and Villas, L. A. (2024). Fedsccs: Hierarchical clustering with multiple models for federated learning. In ICC 2024 - IEEE International Conference on Communications, pages 3280–3285.
Talasso, G. U., de Souza, A. M., Gonzalez, L. F. G., Cerqueira, E., Loureiro, A. A. F., and Villas, L. A. (2025b). Leveraging federated learning for multilingual and private language models via model clustering. In 2025 3rd International Conference on Federated Learning Technologies and Applications (FLTA), pages 25–32.
Talasso, G. U., Kurmanji, M., de Souza, A. M., Lane, N. D., and Villas, L. A. (2026b). Task-centric personalized federated fine-tuning of language models.
Tan, A. Z., Yu, H., Cui, L., and Yang, Q. (2022). Towards personalized federated learning. IEEE transactions on neural networks and learning systems, 34(12):9587–9603.
Tian, C., Shi, Z., Guo, Z., Li, L., and Xu, C.-Z. (2024). Hydralora: An asymmetric lora architecture for efficient fine-tuning. Advances in Neural Information Processing Systems, 37:9565–9584.
Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. (2023a). Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., et al. (2023b). Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
Villalobos, P., Ho, A., Sevilla, J., Besiroglu, T., Heim, L., and Hobbhahn, M. (2022). Will we run out of data? limits of llm scaling based on human-generated data. arXiv preprint arXiv:2211.04325.
Xu, W., Huang, L., Fox, A., Patterson, D., and Jordan, M. I. (2009). Detecting large-scale system problems by mining console logs. In Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles, SOSP ’09, page 117–132, New York, NY, USA. Association for Computing Machinery.
Ye, R., Ge, R., Zhu, X., Chai, J., Du, Y., Liu, Y., Wang, Y., and Chen, S. (2024a). Fedllm-bench: Realistic benchmarks for federated learning of large language models. arXiv preprint arXiv:2406.04845.
Ye, R., Wang, W., Chai, J., Li, D., Li, Z., Xu, Y., Du, Y., Wang, Y., and Chen, S. (2024b). Openfedllm: Training large language models on decentralized private data via federated learning. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 6137–6147.
Zhang, J., Vahidian, S., Kuo, M., Li, C., Zhang, R., Yu, T., Wang, G., and Chen, Y. (2024). Towards building the federatedgpt: Federated instruction tuning. In ICASSP 2024 - 2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6915–6919.
Zhu, H., Xu, J., Liu, S., and Jin, Y. (2021). Federated learning on non-iid data: A survey. Neurocomputing, 465:371–390.
