Mag-Mamba: Modeling Coupled spatiotemporal Asymmetry for POI Recommendation

Mag-Mamba addresses the challenge of coupled spatiotemporal asymmetry in next POI recommendation by modeling transition dynamics as phase-driven rotations in the complex domain, utilizing a time-conditioned Magnetic Phase Encoder and a Complex-valued Mamba module to achieve state-of-the-art performance.

Zhuoxuan Li, Tangwei Ye, Jieyuan Pei, Haina Liang, Zhongyuan Lai, Zihan Liu, Yiming Wu, Qi Zhang, Liang Hu

Published 2026-03-03
📖 4 min read☕ Coffee break read

The Big Problem: City Traffic is One-Way (and Time-Dependent)

Imagine you are trying to predict where a person will go next in a city.

  • The Morning Rush: At 8:00 AM, everyone flows from Residential Areas (Home) to Business Districts (Work). The streets are crowded in that direction.
  • The Evening Rush: At 6:00 PM, the flow reverses. Everyone goes from Work back to Home.
  • The One-Way Street: Even if two places are close to each other, going from A to B might be easy, but going from B to A might be impossible (due to a one-way street) or very slow.

The Challenge: Most computer models for predicting these trips treat the city like a static, symmetrical map. They think "A is close to B, so B is close to A," and they forget that the direction and the time of day completely change the rules. They struggle to understand that the "force" pushing you from Home to Work is totally different from the force pushing you from Work to Home.

The Solution: Mag-Mamba (The Magnetic Compass)

The authors created a new AI model called Mag-Mamba. Instead of just looking at a flat map, they treat the city like a magnetic field where time acts like a compass needle that spins.

Here is how it works, broken down into three simple parts:

1. The Magnetic Phase Encoder (The "Time-Sensitive Compass")

Imagine the city map is a giant, invisible magnetic field.

  • Static Map: Usually, maps just show distance.
  • Mag-Mamba's Map: This model adds a "magnetic charge" to the streets.
    • In the morning, the magnetic field points strongly from Home to Work.
    • In the evening, the field flips and points from Work to Home.
    • It uses a mathematical trick called a Magnetic Laplacian. Think of this as a special lens that looks at the city and sees not just where places are, but which way the wind is blowing at that specific hour.

2. The Complex-Valued Mamba (The "Spinning Top")

Most AI models update their memory by adding or subtracting numbers (like a calculator). Mag-Mamba is different; it uses Complex Numbers (numbers that have a real part and an imaginary part).

  • The Analogy: Imagine a spinning top.
    • Real AI: Just moves the top forward or backward.
    • Mag-Mamba: Spins the top.
    • Why spin? In the world of complex numbers, "spinning" (rotation) is the perfect way to represent direction. If you spin 180 degrees, you are facing the opposite way.
    • The model uses the "magnetic compass" from Step 1 to tell the spinning top exactly how much to turn. If the traffic is heavy toward the CBD, the top spins toward the CBD. If it's evening, it spins back home.

3. The Time-Interval Modulator (The "Speed Dial")

Time isn't just a label; it changes how fast things happen.

  • If you leave work at 5:00 PM and check in again at 5:05 PM, you probably just walked to the subway.
  • If you check in again at 8:00 PM, you might have gone home, cooked dinner, and are now going out.
  • Mag-Mamba uses the time gap to adjust the speed of the spin. A short gap means a small, quick adjustment. A long gap means a big, sweeping turn in the model's memory.

Why is this better than the old way?

  • Old Models (Symmetric): They think the road from Home to Work is the same as Work to Home. They get confused when the traffic reverses.
  • Mag-Mamba (Asymmetric): It understands that the "force" of the city changes with time. It doesn't just memorize "Home is near Work"; it learns "At 8 AM, the magnetic pull is strong toward Work, but at 8 PM, it pulls toward Home."

The Results: A Super-Predictor

The authors tested this on real data from New York, Tokyo, and California.

  • The Test: They asked the model to predict the next stop for thousands of people.
  • The Winner: Mag-Mamba beat every other existing model.
  • The Secret Sauce: It was especially good at predicting asymmetric trips (like the morning commute vs. the evening return), which are the hardest for other models to get right.

Summary in One Sentence

Mag-Mamba is like giving a GPS a magnetic compass that spins based on the time of day, allowing it to perfectly predict not just where you are going, but which way the city's traffic flow is pushing you at that exact moment.

Get papers like this in your inbox

Personalized daily or weekly digests matching your interests. Gists or technical summaries, in your language.

Try Digest →