Inspiration

Flash floods in Singapore arrive fast and leave fast. The rain pounds down, the drains overflow, and within an hour the water is gone. The warning matters just as much as the drainage, and the official warning channel is PUB Flood Alerts.

We pulled every alert from 22 to 30 September 2026. Six flash floods hit in that nine-day window. On average, PUB's alert went out 13.3 minutes before the flood. Once, it was just 5 minutes.

Now think about how people actually move. The median car commute in Singapore is 30 minutes (General Household Survey 2025), which means most drivers who need the warning are already on the road when it lands. A shop owner can't throw up a flood barrier and shift stock off the floor in five minutes. A resident can't reverse a car out of a basement carpark once the ramp is underwater. Town councils can't pre-position sandbags or pumps in that window.

And the problem is getting worse. Singapore logged its wettest March on record in 2025, and 2025 was the 7th-wettest year since 1980.

The tools that do exist operate at the wrong scale: Google's Urban Flash Flood forecasts on Flood Hub look 24 hours ahead, but they don't work at the zone level, and they aren't built for the short, hyper-local flooding that Singapore actually gets.

Then we noticed something about how PUB's alerts are triggered. They fire when a drain's water level crosses 90% of capacity. The rain that pushes a drain past that line is usually already falling a few kilometres upwind.

So instead of trying to forecast the weather, we decided to forecast the alert itself.


What it does

FloodSense rates every one of Singapore's 47 zones every 5 minutes and paints each one Low, Medium, or High on a public map.

  • Medium means a PUB flood alert is likely.
  • High means conditions point toward an actual flash flood.

It sits on top of PUB's alerts as an early-warning layer. It doesn't replace them.


How we built it

This stage of the challenge was about design and learning the platform, so what follows is the architecture we settled on.

Data

Before anything else, we checked that every input the model needs is openly available, both live and historically. A model can only be trained on data it will also see in production.

  • PUB: flood alerts (live API plus a historical export of the official Telegram channel), drain water levels, sensor locations, drainage infrastructure.
  • NEA: rainfall, 2-hour forecasts, air temperature, humidity, wind speed, wind direction โ€” live and historical.
  • Tides: the UHSLC Tanjong Pagar sea-level record, with future tides forecast via utide.
  • Land and terrain: URA Master Plans 2019 and 2025, SLA elevation data.

Pipeline

Data flows through three layers โ€” bronze (raw), silver (cleaned), gold (model-ready):

  • Landing: Raw JSON drops into a Unity Catalog Volume. Historical data comes in through a one-time backfill; live data arrives via a single-task Lakeflow Job every 5 minutes.
  • Bronze โ†’ Silver: Auto Loader and a Lakeflow pipeline build these layers. Data-quality expectations quarantine bad sensor readings. In silver, alerts get geocoded to zones.
  • Gold: One row per zone per 5-minute slot, assembled with point-in-time lookups so each row contains only information that existed at that moment.

What the model predicts

Zone z at time t is labelled positive if PUB issues an alert for that zone in the following hour:

y_z,t = ๐Ÿ™[PUB alert in zone z during (t, t + 60 min]]

Upwind rain. For each zone, we weight the last 30 minutes of rainfall at every gauge by two things: how directly the gauge sits upwind, and how far away it is.

Rโ†‘_z(t) = ฮฃ_s w_s,z(t) ยท r_s(t โˆ’ 30, t)

w_s,z(t) โˆ max(0, cos(ฮฒ_zโ†’s โˆ’ ฮธ_wind(t))) ยท e^(โˆ’d_s,z / L)

where r_s(t โˆ’ 30, t) is 30-minute accumulated rain at gauge s, ฮฒ_zโ†’s is the compass bearing from zone z to gauge s, ฮธ_wind(t) is the direction the wind is blowing from, d_s,z is the gauge-to-zone distance, and L controls how quickly influence fades with distance.

Tides. High tide slows drainage out to sea. We forecast tides as a sum of harmonic components:

ฮท(t) = ฮฃ_k A_k cos(ฯ‰_k t โˆ’ ฯ•_k)

with amplitude A_k, angular frequency ฯ‰_k, and phase ฯ•_k per component.

Other features: drain density and capacity, elevation, the share of each zone covered by hard, non-draining surfaces (estimated from Master Plan land use), NEA's 2-hour forecast, and time-of-day / seasonal cycles.

Model

Two LightGBM stages, packaged as one MLflow model and registered in Unity Catalog under the alias @champion:

  1. A gate model decides whether conditions in the zone are active at all.
  2. A conditional model scores how likely an alert is, given that conditions are active.
pฬ‚_z,t = P(active_z,t) ยท P(y_z,t = 1 | active_z,t)
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            gate

The gate exists because floods are rare. Most zone-slots are dry and obviously negative; the gate strips them out so the second model doesn't waste capacity learning to say "no."

Risk tiers

Calibrated probabilities map to Low, Medium, and High through two thresholds, ฯ„_M and ฯ„_H, set on validation data:

  • ฯ„_H: at least 1 in 3 High warnings is followed by a real alert.
  • ฯ„_M: catches at least 80% of floods early.

Evaluation

We test the model once, on September 2026 floods it has never seen during training. For each flood e, the total warning time splits into the lead PUB already provides plus the extra minutes FloodSense gains:

L^FS_e = (t^flood_e โˆ’ t^PUB_e) + (t^PUB_e โˆ’ t^FS_e)
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         PUB's lead time today     minutes gained

Outputs

Three products, all governed in Unity Catalog with end-to-end lineage:

  • a Databricks App (public risk map),
  • an AI/BI dashboard (agency view),
  • a Genie space (natural-language questions over the data).

Challenges we ran into

  • Deciding what to predict. Actual flash floods are too rare to train on directly. PUB's 90%-drain-level alerts are far more common and are a measurable precursor. Choosing to predict those โ€” and treating them as a proxy for Medium risk โ€” was the decision that made everything else workable.
  • Labels that start life as chat messages. Historical alerts come from a Telegram channel: free text naming roads and junctions, not coordinates. Turning that into clean labels means parsing the messages, collapsing repeated alerts for the same event, and geocoding each one to a zone.
  • Designing for rare events. Each day produces 47 ร— 288 = 13,536 zone-slots, and nearly all of them are negative. A model that always says "no flood" scores above 99% accuracy and is completely useless. That's why both the gated architecture and the evaluation metrics centre on lead time, detection rate, and false-alarm rate rather than accuracy.
  • Keeping the future out of the training data. It's easy to leak tomorrow into a time-series model. We designed against it from the start: every feature uses only data timestamped at or before t; training uses forecast tides, never observed ones, because forecasts are all the live system will have; historical periods use the 2019 Master Plan, not the 2025 one.
  • Finding data that is actually open. Weather radar would be the single most valuable input for short-range rain forecasting, but we couldn't find an open source with historical archives. FloodSense works with rain gauges and wind, and can bolt on radar later if it becomes available.
  • Trading lead time against false alarms. Warning earlier means warning more often. We had to lock down how the thresholds would be set before seeing any results, not after.
  • Learning the platform while designing on it. Most of us were new to Databricks. Mapping our pipeline onto Volumes, Lakeflow, Unity Catalog, and MLflow โ€” while still figuring out what each one actually does โ€” took several rounds of revision.

Accomplishments we're proud of

  • We measured the problem with real data. The 13.3-minute average lead time came from our own analysis of PUB's alerts, not from an assumption.
  • Every feature has a named, open source โ€” live and historical. The model can be trained on the past and run in production the same way.
  • We committed to success targets before building anything:
    • at least 30 minutes of warning for a typical flood, up from 13.3;
    • at least 80% of floods flagged early;
    • at least 1 in 3 High warnings followed by a real alert;
    • false alarms reported alongside every result.
  • The design fails safely. FloodSense adds warnings on top of PUB's alerts, so the worst case is today's status quo.

What we learned

  • Framing the target is half the problem. "Predict flash floods" felt impossible. "Predict PUB's own alert, an hour early" is a well-defined, measurable task whose results can be compared directly against what people get today.
  • Point-in-time correctness has to be designed in, not patched later. A model that accidentally sees the future looks brilliant right up until it goes live.

What's next for FloodSense

Week 1

  • Backfill historical data into Unity Catalog via Lakeflow.
  • Geocode PUB alerts to the 47 zones.
  • Build the full pipeline from raw data to the app, running a simple rainfall-rule baseline.

Week 2

  • Train the gated LightGBM model with calibrated tiers and plain-English reasons; register it through MLflow in Unity Catalog.
  • Test it once on held-out September 2026 floods against PUB's actual alert times.
  • Stand up the AI/BI scoreboard and Genie space.

Stretch goals

  • A separate model for actual flash floods.
  • Telegram push alerts for people's saved zones.

Built With

Share this project:

Updates

Submission history