Abstract
The Collective Compassion Network Algorithm studies kindness as something that travels. It models how compassionate acts pass from person to person — and between people and AI agents — across a network, and it guides the design of systems that help this flow while damping rival contagions such as outrage and hostility. Its starting point is a well-established finding of network science: helpful, generous behaviour spreads along social ties, reaching people who never met the person who began it.

In the model, each node carries a compassion index that changes over time, driven partly by its own capacity to generate compassion and partly by the weighted pull of its neighbours. This gives communities and institutions a map of the relationships that carry trust, and a way to reinforce them. The algorithm belongs to Layer 4 (Human Flourishing) of Sri Amit Ray’s Compassionate AI Architecture™ (CAIA™).
Key Takeaways
- Treats compassion as a network effect that can ripple up to three steps beyond the original act.
- Gives every person or agent a compassion index shaped by their own generosity and their neighbours’ influence.
- Helps platforms reward bridges of trust instead of engagement driven by outrage.
- Contributes to the Flourishing Score in the CAIA™ framework.
In Simple Words
In everyday language: this algorithm shows how kindness and trust move — or fade — along the connections in a community. With that picture, organisations can nurture the links that carry care and weaken the ones that spread anger. Solidarity becomes something you can see, measure and help grow.
Readiness level: Concept-to-simulation on network data; field validation is needed with real community graphs and strong privacy safeguards.
Why This Algorithm Matters
The Collective Compassion Network Algorithm comes from the Sri Amit Ray Compassionate AI Lab. It describes how compassion moves through webs of connected humans and AI agents, and it supports the design of systems that help compassion travel further while slowing the spread of harmful social contagions. Its scientific basis is the discovery that prosocial behaviour — generosity, helpfulness, cooperation — moves through social networks much as an infection does, reaching people with no direct link to whoever acted first. [3]
Nicholas Christakis and James Fowler showed that such behaviour reaches as far as three degrees of separation: what you do shapes your friends, their friends, and their friends in turn. A single kind act can therefore reshape the social fabric well beyond what its author ever sees. The same holds in reverse — cruelty, dishonesty and division also travel, and also multiply.
Because AI now shapes so much of how people connect, it inevitably shapes this flow. Feeds that reward outrage and tribal loyalty pour division into the network and weaken collective compassion. Feeds that highlight mutual aid, solidarity and human connection do the opposite. The Collective Compassion Network Algorithm supplies the analysis needed to build systems that deliberately strengthen collective compassion, instead of chasing engagement figures that tend to track — and deepen — social division.
“Compassion, like trust, propagates through the ties that bind a community.”
— A guiding principle of the Sri Amit Ray Compassionate AI Lab
The Mathematics
The network is modeled as a graph G = (V, E). The compassion index Cᵢ(t) of node i evolves according to neighbor influence and intrinsic generation rate:
Where Aᵢⱼ represents interaction strength between nodes i and j, δ is the propagation rate, and σᵢ(t) is the intrinsic compassion generation rate of node i — its capacity to originate compassionate actions independently of network influence.
Symbols Used
| Symbol | Meaning |
|---|---|
| \(C_i(t)\) | compassion index of node i at time t |
| \(A_{ij}\) | interaction strength between nodes i and j |
| \(\delta\) | propagation rate across ties |
| \(\sigma_i(t)\) | node i’s intrinsic compassion generation |
A Step-by-Step Example
Node i has C=0.4 with two neighbours at 0.8 and 0.2 (edge weights 0.5 each), \(\delta=0.3\), and intrinsic \(\sigma=0.05\). The next step gives C_i = 0.7·0.4 + 0.3·(0.5·0.8+0.5·0.2) + 0.05 = 0.48 — the node rises as compassionate neighbours and its own contribution pull it up.
How It Is Implemented
The reference implementation expresses the model as compassionate, auditable logic, written for clarity rather than raw performance so that ethical reviewers as well as engineers can follow every decision.
def propagate_compassion_network(network_graph, decay_rate=0.1):
new_scores = {}
for node in network_graph.nodes:
neighbors = network_graph.get_neighbors(node)
neighbor_influence = sum(
network_graph.get_edge_weight(node, nb) * nb.compassion_score
for nb in neighbors
)
new_scores[node.id] = (
(1 - decay_rate) * node.compassion_score +
decay_rate * neighbor_influence +
node.intrinsic_generation # sigma_i(t)
)
return new_scores
Measuring It Reliably
Derive ties and the compassion index from consented, privacy-preserving interaction data (prosocial actions, supportive replies), validated against survey measures of trust and social support. Prefer aggregate, differentially private graph statistics.
Where It Can Help
- Prosocial Platform Design: Identifying high-compassion nodes (users whose prosocial behavior consistently propagates through their networks) and amplifying their reach, while reducing the algorithmic advantage of high-outrage nodes whose content propagates social division.
- Community Health Promotion: Designing public health interventions that leverage compassion propagation pathways — identifying the network nodes where health-promoting behaviors are most likely to spread widely and designing seeding strategies accordingly.
- Corporate Culture Building: Tracking and incentivizing peer support and mentorship behaviors in organizational networks, building cultures of collective compassion that outperform cultures of competitive individualism on long-term organizational health metrics.
Use Cases in Practice
Beyond the general applications above, the algorithm supports concrete, human-centred deployments across compassionate-AI domains:
🏙️ Smart Cities — Public Welfare Optimization
A city maps and strengthens neighbourhood mutual-aid ties so support reaches isolated residents through trusted connections.
🌊 Humanitarian AI — Disaster Response Prioritization
In a crisis, the algorithm coordinates community mutual-aid networks, routing help through high-trust local links.
🕊️ Peacekeeping Force Compassionate Robotics AI
In a post-conflict setting, it identifies and reinforces bridging ties that rebuild trust between divided groups.
🎓 Education AI — Student Mental Wellbeing
A campus uses it to grow peer-support networks that carry care to struggling students.
Ethical Foundations
Ethics and empathy are the starting point of the Sri Amit Ray tradition, not an extra layer added at the end. This algorithm rests on three commitments: non-harm (ahimsa), openness about how its decisions are reached, and respect for privacy and human dignity. Like every one of the twenty-five Human-Centered Compassionate AI algorithms, it is meant to work under human oversight — supporting human moral judgement, never standing in for it. [1]
Known Limits and Cautions
- Data about who is connected to whom is deeply personal and open to misuse; it must be aggregated and gathered only with consent.
- The very same diffusion model also describes how hostility spreads, so the direction and purpose of any intervention matter greatly.
- Real communities change constantly and differ widely; one fixed influence parameter \(\delta\) is a simplification.
Guarding Against Misuse
Any tool strong enough to protect people can also be misused to harm them, so these safeguards must accompany every deployment. The main risks of misuse for this algorithm, and how to guard against them, are:
- Influence maps can be weaponised for propaganda or social control — restrict use to aggregate analysis and prohibit individual targeting.
- Never use compassion scores to rank, reward, or penalise individuals.
Alignment with AI Standards
To support real-world adoption, the algorithm maps onto recognised AI governance frameworks and standards:
| Framework | How this algorithm contributes |
|---|---|
| NIST AI RMF | MAP — characterises social context and impact. |
| EU AI Act | Guards against social-scoring uses, which are prohibited. |
| ISO/IEC 42001 | Data governance and impact assessment. |
| IEEE 7010 | Community well-being measurement. |
Supporting the 17 UN Sustainable Development Goals
The Collective Compassion Network Algorithm models how compassion and trust propagate through the ties of a community, giving institutions a tool to grow social capital rather than erode it. This network view of solidarity advances the goals on cohesive communities and partnership, building on the Compassionate AI movement, the vision of moving from data-driven to compassionate AI, and the 12 Compassionate AI Principles.
The most directly relevant Sustainable Development Goals, and how this algorithm helps fulfil them, are:
- SDG 11 Sustainable Cities and Communities. Mapping and strengthening compassion ties helps make neighbourhoods and cities more inclusive and resilient.
- SDG 16 Peace, Justice, and Strong Institutions. Networks that propagate trust counter polarisation and strengthen the social fabric of institutions.
- SDG 17 Partnerships for the Goals. Modelling intrinsic and networked compassion supports the cross-sector partnerships the SDGs depend on.
In this way the algorithm is not a stand-alone technical artefact but a concrete instrument for the global development agenda, translating compassion into measurable progress toward the 2030 Goals and beyond.
Where It Fits in CAIA™
Figure: This algorithm sits in Layer 4 · Human Flourishing (highlighted) of the Compassionate AI Architecture™ (CAIA™).
CAIA-SVG-START
CAIA-SVG-END
This algorithm is one of twenty-five building blocks of Sri Amit Ray’s Compassionate AI Architecture™ (CAIA™). CAIA works like a seven-layer, human-centred operating system: before any AI decision can be deployed, it has to pass through each layer of compassion in turn.
It operates in Layer 4: Human Flourishing Layer, whose purpose is to help humans thrive. The layer answers a single guiding question — Does this improve human life? — and emits the Flourishing Score, one of the seven inputs to the Compassionate AI Index, \( \text{CAI}=\sum_k w_k S_k \). It extends flourishing from the individual to the community, strengthening the trust and compassion ties through which wellbeing spreads.
In the CAIA pipeline (Compassion Quotient → Suffering Reduction → Empathy → Human Flourishing → Vulnerability Protection → Planetary Protection → Future Generation Analysis → Human Oversight → Deploy), this layer’s score is one of the gates a decision must satisfy, and a sufficiently low protective score can veto deployment regardless of the overall average. Resting on the four pillars — Compassion, Responsibility, Sustainability, and Future Generations — the architecture ensures this algorithm never operates in isolation.
Read the full architecture: The Sri Amit Ray Compassionate AI Architecture™ (CAIA™).
This algorithm is one of the 25 Human-Centered Compassionate AI algorithms — see the complete canonical reference list.
How to Cite
Ray, Sri Amit. “Collective Compassion Network Algorithm for Compassionate AI.” Compassionate AI, Sri Amit Ray Compassionate AI Lab, 2026, https://sriamitray.com/research/collective-compassion-network-algorithm-compassionate-ai/.
References
- Ray, Amit. “AI Agents and Robots in Peacekeeping Force and Social Care: Compassionate AI Technologies.” Compassionate AI, vol. 3, no. 9, 2025, pp. 75–77, amitray.com.
- Ray, Amit. “Calling for a Compassionate AI Movement: Towards Compassionate Artificial Intelligence.” Compassionate AI, vol. 2, no. 6, 2023, pp. 75–77, amitray.com.
- Christakis, Nicholas A., and James H. Fowler. Connected: The Surprising Power of Our Social Networks and How They Shape Our Lives. Little, Brown, 2009.
- Granovetter, Mark S. “The Strength of Weak Ties.” American Journal of Sociology, vol. 78, no. 6, 1973, pp. 1360–1380, doi.org/10.1086/225469.
- Singer, Peter. The Expanding Circle: Ethics, Evolution, and Moral Progress. Princeton University Press, 2011.
- Ray, Amit. Human-Centered Compassionate AI: Sri Amit Ray’s 25 Algorithms for Protecting Humanity and Future Generations. Compassionate AI Lab, 2026. ISBN 978-8169641050.
- Ray, Amit. Compassionate Artificial Intelligence: Frameworks and Algorithms. Compassionate AI Lab, 2018. ISBN 978-9382123460.
- Ray, Amit. Compassionate Superintelligence AI 5.0: AI with Blockchain, BMI, Drone, IoT, and Biometric Technologies. Compassionate AI Lab, 2018. ISBN 978-9382123446.
Further Reading from the Compassionate AI Lab
- Ray, Amit. “Build Your Own Agentic AI Healthcare MCP Server: A Complete Guide to AI-Powered Healthcare Agents.” Compassionate AI, 3.8 (2026): 60-62. https://amitray.com/agentic-ai-healthcare-mcp-server/
- Ray, Amit. “Medical AI Drones for Disaster Management: Intelligent Unmanned Health-Care Systems.” Compassionate AI, 3.8 (2026): 57-59. https://amitray.com/medical-ai-drones-for-disaster-management/
- Ray, Amit. “Compassionate Medical AI Drones as Intelligent Unmanned Health-Care Systems: A Human-Centered AI Architecture for Suffering Reduction and Human Flourishing.” Compassionate AI, 3.8 (2026): 57-59. https://amitray.com/medical-ai-drones-human-centered-ai-healthcare/
- Ray, Amit. “The Sri Amit Ray Compassion Quotient (CQ) Algorithm for Compassionate AI.” Compassionate AI, 2.6 (2026): 81-83. https://amitray.com/compassion-quotient-cq-algorithm-compassionate-ai/
- Ray, Amit. “Collective Human Flourishing Optimization AI Algorithm (CHFOA): A Compassion-Centered Multi-Stakeholder AI Optimization Framework.” Compassionate AI, 2.6 (2026): 90-92. https://amitray.com/collective-human-flourishing-optimization-algorithm-chfoa/
- Ray, Amit. “Human Flourishing Optimization Algorithm (HFOA) for Compassionate AI Architecture.” Compassionate AI, 2.6 (2026): 81-83. https://amitray.com/human-flourishing-optimization-algorithm-hfoa-compassionate-ai/
- Ray, Amit. “The Sri Amit Ray Compassionate AI Architecture (CAIA): A Seven-Layer Framework for Human-Centered Artificial Intelligence.” Compassionate AI, 2.6 (2026): 81-83. https://amitray.com/compassionate-ai-architecture/
- Ray, Amit. “Human-Centered Compassionate AI: The 25 Algorithms for Protecting Humanity and Future Generations.” Compassionate AI, 2.6 (2026): 30-32. https://amitray.com/human-centered-compassionate-ai-the-25-algorithms/
- Ray, Amit. “AI Consciousness and Self-Aware Robots: Sri Amit Ray’s Framework for Compassionate Intelligence.” Compassionate AI, 2.5 (2026): 57-59. https://amitray.com/ai-consciousness-self-aware-robots/
- Ray, Amit. “The 12 Sri Amit Ray Compassionate AI Principles | Ethical AI Framework.” Compassionate AI, 2.4 (2026): 12-14. https://amitray.com/the-12-compassionate-ai-principles-for-humanity-and-future-generations/
- Ray, Amit. “The Compassionate AI Lab Declaration on AI Safety, Suffering Reduction, and the Protection of Humanity.” Compassionate AI, 4.12 (2025): 72-74. https://amitray.com/compassionate-ai-declaration-protection-of-humanity/
- Ray, Amit. “Compassionate AI for Forward Deployed Engineers (FDEs) in SaaS Companies.” Compassionate AI, 4.11 (2025): 15-17. https://amitray.com/compassionate-ai-for-forward-deployed-engineers-fdes-in-saas-companies/
- Ray, Amit. “Microbial AI, Bioleaching and Digital Twins for Manufacturing the 17 Rare Earth Elements.” Compassionate AI, 4.10 (2025): 42-44. https://amitray.com/microbial-ai-bioleaching-and-digital-twins-for-manufacturing-the-17-rare-earth-elements/
- Ray, Amit. “AI-Driven Rare Earth Element Magnet Design: Detailed Methodologies.” Compassionate AI, 4.10 (2025): 27-29. https://amitray.com/ai-driven-rare-earth-elements-magnet-design-methodologies/
- Ray, Amit. “AI Agents and Robots in Peacekeeping Force and Social Care: Compassionate AI Technologies.” Compassionate AI, 3.9 (2025): 75-77. https://amitray.com/ai-agents-robots-peacekeeping-force-social-care-compassionate-ai/
- Ray, Amit. “Ray Mother–Infant Inter-brain Synchrony Algorithm for Deep Compassionate AI.” Compassionate AI, 3.9 (2025): 60-62. https://amitray.com/ray-mother-infant-inter-brain-synchrony-algorithm-deep-compassionate-ai/
- Ray, Amit. “Pain Recognition and Prediction AI Algorithm (PRPA) for Compassionate AI.” Compassionate AI, 3.9 (2025): 60-62. https://amitray.com/pain-recognition-and-prediction-algorithm-prpa-for-compassionate-ai/
- Ray, Amit. “Modeling Consciousness in Compassionate AI: Transformer Models and EEG Data Verification.” Compassionate AI, 3.9 (2025): 27-29. https://amitray.com/modeling-consciousness-in-compassionate-ai-transformer-models/
- Ray, Amit. “The 7 Pillars of Compassionate AI Democracy.” Compassionate AI, 3.9 (2024): 84-86. https://amitray.com/the-7-pillars-of-compassionate-ai-democracy/
- Ray, Amit. “Compassionate AI-Driven Democracy: Power and Challenges.” Compassionate AI, 3.9 (2024): 48-50. https://amitray.com/compassionate-ai-driven-democracy-power-and-challenges/
- Ray, Amit. “The 10 Ethical AI Indexes for LLM Data Training and Responsible AI.” Compassionate AI, 3.8 (2023): 35-39. https://amitray.com/the-10-ethical-ai-indexes-for-responsible-ai/
- Ray, Amit. “Ethical Responsibilities in Large Language AI Models: GPT-3, GPT-4, PaLM 2, LLaMA, Chinchilla, Gopher, and BLOOM.” Compassionate AI, 3.7 (2023): 21-23. https://amitray.com/ethical-responsibility-in-large-language-ai-models/
- Ray, Amit. “Calling for a Compassionate AI Movement: Towards Compassionate Artificial Intelligence.” Compassionate AI, 2.6 (2023): 75-77. https://amitray.com/calling-for-a-compassionate-ai-movement/
- Ray, Amit. “From Data-Driven AI to Compassionate AI: Safeguarding Humanity and Empowering Future Generations.” Compassionate AI, 2.6 (2023): 51-53. https://amitray.com/from-data-driven-ai-to-compassionate-ai-safeguarding-humanity-and-empowering-future-generations/
- Ray, Amit. “Artificial intelligence for Climate Change, Biodiversity and Earth System Models.” Compassionate AI, 1.1 (2022): 54-56. https://amitray.com/artificial-intelligence-for-climate-change-and-earth-system-models/
- Ray, Amit. “Artificial Intelligence for Balance Control and Fall Detection of Elderly People.” Compassionate AI, 4.10 (2018): 39-41. https://amitray.com/artificial-intelligence-for-balance-control-and-fall-detection-system-of-elderly-people/
- Ray, Amit. “Artificial Intelligence to Combat Antibiotic Resistant Bacteria.” Compassionate AI, 2.6 (2018): 3-5. https://amitray.com/artificial-intelligence-for-antibiotic-resistant-bacteria/
- Ray, Amit. “Navigation System for Blind People Using Artificial Intelligence.” Compassionate AI, 2.5 (2018): 42-44. https://amitray.com/artificial-intelligence-for-assisting-blind-people/
- Ray, Amit. “Brain-Computer Interface and Compassionate Artificial Intelligence.” Compassionate AI, 2.5 (2018): 3-5. https://amitray.com/brain-computer-interface-compassionate-ai/
