SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.07820 · 2019

Balancing the Tradeoff Between Clustering Value and Interpretability

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1912.07820.json · badge: /api/ran/1912.07820.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
sandysa/Interpretable_Clustering canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
arreq_in_list Ran
ran on a synthesized input
sandysa/Interpretable_Clustering/Kcenter.py
code served (permissive licence) · get_code("ce8c960a504328b9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create test arrays
arr1 = np.array([1, 2, 3, 4])
arr2 = np.array([1, 2, 3, 4])
arr3 = np.array([5, 6, 7, 8])
arr4 = np.array([[1, 2], [3, 4]])

# Create a list of arrays to search in
list_of_arrays = [arr2, arr3, arr4]

ARGS = {
    "myarr": arr1,
    "list_arrays": list_of_arrays
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getAccidentSubGraph Ran
ran on a synthesized input
sandysa/Interpretable_Clustering/testCluster.py
code served (permissive licence) · get_code("a6bf1f7f8fd3f2d2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Graph. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import networkx as nx

def subGraph_accident_support(text, support_type):
    """Stand-in function that the main function calls"""
    # Simple mock implementation
    if support_type == 1:
        return 'vehicle' in text.lower()
    elif support_type == 2:
        return 'death' in text.lower()
    elif support_type == 3:
        return 'other' in text.lower()
    return False

# Create a small test graph
G = nx.Graph()

# Add nodes with attributes
# Each node needs an 'attributes' dict where index 10 contains a description string
node_attrs = {
    0: ['attr0', 'attr1', 'attr2', 'attr3', 'attr4', 'attr5', 'attr6', 'attr7', 'attr8', 'attr9', 'Pedestrian hit by car'],
    1: ['attr0', 'attr1', 'attr2', 'attr3', 'attr4', 'attr5', 'attr6', 'attr7', 'attr8', 'attr9', 'Vehicle collision occurred'],
    2: ['attr0', 'attr1', 'attr2', 'attr3', 'attr4', 'attr5', 'attr6', 'attr7', 'attr8', 'attr9', 'Two bodies found at scene'],
    3: ['attr0', 'attr1', 'attr2', 'attr3', 'attr4', 'attr5', 'attr6', 'attr7', 'attr8', 'attr9', 'Cyclist fell from bike'],
    4: ['attr0', 'attr1', 'attr2', 'attr3', 'attr4', 'attr5', 'attr6', 'attr7', 'attr8', 'attr9', 'Road debris'],
}

# Add nodes to graph
for node_id in node_attrs:
    G.add_node(node_id)

# Set node attributes
nx.set_node_attributes(G, {node_id: node_attrs[node_id] for node_id in node_attrs}, 'attributes')

# Create Features list with different accident types
Features = ['Pedestrian hit', 'Vehicle collision', 'Death', 'Others']

# Create ARGS dict
ARGS = {
    'G': G,
    'Features': Features,
    'i': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Graph — a Graph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Graph output the recorded ndim 1 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
interpretabilityScore Ran
ran on a synthesized input
sandysa/Interpretable_Clustering/SupportFunctions.py
code served (permissive licence) · get_code("7c2ab460873a034f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import networkx as nx

# Create a small graph with node attributes
G = nx.Graph()

# Add nodes with attributes for adult domain
# attributes format: [age, ..., income_level]
for i in range(6):
    if i < 2:
        # Young with 50k income
        attributes = [str(30 + i)] + ['attr' for _ in range(13)] + ['50']
    elif i < 4:
        # Young with 100k income
        attributes = [str(35 + i)] + ['attr' for _ in range(13)] + ['100']
    elif i < 6:
        # Old with 50k income
        attributes = [str(50 + i)] + ['attr' for _ in range(13)] + ['50']
    G.add_node(i, attributes=attributes)

# For sanitation domain, add attribute at index 4
for i in range(6):
    attr_list = list(G.nodes[i]['attributes'])
    if len(attr_list) < 5:
        attr_list = attr_list[:5] if len(attr_list) >= 5 else attr_list + [''] * (5 - len(attr_list))
    attr_list[4] = str(20 + i * 15)  # values: 20, 35, 50, 65, 80, 95
    G.nodes[i]['attributes'] = attr_list

# For crime domain, ensure last attribute is a numeric string
for i in range(6):
    attr_list = list(G.nodes[i]['attributes'])
    while len(attr_list) < 15:
        attr_list.append('0')
    attr_list[-1] = str(0.1 + i * 0.15)  # values: 0.1, 0.25, 0.4, 0.55, 0.7, 0.85
    G.nodes[i]['attributes'] = attr_list

# For accident domain, ensure attribute at index 10
for i in range(6):
    attr_list = list(G.nodes[i]['attributes'])
    while len(attr_list) < 11:
        attr_list.append('')
    if i < 2:
        attr_list[10] = 'pedestrian hit by car'
    elif i < 4:
        attr_list[10] = 'collision with vehicle'
    else:
        attr_list[10] = 'body found at scene'
    G.nodes[i]['attributes'] = attr_list

# Create affinity array mapping nodes to clusters
aff_array = np.array([0, 0, 1, 1, 2, 2])

# Number of clusters
k = 3

# Domain can be one of: 'sanitation', 'accident', 'crime', 'adult'
domain = 'adult'

ARGS = {
    'G': G,
    'domain': domain,
    'aff_array': aff_array,
    'k': k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
interpretabilityScore_adult Ran
ran on a synthesized input
sandysa/Interpretable_Clustering/SupportFunctions.py
code served (permissive licence) · get_code("ef361c3ec4665ce4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import networkx as nx

# Create a small graph with node attributes
G = nx.Graph()

# Add nodes with 'attributes' - each node has at least 15 attributes (indices 0-14)
# attributes[0] = age, attributes[14] = some numeric value (50 or 100)
for i in range(5):
    age = 30 + i * 5  # ages: 30, 35, 40, 45, 50
    # Create attribute list with 15 elements
    attributes = [float(age)] + [0.0] * 13 + [50.0 if i % 2 == 0 else 100.0]
    G.add_node(i, attributes=attributes)

# Create affinity array mapping nodes to cluster assignments
# aff_array[node] tells which cluster the node belongs to
aff_array = np.array([0, 0, 1, 0, 1])

# k is the cluster index we're analyzing
k = 0

ARGS = {
    'G': G,
    'aff_array': aff_array,
    'k': k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
interpretabilityScore_cluster Ran
ran on a synthesized input
sandysa/Interpretable_Clustering/SupportFunctions.py
code served (permissive licence) · get_code("7cbc88e32a8ed8eb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import networkx as nx

# Create a small graph with node attributes
G = nx.Graph()

# Add nodes with attributes for different domains
# For 'adult' domain: attributes[0] is age, attributes[14] is income
# For 'crime' domain: last attribute is crime rate
# For 'accident' domain: attributes[10] is accident description
# For 'sanitation' domain: attributes[4] is pit latrine percentage

for i in range(6):
    if i < 2:
        # Nodes for cluster 0
        attributes_adult = ['35', '0', '0', '0', '50', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50']
        G.add_node(i, attributes=attributes_adult)
    elif i < 4:
        # Nodes for cluster 1
        attributes_adult = ['45', '0', '0', '0', '30', '0', '0', '0', '0', '0', '0', '0', '0', '0', '100']
        G.add_node(i, attributes=attributes_adult)
    else:
        # Nodes for cluster 2
        attributes_adult = ['50', '0', '0', '0', '60', '0', '0', '0', '0', '0', '0', '0', '0', '0', '50']
        G.add_node(i, attributes=attributes_adult)

# Create affinity array indicating cluster membership for each node
aff_array = np.array([0, 0, 1, 1, 2, 2])

# Number of clusters
k = 3

# Domain can be 'sanitation', 'accident', 'crime', or 'adult'
domain = 'adult'

ARGS = {
    'G': G,
    'domain': domain,
    'aff_array': aff_array,
    'k': k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_best_config Not yet run
unverified (harvested, no recorded run)
sandysa/Interpretable_Clustering/testCluster.py
code served (permissive licence) · get_code("b5d42a20b8735137")
How it ran

no invocation recorded.

getDistance Not yet run
unverified (harvested, no recorded run)
sandysa/Interpretable_Clustering/testCluster.py
code served (permissive licence) · get_code("aa11b474202b5ea8")
How it ran

no invocation recorded.

test_Kcenter Not yet run
unverified (harvested, no recorded run)
sandysa/Interpretable_Clustering/testBetaIC.py
code served (permissive licence) · get_code("a425d8ff456a2a55")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Graph clustering groups entities -- the vertices of a graph -- based on their similarity, typically using a complex distance function over a large number of features. Successful integration of clustering approaches in automated decision-support systems hinges on the interpretability of the resulting clusters. This paper addresses the problem of generating interpretable clusters, given features of interest that signify interpretability to an end-user, by optimizing interpretability in addition to common clustering objectives. We propose a $β$-interpretable clustering algorithm that ensures that at least $β$ fraction of nodes in each cluster share the same feature value. The tunable parameter $β$ is user-specified. We also present a more efficient algorithm for scenarios with $β\!=\!1$ and analyze the theoretical guarantees of the two algorithms. Finally, we empirically demonstrate the benefits of our approaches in generating interpretable clusters using four real-world datasets. The interpretability of the clusters is complemented by generating simple explanations denoting the feature values of the nodes in the clusters, using frequent pattern mining.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1912.07820")
get_code_for_paper("1912.07820")
have("1912.07820")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1912.07820.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1912.07820.svg)](https://syntology.ai/paper/1912.07820)

Connect an agent — have() is free.