Deep Learning with Pretrained 'Internal World' Layers: A Gemma 3-Based Modular Architecture for Wildfire Prediction

Ayoub Jadouli, Chaker El Amrani
4/20/2025
1 citation
cs.LGcs.AI
transformer-attention

No official code found. Best implementation: AyoubJadouli/Gemma3-InternalWorld-WildFire (2 stars, Python, MIT, last commit 2025-04-19). 1 more below.

Abstract

Deep learning models, especially large Transformers, carry substantial "memory" in their intermediate layers -- an \emph{internal world} that encodes a wealth of relational and contextual knowledge. This work harnesses that internal world for wildfire occurrence prediction by introducing a modular architecture built upon Gemma 3, a state-of-the-art multimodal model.

Show full abstract

Rather than relying on Gemma 3's original embedding and positional encoding stacks, we develop a custom feed-forward module that transforms tabular wildfire features into the hidden dimension required by Gemma 3's mid-layer Transformer blocks. We freeze these Gemma 3 sub-layers -- thus preserving their pretrained representation power -- while training only the smaller input and output networks. This approach minimizes the number of trainable parameters and reduces the risk of overfitting on limited wildfire data, yet retains the benefits of Gemma 3's broad knowledge. Evaluations on a Moroccan wildfire dataset demonstrate improved predictive accuracy and robustness compared to standard feed-forward and convolutional baselines. Ablation studies confirm that the frozen Transformer layers consistently contribute to better representations, underscoring the feasibility of reusing large-model mid-layers as a learned internal world. Our findings suggest that strategic modular reuse of pretrained Transformers can enable more data-efficient and interpretable solutions for critical environmental applications such as wildfire risk management.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
AyoubJadouli/Gemma3-InternalWorld-WildFireCommunity2PythonMIT2025-04-19
AyoubJadouli/Deep-Learning-with-Pretrained-Internal-World-LayersCommunity0Python–2025-04-13
MIT

This repository contains the implementation of a novel architecture for wildfire prediction described in our paper "Deep Learning with Pretrained 'Internal World' Layers: A Gemma 3-Based Modular Architecture for Wildfire Prediction".

20Python, Jupyter NotebookApr 19, 20251 years agoMIT

Deep Learning with Pretrained ’Internal World’ Layers: A Gemma 3-Based Modular Architecture for Wildfire Prediction

00PythonApr 13, 20251 years ago

Similar Papers

Cite this paper

@article{jadouli2025deep,
  title  = {Deep Learning with Pretrained 'Internal World' Layers: A Gemma 3-Based Modular Architecture for Wildfire Prediction},
  author = {Ayoub Jadouli and Chaker El Amrani},
  year   = {2025},
  eprint = {2504.18562},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.18562v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.18562.svg)](https://codeofpaper.com/paper/2504.18562)

Discussion