
When it comes to lightning safety, speed and precision aren’t just technical benchmarks – they’re critical to everything from early storm warnings to decisions that protect lives and infrastructure. That’s why our recent work to enhance the Earth Networks Total Lightning Network® (ENTLN) isn’t just about algorithm updates; it’s about refining the data that safety professionals rely on when it matters most. In this blog, we pull back the curtain on how we achieved an important leap forward – not to showcase the technical process, but to ground your confidence in the data you depend on.
Here’s how we’ll proceed:
- Pulling back the curtain on lightning classification
- Why we need AI to classify lightning
- The many factors that go into developing an AI
Pulling back the curtain on lightning classification
As the leader of AEM’s research and development team, one of my main responsibilities is to continually enhance the ENTLN, ensuring it continues to live up to its reputation for delivering the most reliable and precise lightning detection in the world.
One of the team’s more recent projects involved updating the algorithm that the ENTLN utilizes to distinguish between in-cloud lightning (i.e., lightning that stays in the clouds) and cloud-to-ground lightning (i.e., lightning that makes its way from the clouds to the ground). Although the network already had the ability to distinguish between these classes of lightning with a high degree of reliability, we felt it could do even better with recent advances in artificial intelligence. So, we collaborated with researchers from the New Mexico Institute of Mining & Technology to put that hypothesis to the test.
SPOILER ALERT:
This project was an enormous success, improving the overall accuracy of the ENTLN's lightning classification to better than 95%.
The project provides a fascinating glimpse into what goes into finding, training, and implementing an AI algorithm to distinguish between distinct types of lightning. This is a perfect opportunity to pull back the curtain and show you everything that goes into implementing a single change to the ENTLN.
Why we need AI to classify lightning
Let’s start off with why we depend on the ENTLN, in the first place, to reliably distinguish between in-cloud (IC) and cloud-to-ground (CG) lightning.
Most people can intuitively relate to why we monitor CG lightning. After all, this is the lightning that harms people, causes fires, and damages valuable infrastructure. It poses an immediate threat to people and property in its vicinity.
But, did you know that sudden increases in IC lightning often occur as a storm intensifies and precede dangerous weather events like cloud-to-ground lightning, hail, and tornadoes? Consequently, IC lightning can serve as a valuable warning signal for more dangerous weather that may be on the way.
We distinguish between IC and CG lightning by looking for key differences in the electromagnetic radiation patterns (aka, waveforms) that get picked up by our network sensors. A trained human observer can spot those differences with a high degree of reliability. But there are two problems with relying on humans:
- Humans are relatively slow.
- There is a lot of lightning to be classified.
In the United States alone, there were about 460 million lightning pulses in 2024, which comes out to an average of more than 14 pulses every second. If an average human observer could classify one lightning pulse every 10 seconds, we would need a team of 140 working every second of the day to keep up with all the lightning. It’s just not practical.
To keep up with the immense volume of lightning and provide clients with the near-real-time information they need, we train the ENTLN to classify IC and CG lightning through machine learning or artificial intelligence.
Let’s take a closer look at the process.
What goes into training an AI?
You’ve probably heard that training an AI involves feeding data to an AI algorithm or model to help it improve its accuracy. But the actual process is far more complex and fascinating than this superficial description makes it sound.
There are six main steps:
- Collect the data that will be used to train and test the model.
- Prepare the data for training.
- Select one or more model(s) that seem suitable for the task at hand.
- Train the model(s) by feeding them the data.
- Evaluate the model(s) by testing their results and providing feedback.
- Repeat by iterating the process until the model(s) produce consistent results.
Each of these steps can be highly involved, as they were in this scenario.
DATA COLLECTION
The dataset for this project was made up of over 7,600 lightning pulses captured by the ENTLN over North America, South America, and Asia from December 2018 to July 2021. Each pulse was classified according to its positive or negative polarity/charge. Then, it was further subclassified into whether it was CG or IC, which created a total of four distinct classes (+IC, -IC, +CG, -CG).
Of the 7,600 pulses, about 800 were +CG pulses that were verified and recorded in a paper that appeared in the November 2022 issue of the Journal of Geo-physical Research: Atmospheres. The remaining 6,800 pulses were painstakingly classified by hand by a member of AEM’s research and development team. To ensure accuracy, her manual classifications were double-blind tested to demonstrate an accuracy rate of better than 99%.
Depending on the number of sensors that detect a pulse, each pulse can be associated with anywhere from one to hundreds of waveforms. This particular dataset included 374,000 waveforms.
PULSES vs. WAVEFORMS:
Think of a sensor like an eye. If the pulse is the object it "looks" at, then the waveform would be like the resulting "retinal image". When a lightning pulse is detected by a field sensor, the sensor immediately "sees" the electromagnetic radiation it emits. As radiation travels through the atmosphere, it may undergo changes to its wavelength and intensity. That's why two sensors detecting one pulse from two different locations will see two distinct waveforms.
DATA PREPARATION
Once the data had been collected and classified, it needed to be prepared for the AI. This is where we had to overcome several critical challenges.
- Reconstructing lost data
To efficiently manage data transfer and storage space, the waveforms captured by the ENTLN undergo a sampling process in which only the most essential data points from the waveforms are retained. This makes perfect sense for daily use of the network, but it isn’t ideal for training AI.
To provide the AI with the most complete and realistic representations of the waveforms, the research team found a novel way to “reconstruct” the original waveforms from the remaining datapoints. To perform the reconstructions, the team had to develop linear interpolations of the data points that included all the “noise” one would find in the original waveform.
- Overcoming sample bias
Data samples are inherently skewed according to the different rates at which distinct types of lightning naturally occur. In nature, about 90% of all lightning pulses are IC. What’s more, the vast majority of IC pulses have a positive charge. Conversely, only about 10% of pulses are CG, and only a tiny fraction of those has a positive charge. This natural distribution dramatically affected the distribution of samples we had available to us.
If this severely skewed data was used to train the AI, the AI could learn it had the highest probability of being right when it classified positive lightning pulses as IC and negative pulses as CG. Of course, this is not what we want to happen; we want the algorithm to attune itself to more nuanced differences in the waveforms, not to their frequency of occurrence.
To mitigate the imbalance in the data, the team had to find ways to increase the representation of the minority samples and mitigate overrepresentation of the majority samples. They employed two strategies known as the Synthetic Minority Oversampling Technique (SMOTE) and Random Undersampling (RUS). As the names imply, SMOTE involves introducing artificial instances that closely resemble some of the minority samples, and RUS involves removing random samples from the majority dataset.
- Optimizing sample sizes
As part of the experiment, the team also decided to experiment with sampling waveforms for different lengths of time. The expectation was that longer timeframes would yield greater accuracy because of the greater input, but shorter timeframes would yield faster processing. By experimenting with these different lengths of time, the team hoped to find the optimal balance of processing speed and accuracy. Based on prior studies, they settled on 100 microseconds and 1,100 microseconds as the right two timeframes to sample.
MODEL SELECTION
After collecting the data and getting it prepared, the research team needed to select its models or classification algorithms. They looked at two main types of models: a Multi-Layer Perception (MLP) model and a Residual Neural Network (ResNet).
An MLP consists of multiple layers of “neurons.” Data feeds forward from the input layer through successive middle layers until it reaches the output layer. MLPs are known for their ability to learn patterns from complex structures and are often used for classification and pattern recognition.
ResNets differ from MLPs in that they incorporate “skip connections,” which allow information to flow from earlier layers to later layers while skipping layers in between. A common challenge in neural networks is that signals used to update the weights of various criteria get degraded as they travel back through successive layers of neurons, essentially vanishing and making it hard for the earlier layers to learn. Skip connections are designed to overcome this challenge, enabling the model to learn more intricate patterns and classify complex information.
The team ultimately ended up selecting three models for testing. They tested two instances of MLP, one with 100-micosecond inputs and one with 1,100-microsecond inputs. And they tested a ResNet with 100-microsecond inputs.
TRAINING & TESTING
The team elected to use 80% of the pulses as the training dataset for each model and the remaining 20% as the testing dataset.
To account for nuanced differences across differently charged pulses, the team opted to begin by segregating the positive and negative datasets. Each data set was then supplemented with the SMOTE and RUS techniques discussed earlier. Upon completion of the training, the algorithm underwent testing.
The test involved having the AI look at the 5 nearest waveforms (or fewer, if less than 5 were available) for each pulse in the test set. The AI would classify each waveform into one of four classes (+CG, -CG, +IC, -IC). The ultimate classification for the pulse would then be assigned based on the majority of votes for all the waveforms.
FINAL EVALUATION
Upon final evaluation, the research team found that the MLP with 100-microsecond inputs significantly underperformed compared to each of the alternatives.
Performance across the ResNet model and the MLP with 1,100-microsecond inputs was much more of a toss-up. The two models had the same level of accuracy for -IC lightning. And while the ResNet outperformed the MLP on +IC and +CG lightning, the MLP outperformed the ResNet on -CG lightning.
The tiebreaker between the ResNet and the MLP with 1,100-microsecond inputs came down to processing speed. While the MLP models can process pulses at a rate of 0.16-0.26 milliseconds, the ResNet takes 4-5 milliseconds, which makes the MLP nearly 20 times faster.
At the end of the day, we opted to implement the MLP with 1,100-second inputs because of its ability to deliver fast processing speeds while significantly improving the overall accuracy. By combining that model with the novel way we now prepare data for AI processing, the ENTLN’s overall lightning classification is now more than 95% accurate across the globe.
Your next step: Dive deeper with the experts
As you can see, when we make a change to the ENTLN, it’s a highly involved process that relies on effective collaboration and a high degree of technical expertise.
However, the ability to detect and classify lightning with greater speed and precision isn’t just a technical achievement – it’s a fundamental step toward improving safety and decision-making in the face of severe weather. By refining the Earth Networks Total Lightning Network, we’re ensuring that the data you rely on is more accurate than ever.
But there’s much more to this story. To hear directly from the lead researcher at New Mexico Tech who helped bring these AI-driven improvements to life, check out our recent episode of Talking With the Experts.
POSTSCRIPT:
Although I’ve been emphasizing the technical achievements that went into enhancing the ENTLN’s lightning classification algorithm, this was also a highly collaborative process. Before I conclude, I feel it’s important to acknowledge the efforts of several key members of that team. First of all, I want to extend by sincere thanks to Dr. Adonis F.R. Leal and Gabriel Arcanjo, the researchers from New Mexico Tech who developed and tested the AI algorithms. Secondly, I’d like to thank AEM’s very own Dr. Elizaeth DiGangi. Dr. DiGangi led the painstaking effort to manually classify the 6,800 lightning pulses that were so crucial to training and testing the AI algorithms.