LUCAS-MEGA Part 2: Learning Soil as an Interconnected System

Kuangdai Leng

Research Scientist

I’m Kuangdai Leng, a Research Scientist at Earth Rover Program. My work focuses on AI methods for complex scientific systems, including multimodal representation learning, physics-informed modelling, and AI agents for data retrieval and data-grounded reasoning.

I joined ERP because soil is central to climate, food, water, biodiversity, and land restoration, but its complexity and high variability also make it a challenging frontier for AI for Science.

In Part 1 of this blog I introduced LUCAS-MEGA as a data foundation: a way to bring fragmented European soil and environmental information into one open, machine-learning-ready resource. This second blog turns to the modelling question. Once soil measurements, climate, land use, images, and other environmental signals are brought together, can a model learn useful relationships between them?

The model we built for this question is called SoilFormer.

From Some-to-Some to Any-to-Any

Soil does not work one variable at a time. Organic carbon is related to texture, land use, climate, nutrients, water, and biological activity. pH, clay, sand, bulk density, and crop productivity are not isolated measurements; they are different views of the same soil-environment system.

Much of traditional soil modelling is some-to-some. A researcher selects some properties as inputs, selects one or a few properties as outputs, and trains a relatively small predictive model for that specific task. This is useful, but it also limits the model to the relationships chosen in advance.

SoilFormer follows a more modern any-to-any direction. Instead of fixing one input-output pair, the model learns from many variables together. Any observed variables can provide context, and any hidden variable can become the prediction target. For soil, this means asking the model to learn how different measurements tend to fit together.

SoilFormer: Learning from Incomplete Soil Observations

To test this idea, we trained SoilFormer, a model designed to learn from the mixed data types in LUCAS-MEGA. It can use numerical variables such as pH or organic carbon, categorical variables such as land cover class, and visual information from site photographs.

The training task is similar to a fill-in-the-blank exercise, but for soil variables. During training, we hide some values that are actually known and ask the model to reconstruct them from the remaining information. Across training, the hidden target changes, so the model is not only learning one fixed prediction task. It is learning how many soil and environmental variables relate to one another.

This reflects the reality of soil data. Some samples have organic carbon and pH but no hydraulic measurement. Others have land cover and climate information but fewer laboratory measurements. SoilFormer is trained in a way that works with this uneven evidence rather than pretending every sample has every variable.

Overview of the SoilFormer architecture.

What the Model Learned

After training, we looked at whether SoilFormer had learned relationships that make scientific sense.

One encouraging signal is that many predictions fell into a low-error, low-uncertainty region. In plain language, this means the model could often reconstruct hidden values accurately and with confidence when enough related information was available.

Model behaviour and uncertainty during reconstruction.

More importantly, the relationships learned by the model were not arbitrary. Several examples matched known soil logic:

  • pH measured in different chemical solutions showed strong mutual association.

  • Bulk density and packing density were strongly related.

  • Clay, silt, and sand showed the expected trade-offs.

  • Soil organic carbon was positively associated with clay and more weakly with silt, while decreasing with sand.

  • Nitrogen-related information appeared as a broad source of predictive signal across several soil properties.

These are not surprising relationships to a soil scientist, and that is exactly the point. A useful model should recover patterns that are consistent with established soil knowledge before we trust it for more ambitious tasks.

Feature interaction signals learned by SoilFormer.

What This Means

These results should not be read as causal proof. SoilFormer is not running controlled experiments. It is learning predictive relationships from data.

But that still matters. If a model trained on LUCAS-MEGA learns relationships that align with known soil processes, this suggests that the fused dataset contains meaningful structure. It is not just a large collection of loosely connected variables.

This is also where Part 1 and Part 2 connect. The data construction work matters because the modelling work depends on it. If the dataset is poorly organised, the model has little chance of learning useful patterns. If the dataset preserves real soil-environment relationships, then this kind of any-to-any learning becomes possible.

For soil scientists and environmental practitioners, LUCAS-MEGA provides a centralised, documented resource for exploring soil-environment relationships across Europe. For machine-learning researchers, it provides a realistic testbed for learning from mixed data types, uneven coverage, and uncertainty. For applied teams, it provides a foundation for tools that can retrieve, compare, and interpret soil information in more usable ways.

None of this replaces field science. Better soil intelligence still depends on sampling, laboratory work, expert interpretation, and local knowledge. LUCAS-MEGA and SoilFormer are useful because they help those efforts travel further: each observation becomes easier to connect with other evidence, and each dataset becomes easier to reuse.

What Comes Next

We expect LUCAS-MEGA to grow as new soil and environmental data become available. The same approach, combining clear data-mapping rules with agent-assisted processing, can support future European updates and could eventually help connect regional soil datasets into broader global soil intelligence infrastructure.

The modelling work will grow with it. SoilFormer is an early step towards learning from soil as a connected system. Future work can extend the modelling framework to handle richer text information, more difficult data gaps, input uncertainty, and broader forms of soil-environment reasoning.

Open Resources

The LUCAS-MEGA resources are available openly:



Read more

Kuangdai Leng

Kuangdai Leng

Research Scientist

LUCAS-MEGA Part 1: From Fragmented Soil Data to Usable Soil Intelligence

I’m Kuangdai Leng, a Research Scientist at Earth Rover Program. My work focuses on AI methods for complex scientific systems, including multimodal representation learning, physics-informed modelling, and AI agents for data retrieval and data-grounded reasoning.

Jiayao Meng

Research Scientist

Can a £1 chip tell us what's beneath our feet? How tiny MEMS sensors are scaling up soil health monitoring

Monitoring soil health on a massive scale requires tools that are affordable, non-invasive, and highly scalable. To achieve this, the Earth Rover Program is developing a new generation of wireless sensors using MEMS accelerometers. In this blog, I will explore how these cheap, tiny chips are replacing bulky, wired traditional sensors to scale up high-frequency "Soilsmology" surveys and equip farmers worldwide.

Lady in green overalls in a field doing an experiement

Lady smiling towards camera

Morine Wangechi

Research Scientist

Rising Beyond Traditions: Monitoring Kenyan Soils and Ecosystems Using Non-Invasive Seismic Technology

Agriculture in Kenya heavily relies on fertilizers, and traditional soil sampling methods have been extensively used to monitor and quantify soil health. The Earth Rover Program (ERP), a not-for-profit organisation, aims to empower farmers to sustain high yields while minimising interventions. ERP has leveraged traditional seismic technologies for non-invasively “seeing” into the soil.

Joe Collins.

Joe Collins

Senior Research Associate

The Harper Adams and BASE-UK Conservation Agriculture Systems Experiment.

Conservation Agriculture (CA) manages farms to boost productivity while protecting soil health. In this blog, I’ll outline the experiment’s setup, highlight key results, and show how it has supported other research, including work with the Earth Rover Program.

Get occasional updates on new work, insights and useful resources.

By subscribing you agree to receive occasional emails. You can unsubscribe at any time.

Get occasional updates on new work, insights and useful resources.

By subscribing you agree to receive occasional emails. You can unsubscribe at any time.