← Latest papers
💻 computer science

STG-GraphRAG: from Fully Automated Construction of Long-term Flood Spatio-Temporal Knowledge Graphs to Geography’s First and Third Law-Constrained GraphRAG for Closed-loop Decision Support

This study proposes STG-GraphRAG, a closed-loop framework that integrates automated long-term spatio-temporal flood knowledge graph construction with geography-constrained retrieval-augmented generation to enhance dynamic perception, multi-source data integration, and decision support in flood emergency response.

Original authors: Heng Tang, Yi Fang, Xiaoping Rui, Mengru Gao, Yiheng Xie, Ninglei Ouyang

Published 2026-11-18
📖 6 min read🧠 Deep dive

Original authors: Heng Tang, Yi Fang, Xiaoping Rui, Mengru Gao, Yiheng Xie, Ninglei Ouyang

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

When a flood strikes, the difference between a safe evacuation and a tragedy often comes down to how quickly and accurately decision-makers can see the full picture. In the past, officials relied on static maps and reports that were often days old, missing the rapid, shifting reality of rising waters and human panic. Today, artificial intelligence offers a new way to process the flood of information that arrives in real time. Two key ideas underpin this new approach. First, a "knowledge graph" is a digital web that connects facts—linking a specific town to the rain falling there, the people posting about it, and the roads that are cut off. Second, "retrieval-augmented generation" is a method where a computer brain, trained to speak like a human, is given a specific set of facts to read before it answers a question, preventing it from guessing or inventing details. The challenge has been making these tools understand that a flood in one valley is different from a flood in another, and that a report from this morning matters more than one from last week.

Researchers have now built a system called STG-GraphRAG that solves this problem by teaching artificial intelligence to respect the laws of geography. Instead of treating all information as equal, the system constructs a living, breathing map of flood events that updates every single day. It weaves together three distinct streams of data: official weather records, images of flooded streets, and the millions of posts people share on social media. By connecting these sources, the system creates a dynamic network that captures not just where the water is, but how it is moving, how people are reacting, and how the situation is evolving hour by hour. The goal was to create a tool that could answer complex questions like "Which areas are most at risk right now?" or "How is the flood spreading?" with the precision of a human expert who has been watching the storm since it began.

To build this system, the team focused on the flood season of July 2024 in China, a period of intense rainfall and widespread flooding. They gathered data from social media platforms, where citizens posted updates, photos, and pleas for help, alongside official meteorological data and images of the disaster. The researchers then used a computer to organize this chaotic mix of information into a structured map. In this map, every location, every weather event, and every human emotion is a node, or a point, connected by lines that represent their relationships. For instance, a post about rising water in a specific town is linked to the rainfall data for that same town, the sentiment of the people posting, and the depth of the water estimated from photos. This creates a detailed, multi-layered view of the disaster that changes every day as new information arrives.

A critical breakthrough in this work was teaching the system to filter information based on geography. Traditional search tools might find a relevant fact about a flood, but they often pull in too much unrelated data, drowning the user in noise. The new system, however, uses the "first law of geography," which states that things that are closer together are more related than things that are far apart. When a user asks about a specific flood, the system does not just look for keywords; it builds a small, focused neighborhood of information around that location. It expands its search to include nearby towns and related weather patterns, but it stops before it reaches areas that are too distant to be relevant. This process, which the researchers call "adaptive subgraph construction," allowed them to shrink the amount of data the system needed to process by nearly 70 percent while keeping the most important details.

The system also learned to listen to the human voice. By analyzing the tone of social media posts, it could detect rising panic or relief in a community, adding a layer of emotional context that official reports often miss. For example, the researchers found that social media often reported flooding in small towns days before those same towns appeared in official government documents. In one instance, a town called Hekou was mentioned by residents on social media two days before it was recorded in official records. This does not mean the system predicted the future, but it proved that social media acts as a vital, early-warning supplement to traditional monitoring, capturing the reality on the ground faster than bureaucratic channels can.

When tested against a wide range of difficult questions about the July floods, the system performed with remarkable accuracy. It was able to answer queries about risk levels, affected areas, and resource needs with a high degree of reliability, scoring very highly on human evaluations of usefulness and detail. The system successfully avoided the common pitfall of artificial intelligence, known as "hallucination," where a model invents facts. Instead, every answer it generated was backed by the specific data it had retrieved, allowing users to trace the logic back to the original source. The entire process, from receiving a question to generating a detailed answer, took less than a minute and cost less than two cents in computing resources, making it a practical tool for real-time emergency response.

The researchers found that the system's ability to combine different types of data was its greatest strength. By merging weather patterns, physical damage, and human sentiment, it created a complete picture that no single data source could provide on its own. The system identified that while large-scale floods in major cities were well-documented, the most volatile and rapidly changing situations often occurred in smaller towns, where social media provided the only real-time view. This insight suggests that future disaster management must rely on a blend of official data and public perception to stay ahead of the crisis.

Ultimately, this work demonstrates that artificial intelligence can be more than just a chatbot; it can be a rigorous, geography-aware partner in saving lives. By respecting the physical laws of how floods spread and how people react to them, the system transforms raw data into actionable intelligence. It offers a new way to see disasters not as static events, but as complex, evolving stories that can be understood and managed with greater clarity. As climate change makes extreme weather more frequent, tools like this will be essential for turning the overwhelming noise of a disaster into a clear signal for action.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →