GUARDIAN: Safeguarding LLM Multi-Agent Collaborations with Temporal Graph Modeling