Semantic Conflict Map Generator (SCMG)
- Semantic Conflict Map Generator (SCMG) is a design pattern that computes, organizes, and visualizes local discrepancies by mapping dependencies, pixels, matrix entries, or operations.
- It applies various models—from dependency analysis in codebases to synthetic conflict mapping in building reconstruction—to explicitly expose where prior assumptions fail.
- SCMG integrates into development workflows with pre-merge hooks and synthetic data generation, offering actionable insights for conflict resolution in software and collaborative data structures.
Searching arXiv for the cited SCMG-related papers to ground the article. arxiv_search(query="(Dias et al., 2015) DeltaImpactFinder Assessing Semantic Merge Conflicts with Dependency Analysis", max_results=5) Semantic Conflict Map Generator (SCMG) denotes a class of procedures that compute, organize, and visualize structured discrepancies between related artifacts. In the literature represented here, the term spans at least four settings: semantic merge-conflict detection in version control, synthetic conflict-map generation for facade-opening reconstruction, an operator-based framework for contextual data modulation, and explicit conflict mapping for collaborative data structures. Across these settings, SCMG produces a conflict-bearing representation whose units may be dependency edges, image pixels, matrix entries, or operation-level premises; in each case, the output is intended to expose where prior assumptions fail under a changed context rather than merely report that a discrepancy exists (Dias et al., 2015, Hanke et al., 21 Aug 2025, Kartal, 1 Jun 2026, Semenov et al., 22 Feb 2026).
1. Conceptual scope and core idea
In the software-merging formulation, a codebase is modeled as a directed dependency graph
where is the universe of code entities and is the set of ordered pairs meaning “ depends upon .” A change is applied to an origin branch and then assessed against a destination branch . The impact of in a codebase 0 is the symmetric difference between dependency sets before and after the change:
1
The delta-impact compares the change’s effect in origin and destination:
2
If 3, there is no indication of a semantic merge conflict; otherwise, the edges in 4 identify where the author’s original assumptions no longer hold (Dias et al., 2015).
In the CM2LoD3 setting, SCMG has a different object of analysis. Here, “Conflict Maps” are images in which each pixel encodes whether a laser ray from a known viewpoint is “confirmed,” “conflicted,” or “unknown” with respect to a LoD-2 building prior. Real-world conflict maps carry no inherent semantics, so SCMG is used to generate synthetic conflict maps together with per-pixel semantic labels for training a segmentation network (Hanke et al., 21 Aug 2025).
In the operator-based formulation, the conflict object is a matrix-valued quantity. Let 5 be raw data, 6 contextual data, and 7 a row-stochastic priority matrix. A semantic conflict operator is defined component-wise by
8
with admissible kernels 9, 0, and 1 (Kartal, 1 Jun 2026).
In collaborative data structures, SCMG becomes a graph over operations. It records entailment edges, premise-discard relations, and conflicts between concurrent operations. A conflict map in that setting explains why two operations conflict by identifying the shared premises that one operation uses and the other discards (Semenov et al., 22 Feb 2026).
This range of definitions suggests that SCMG is best understood not as a single standardized implementation but as a recurrent design pattern: construct a representation of local discrepancies, preserve their semantics, and expose them as a map suitable for analysis or resolution.
2. Dependency-based SCMG for semantic merge conflicts
The version-control instantiation of SCMG follows directly from dependency analysis. To compute 2 for a codebase 3, a static-analysis pass is performed over the entire AST. For each class or trait 4, an inheritance dependency 5 is added if 6 inherits from 7, and a trait-mixing dependency 8 is added for each mixed-in trait 9. For each method 0, the AST is walked so that variable reads or writes add 1, and message sends add 2 for all resolved targets 3 (Dias et al., 2015).
The extraction procedure has the stated complexity profile: if 4 is the number of entities and 5 is the total size of AST nodes, then class traversal visits 6 classes, AST walking visits 7 nodes, and lookup of implementors by selector can be done in 8 with an index, where 9 is the total number of methods. The overall complexity is therefore 0 (Dias et al., 2015).
Impact computation is defined by building two environments for a given base codebase 1: the original codebase 2 and the patched codebase 3. Dependencies are extracted as 4 and 5, and the impact is then computed as
6
For origin and destination branches, one computes 7 and 8, then compares them by 9, or alternatively by 0 if symmetric differences are to be shown (Dias et al., 2015).
The running example in the data is the fragile base class case. For a change 1 that adds a FilteredLog subclass and its override, the origin impact is
2
whereas the destination impact is
3
Thus,
4
meaning that the call from Log>>logAll: to FilteredLog>>log: is missing in the destination branch (Dias et al., 2015).
This formulation is notable because it does not define semantic merge conflicts as textual overlap. Instead, it detects them as mismatches in dependency effects between the branch where a change was authored and the branch where it is to be integrated. A plausible implication is that SCMG is especially suited to “silent” conflicts, where the merged program remains syntactically valid but violates the author’s expected dependency structure.
3. Map construction, visualization, and integration into version-control workflows
Once 5 has been computed, SCMG renders a visual map whose nodes are code entities and whose edges are partitioned by status. Green edges are dependencies introduced both in origin and destination and are therefore “safe.” Blue edges are unique to origin and are described as “dropped in 6.” Red edges are unique to destination and represent dependencies that are new in 7 but were not anticipated by the author (Dias et al., 2015).
Map construction proceeds by creating a directed graph 8 with
9
For each 0 in 1, a green edge is added. For each 2 in 3, a blue edge is added, meaning “was expected but is missing.” For each 4 in 5, a red edge is added, meaning “new dependency, not anticipated by the author” (Dias et al., 2015).
In the running example, the map contains a blue edge from Log>>logAll: to FilteredLog>>log: and green edges FilteredLog→Log and FilteredLog>>log: → Log>>log:. The associated tabular view identifies the first edge as “MISSING IN DESTINATION (blue)” and the other two as “SHARED (green).” The stated interpretation is that the map pinpoints exactly the “hole” that leads to the silent semantic conflict (Dias et al., 2015).
The same source also specifies a concrete integration model for SCMG in a VCS workflow. It may run as a pre-merge hook whenever a pull or merge request is opened, using the pair 6 and the patch 7, or as a pre-push hook before pushing to a shared repository, running on local 8 against remote 9. Decision logic is binary at the top level: if 0, the system reports “No semantic conflicts detected → auto-merge OK”; otherwise, it aborts the automatic merge and notifies the integrator with a summary of missing or extra edges and a visual conflict map highlighting risky dependencies (Dias et al., 2015).
The workflow description also includes triage heuristics. Low-risk changes may be auto-merged if all new or dropped edges involve test-only code and certain packages are whitelisted. A threshold on 1 may also be used so that if the number of surprising edges is below 2, the merge proceeds automatically; otherwise it is blocked. SCMG can be surfaced as a web UI, for example through GitLab or GitHub integration, where clicking a blue edge such as Log>>logAll:→FilteredLog>>log: jumps to the source of logAll: so that the integrator can decide whether to reinsert the super call or update the override (Dias et al., 2015).
4. Synthetic semantic conflict maps for LoD3 building reconstruction
In CM2LoD3, SCMG serves as a data generator rather than a merge-analysis tool. Its motivation is that conflict maps derived from ray-to-model-prior analysis do not themselves encode facade semantics, yet training a semantic segmentation network requires large-scale paired conflict-map and label datasets, which do not exist. SCMG fills that gap by automatically generating synthetic conflict maps with per-pixel semantic labels across varied architectural styles, noise conditions, and occlusions (Hanke et al., 21 Aug 2025).
The inputs are procedurally generated LoD-3 building models from Random3DCity with randomized facade layouts, a set of noise masks comprising generic geometric masks, tree-silhouette masks, and optional CMP facade images mapped to conflict-map classes, together with virtual scanner parameters. The outputs are a three-channel synthetic conflict-map image with per-pixel values in 3, a four-class ground-truth semantic map 4, and augmented variants with random occlusions (Hanke et al., 21 Aug 2025).
Synthetic conflict maps are generated by defining one or more virtual scanner viewpoints 5 for each procedurally generated LoD-3 model and sampling laser-ray endpoints 6 on the facade surface. Each ray 7 is cast from 8 toward 9, and the distance to the LoD-2 prior surface in that direction is computed. A pixel is labeled
- confirmed (green) if 0, where 1 is the intersection with the LoD-2 surface and 2 is a tolerance of 3 m;
- conflict (red) if 4;
- unknown (blue) otherwise (Hanke et al., 21 Aug 2025).
Random3DCity parameters are varied scene by scene, including number of floors, window and door aspect ratios, facade texture style, inter-element spacing, and camera view parameters such as distance, elevation, and azimuth. Two families of occlusions are applied to synthetic conflict maps: random geometric masks and tree-silhouette masks pasted near the bottom of the conflict map to simulate ground-level vegetation. Occlusion placement is given by
5
clipped to 6, and
7
The pipeline also incorporates facade semantics from the CMP dataset by mapping its detailed labels into the four classes 8 (Hanke et al., 21 Aug 2025).
The downstream segmentation model is a U-Net with a 3-channel conflict-map input and a 4-class per-pixel softmax output. The encoder has four blocks of 9, doubling feature channels each level; the decoder has four blocks of 0, halving feature channels and using skip connections. Convolutions use same padding, and upsampling is nearest-neighbor followed by a 1 convolution for dimension matching (Hanke et al., 21 Aug 2025).
Training uses standard pixel-wise cross-entropy,
2
with Adam, 3, 4, weight decay 5, initial learning rate 6, StepLR decay 7 every 10 epochs, batch size 14, and early stopping patience 8 epochs with minimum 8. The model converged in 41 epochs with training loss 0.0098 and validation loss 0.0116 (Hanke et al., 21 Aug 2025).
Evaluation is reported in terms of IoU, precision, and recall. The ablation figures given are: U-Net trained on SCMG only, Window IoU 9 and Door IoU 00; Mask R-CNN on images only, Window IoU 01; fusion of U-Net and Mask R-CNN, Window IoU 02; and adding 10% real conflict maps in training improved Door IoU from 03. The paper also states that mixed “GEN+CMP+REAL” yields best generalization and mentions “the 61% performance with uncertainty-aware fusion of segmented building textures” in the abstract (Hanke et al., 21 Aug 2025).
This application demonstrates a markedly different use of “semantic conflict maps.” Here, conflict is not a software inconsistency but a geometric discrepancy between observed rays and a building prior. The commonality with the software case lies in the role of the map: it localizes mismatches relative to an expected structure and turns them into a semantically interpretable artifact.
5. Operator-based SCMG as a generalized mathematical framework
The operator-based framework abstracts conflict generation away from any specific learning algorithm or optimization method and treats conflict as an independent, operator-based, and component-level mathematical object. Its core data are the raw-data matrix 04, the contextual-data matrix 05, and the priority matrix 06, with 07 constrained to be row-stochastic. The semantic conflict operator is defined through an admissible family
08
where
09
Each 10 satisfies admissibility on 11, zero-conflict 12, antisymmetry 13, continuity, and explicit scale behavior (Kartal, 1 Jun 2026).
The framework decomposes SCMG into three component functions. The weighting function is
14
which applies an element-wise Hadamard modulation to the local conflict matrix 15. The scale-behavior function is
16
and is used to classify the kernel under scaling: 17 and 18 are invariant, whereas 19 obeys 20. The output mapping, or fusion, reduces a modulated conflict matrix 21 to an 22 output, either by simple row-sums 23 or by the context-softmax
24
The role of the weighting function is context-sensitivity; the role of the scale-behavior function is explicit control over scaling properties; and the role of the output mapping is reduction to a global score or distribution over instances (Kartal, 1 Jun 2026).
The end-to-end pseudocode consists of positivity enforcement by clamping 25 and 26 with 27, row normalization of 28, computation of the local conflict kernel 29, contextual weighting 30, and fusion to produce the conflict map. The stated complexity is 31, and with vectorized implementation each step is a single broadcasted call (Kartal, 1 Jun 2026).
The running example uses
32
with 33 and context-softmax fusion for 34 and 35. The local conflict matrix is
36
the weighted matrix is
37
and the fused probabilities are approximately 38, with the interpretation that conflict shifts probability mass from row 1 toward row 2, reversing the raw-only ranking (Kartal, 1 Jun 2026).
The framework also states theoretical properties. Proposition 6.1 gives antisymmetry for all 39; Proposition 6.2 gives boundedness of 40, namely 41 for all 42; and Proposition 6.3 gives scale invariance of 43 and 44, with 45. These properties make the conflict map mathematically explicit rather than incidental to a downstream optimization process (Kartal, 1 Jun 2026).
6. SCMG for collaborative data structures and local-first reconciliation
In the collaborative-data-structure model, SCMG is built on operations, premises, visibility, entailment, and discards. Shared memory is written as 46, each 47 being a register with action set 48. An operation is a contiguous transactional sequence 49, the local history at replica 50 is 51, and 52 is the projection of that history onto register 53. Each action sequence induces a state via an interpreter 54, and causal order is recorded by a happens-before relation 55, extended from Lamport’s clocks (Semenov et al., 22 Feb 2026).
When an operation 56 is applied, it carries an immutable set of premises 57 and satisfies
58
If 59 and 60 are the premises of each action, then
61
Entailment implies causality: 62. Let 63 denote the reflexive-transitive closure (Semenov et al., 22 Feb 2026).
To detect invalidation, each action is given a monotonic visibility predicate
64
which is true exactly when the action’s effect is visible in the projected history. One then defines discards by
65
Concurrency is defined as
66
Their common premises are
67
and the conflicting premises are
68
Compatibility is then defined by
69
If this condition fails, the operations conflict (Semenov et al., 22 Feb 2026).
Conflict-map construction is graph-based. The entailment graph 70 is a DAG obtained by making each operation a node and adding a solid entails edge 71 for each premise 72. For each unordered pair of concurrent operations 73, 74 is computed. If it is nonempty, a conflict edge is recorded in both directions, labeled with the invalidated premise set. The resulting semantic conflict map stores the DAG of all entailment edges together with a set of conflict edges labeled by the corresponding invalidated premises. The visual convention described is solid arrows for 75 and red dashed arrows for 76, annotated with 77 (Semenov et al., 22 Feb 2026).
When the conflict map exposes a conflict, the system may resolve it by a three-way merge that creates a new merge operation 78. The provided pseudocode computes the set 79 of local operations incompatible with an incoming operation 80, finds shared premises, constructs a merge operation with premises 81 and actions 82, and then rebases kept operations onto 83 while cancelled operations are rebased onto a tombstone 84. Rebase means removing original 85 edges, adding 86 for all 87, and adding a dashed rebase edge 88 to record that 89 has been rebased (Semenov et al., 22 Feb 2026).
Two example instantiations are given. For a Last-Writer-Wins register, actions are of the form 90, premises are the immediately visible prior writes, and visibility is tied to maximal timestamp. A conflict arises whenever two concurrent writes have equal timestamps; the automatic merge then picks the write with larger or tie-broken timestamp, creates a merge operation with the old max-timestamp write as premise, and rebases both conflicting writes onto it, or rebases one onto the tombstone if unique-winner behavior is preferred. For a multi-register calendar event with registers for title, time, and location, a “touch 91” action records that a new operation is based on the latest move on 92. If Alice changes time after touching location and Bob concurrently moves location, the shared old location becomes a conflicting premise. SCMG reports a conflict edge between the two operations labeled with that old-location premise, and a merge operation may then combine Bob’s new location with Alice’s new time (Semenov et al., 22 Feb 2026).
This collaborative formulation addresses a common misconception that convergence in replicated systems necessarily implies transparent reconciliation. The model described here preserves convergence, but it also exposes the reasons for incompatibility as first-class graph objects. In that sense, SCMG functions simultaneously as an analysis structure, a user-facing explanation mechanism, and a substrate for local-first conflict resolution.