Family & Household Detection

A precomputed communication community is a starting point, not a household label. This project combines ranked contact behavior and recurring shared cell-site evidence to refine broader social structure into candidate Big Family and Foyer / Household groups.

Ranked incoming/outgoing contacts Top 5 cell sites per subscriber Big Family → Foyer groups SQL · R (igraph)

The central idea: A communication graph reveals who is connected, not who shares a household. Ranked communication and recurring coarse co-location provide additional evidence for refining the graph into candidate household-level structure.

From broad communities to nested social structure

The pipeline begins with precomputed communication communities, then combines contact ranking and shared cell-site behavior to construct candidate ties. Graph partitioning refines those ties into broader Big Family groups and smaller Foyer / Household groups.

Telecom household-level tie inference: predefined communication communities are refined with ranked interactions and recurring coarse co-location into candidate household and extended-family structures
The project overview: community detection provides broad social structure; additional behavioral evidence helps refine candidate household relationships.

The Problem

The project started from precomputed communication communities derived from call graph analysis. Those communities identified groups of subscribers who call each other frequently — but for CVM purposes, that output was too coarse. A communication community can mix extended family, multiple households, close friends, and work relationships all in one cluster.

The goal was to identify likely household-level ties inside those broader communities. The project refined the graph output into two nested social structures:

  • Big Family: the broader connected social unit (extended family)
  • Foyer / Household: the smaller likely co-living unit inside it

Key insight: Big Family is the broader connected social unit; Foyer / Household is a smaller candidate co-living unit nested within it. The two should not be conflated with one another—or with the original communication community.

Behavioral Signal Design

Candidate ties were built from two complementary signals. Neither source alone establishes a household relationship.

Signal 1: Ranked Communication Intensity

Build top-5 incoming and outgoing contact lists for each subscriber, preserving ordinal importance. A household tie is more likely if the other person appears in the top contacts — not just if they have any calls together. Ranked lists filter out occasional contacts and focus on persistent, close relationships.

Signal 2: Shared Cell-Site Usage

Dominant cell-site usage is a coarse proxy for recurring location overlap. The pipeline compared each subscriber's top five used sites to find shared patterns. This can support a proximity hypothesis, but it does not identify a home address or prove that subscribers live together.

Signal Intersection: Both Must Hold

A tie becomes a household candidate when the subscribers are connected through ranked communication behavior and share dominant cell-site patterns. Their intersection is stronger evidence to investigate than either signal alone, but still requires validation and appropriate governance.

Pipeline: Key SQL Steps

STEP 1

Filter to communities with enough telecom subscribers

select community_candidates.*,
       community_sizes.telecom_member_count
from community_candidates
left join (
    select community_id,
           count(subscriber_id) as telecom_member_count
    from community_candidates
    group by community_id
) community_sizes on community_candidates.community_id
                   = community_sizes.community_id
where community_sizes.telecom_member_count >= 2;
STEP 2

Aggregate direct subscriber-to-subscriber communication

select caller_subscriber_id   as source_subscriber_id,
       callee_subscriber_id   as target_subscriber_id,
       sum(call_count)        as total_calls,
       sum(call_duration) / 60 as total_duration_minutes,
       sum(active_days)       as total_active_days
from subscriber_traffic
where source_is_telecom_customer = 1
  and target_is_telecom_customer = 1
group by caller_subscriber_id, callee_subscriber_id;
STEP 3

Compare each subscriber's most-used cell sites

select * from (
    select subscriber_cells.*,
           row_number() over (
               partition by community_id, subscriber_id
               order by tower_usage_count desc
           ) as tower_rank
    from subscriber_cells
)
where tower_rank <= 5;
STEP 4

Combine close-contact candidates with shared-site evidence

case
  when related_subscriber_id in (
       top_outgoing_contact_1,
       top_outgoing_contact_2,
       top_incoming_contact_1,
       top_incoming_contact_2
  )
  then related_subscriber_id
end as close_contact_subscriber_id
STEP 5

Graph partitioning in R (igraph) to produce Foyer groups

select distinct
       subscriber_id             as source_subscriber_id,
       substr(household_id, 1, 8) as target_subscriber_id,
       big_family_id              as family_group_id
from household_graph_edges
where household_id is not null
order by big_family_id;

Key Takeaway

Repeated cell-site overlap can add useful context to communication graphs, but it is a coarse behavioral signal—not a direct measurement of residence. The strength of this approach is in combining imperfect signals to prioritize candidate ties, then validating results for the intended use.

Design insight: Community detection gives broad structure; ranked interactions and recurring coarse co-location help refine it. Keep the result as an inference, apply privacy-conscious governance, and review it for the specific operational context.

FAQ

What is the key takeaway from "Family & Household Detection"?

Communication communities are a starting point, not household labels. Ranked contact behavior and recurring shared cell-site patterns help refine them into candidate household groups that still require appropriate validation.

Who wrote this and what is it about?

Mahmoud Trigui presents a telecom graph analytics workflow that refines precomputed communication communities into candidate Big Family and Foyer / Household groups using ranked contacts, shared cell-site behavior, SQL, and R/igraph. These behavioral signals are proxies and do not prove that people live together.

Do shared cell sites prove that two subscribers live together?

No. Cell-site overlap is a coarse signal of recurring location overlap, not proof of a home address or shared household. It should be combined with other evidence, validated for its intended use, and handled with privacy-conscious governance.

Comments

ForecastingTime SeriesMachine LearningPredictive ModelingFeature EngineeringNLPLLM ApplicationsDocument AICustomer SegmentationTelecom AnalyticsAnomaly DetectionRecommendation SystemsGraph AnalyticsGeospatial AnalyticsStatistical AnalysisExperimentation & A/B TestingPythonRSQLDataikuShiny DashboardsStreamlit AppsData VisualizationProduction MLModel EvaluationDecision SystemsData AutomationBusiness Analytics