fgca: Python code and results for "Operator Choice and Echo Artefacts in Fuzzy Graph Cellular Automata for Cascade Spreading on Networks"
Abstract
Python code and results accompanying the paper "Operator Choice and Echo Artefacts in Fuzzy Graph Cellular Automata for Cascade Spreading on Networks". The code implements a fuzzy graph cellular automaton: nodes of a graph with fuzzy edge memberships carry states in [0, 1] and update synchronously by combining neighbour states with a t-norm and an s-norm. Four operator pairs are provided (Gödel, product, Łukasiewicz, max–product), in a node-based form and, for the product pair, an edge-based form without backtracking. The automata are compared with the stochastic cascade they fuzzify (independent cascade), computed exactly by enumeration of all edge configurations or by Monte Carlo sampling. Contents: code/fgca.py: automata, exact and Monte Carlo references, experiments, figure generation and 18 verification tests (NumPy and Matplotlib only). results/: fixed points, errors, cascade sizes, rank correlations, spectral thresholds and seed-free activity for six graphs with an exact reference and for the karate club network with a Monte Carlo reference (200,000 edge configurations for each of 12 membership values). figures/: Figures 1(b) and 3–6 of the paper, as PDF and PNG. logs/: expected output of the verification tests. No synthetic or fabricated dataset is used. The graphs are five deterministic graphs and two published social networks, embedded as edge lists: Zachary's karate club (Zachary 1977) and the Florentine families marriage network (Padgett & Ansell 1993), as distributed with NetworkX. All runs use fixed seeds. The command "python fgca.py all" reproduces every figure and table in about 7 minutes on 2 CPU cores. Main results reproduced: The Gödel (max–min) automaton converges to the strength of connectedness, which is not a bound on the reach probability. Max–product, exact reach probability, the edge-based product automaton and the node-based product automaton form a chain of inequalities (no violation in 325,836 exact comparisons). The node-based product automaton sustains activity without any seed once the spectral radius of the membership matrix exceeds one; the edge-based form is exact on trees. Well beyond the thresholds both product automata invert the ranking of seeds, while max–product keeps a positive rank correlation.