XCom: Cross Completion Methods
- XCom is a methodological pattern that reconstructs missing data by inferring correlated structure from complementary representations, such as different views, client embeddings, or tensor measurements.
- It spans diverse applications including self-supervised 3D vision, vertical federated learning, cross-file code completion, and tensor recovery, each using tailored models and objectives.
- The approach integrates techniques like transformer-based networks, CUR tensor approximations, and contrastive alignment to boost downstream performance and ensure consistent recovery.
Cross Completion, often abbreviated XCom, denotes a family of methods in which missing, masked, or otherwise unavailable content in one representation is reconstructed by conditioning on complementary information drawn from another representation. In the cited literature, the term is used across self-supervised 3D vision, vertical federated learning, repository-level code completion, tensor recovery, and several cross-modal completion settings. This suggests that XCom is best understood not as a single standardized algorithm but as a recurrent methodological pattern: infer unavailable structure in a target space from correlated structure in a different view, modality, client, file, or sampled substructure (Weinzaepfel et al., 2022, Ding et al., 2022, Yao et al., 7 Aug 2025).
1. Terminological scope and recurring structure
The label “XCom” appears with distinct technical meanings in different subfields. In self-supervised vision, it denotes cross-view completion from paired images of the same scene or person. In vertical federated learning, it denotes feature completion across clients with disjoint feature subsets. In software engineering, it denotes cross-file code completion. In tensor methods, “Cross” denotes a measurement and reconstruction scheme for low-rank tensor completion (Zhang, 2016), and later work studies cross tensor approximation or tensor CUR approximation for image and video completion (Ahmadi-Asl et al., 2022).
| Area | Representative formulation | Representative paper |
|---|---|---|
| Self-supervised vision | Reconstruct masked content in one image from another view | (Weinzaepfel et al., 2022) |
| Vertical federated learning | Complete missing client features from other clients’ embeddings | (Yao et al., 7 Aug 2025) |
| Code completion | Predict code using in-file and cross-file context | (Ding et al., 2022) |
| Tensor completion | Recover low-rank tensors from body-and-arm or CUR-style observations | (Zhang, 2016) |
A common structural template recurs across these uses. A target object is partially observed; an auxiliary source carries correlated information; a model reconstructs the missing target component; and downstream supervision or recovery criteria enforce consistency. The auxiliary source may be another camera view, another client’s embedding, another repository file, a retrieved reference sample, or sampled rows, columns, fibers, and subtensors.
2. Cross-view completion in self-supervised vision
In "CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion" (Weinzaepfel et al., 2022), the pretext task masks patches in a first image and reconstructs them using both the visible patches and a second image of the same scene from a different viewpoint. With images and , masking operator , and a transformer-based network , the formulation is
with a per-pixel loss computed over the masked patches. The encoder is a standard ViT-Base/16 with $12$ layers, hidden dimension , and $12$ heads; the decoder uses blocks, hidden dimension 0, and 1 heads. The masking ratio is typically 2. Pre-training on synthetic indoor scenes from HM3D, ScanNet, Replica, and ReplicaCAD totals approximately 3 million image pairs. Reported downstream results include [email protected] improving from approximately 4 to approximately 5 on NYUv2 depth estimation, MPI-Sintel AEPE dropping from approximately 6 to approximately 7, and stereo matching on VKITTI reaching average 8-px error approximately 9 versus approximately 0 for PSMNet (Weinzaepfel et al., 2022).
"Cross-view and Cross-pose Completion for 3D Human Understanding" (Armando et al., 2023) specializes the same principle to human-centric data. It uses either stereoscopic pairs at the same time or temporal pairs from the same camera at times 1 and 2. With masked target patches 3, reference image 4, and reconstruction network 5, the loss is
6
The total pre-training objective sums cross-view and cross-pose losses. A human-segmenter is used so that 7 of human patches are masked while background patches pad the visible-token sequence to fixed length. Pre-training uses HUMBI, AIST, synthetic SMPL renders, and monocular video datasets including 3DPW, PoseTrack, PennAction, JRDB, MARS, and InterHand2.6M. Reported downstream results include PA-MPJPE 8 mm for model-based body mesh recovery on 3DPW, 9 mm for model-free vertex regression, 0 mm for hand mesh recovery on FreiHand, and AUC1 on COCO-Part DensePose. Cross-view only yields PA-MPJPE approximately 2 mm, cross-pose only 3 mm, and combining both 4 mm (Armando et al., 2023).
A later analysis, "Cross-View Completion Models are Zero-shot Correspondence Estimators" (An et al., 2024), shows that the cross-attention map inside cross-view completion models functions as a dense cost volume. With target queries 5, source keys 6, and source values 7, the cross-attention map is
8
and the warped features are
9
The paper reports zero-shot matching AEPE of 0 on HPatches-240 average and 1 on ETH3D average, outperforming DINOv2, DIFT, and SD-DINO. With lightweight heads, ZeroCo-flow reaches HPatches-Original average AEPE 2 and ETH3D average AEPE 3, while ZeroCo-depth ties state of the art on KITTI with AbsRel 4 and achieves RMSE 5 (An et al., 2024). This suggests that, in these models, completion and correspondence are not separate phenomena: the completion operator already contains an implicit matching mechanism.
3. Cross completion in vertical federated learning
In "X-VFL: A New Vertical Federated Learning Framework with Cross Completion and Decision Subspace Alignment" (Yao et al., 7 Aug 2025), XCom is a front-end module for non-aligned data samples with partially missing features. For two clients 6 and 7, each client has a bottom model 8 producing embedding 9. If client 0 has missing features, XCom defines a feature completer
1
and analogously 2. The reconstructed features are re-embedded:
3
For partially missing features, only the missing block is replaced and the existing coordinates are left untouched.
XCom is trained indirectly through the joint classification objective. In the two-client case, the decision loss includes five cross-entropy terms:
4
Decision Subspace Alignment adds two MSE terms:
5
and
6
The full objective is
7
The paper provides convergence theorems under average-smoothness and bounded variance assumptions. For SGD-type algorithms, the rate is 8; for PAGE-type variance-reduced algorithms, it is 9. Correspondingly, reaching an $12$0-stationary point requires $12$1 iterations for vanilla SGD and $12$2 rounds for PAGE-type algorithms. Inference modes include independent no-missing, independent with missing, and collaborative inference. The reported empirical gains are a $12$3 improvement in accuracy on CIFAR-10 and a $12$4 improvement on MIMIC-III. An illustrative example reports that when the left client has zero pixels, standalone confidence in “fish” is $12$5, and XCom reconstruction raises local confidence to $12$6, above the $12$7 obtained with full joint features (Yao et al., 7 Aug 2025).
4. Cross-file code completion
In code intelligence, XCom denotes cross-file code completion: generating code in file $12$8 from in-file context $12$9 and cross-file context 0 drawn from the repository 1. "CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion" (Ding et al., 2023) formalizes the task with ground-truth completion 2 and evaluates Exact Match, Edit Similarity, and identifier-based metrics. The benchmark spans Python, Java, TypeScript, and C#, and uses static-analysis-based construction to ensure the completion strictly requires cross-file context. Final dataset sizes are 3 Python examples, 4 Java, 5 TypeScript, and 6 C#. For StarCoder-7B, in-file exact match is 8 across Python/Java/TypeScript/C#, rising to 9 with retrieval and $12$0 with retrieval w/ Ref. The paper states that even with highest-performing models and strong prompting, “the pinnacle of performance remains notably unattained” (Ding et al., 2023).
"CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Context" (Ding et al., 2022) implements XCom by retrieving relevant project entities with CCFinder and integrating them into an autoregressive code LLM. CCFinder builds a multi-relational directed project context graph whose nodes are files, classes, functions, and globals, and retrieves the $12$1-hop neighborhood of imported nodes, with $12$2 in all experiments. Each retrieved entity is summarized by a special $12$3 token, and at every transformer layer the next-token query attends jointly to in-file keys/values and cross-file embeddings:
$12$4
The training objective is standard autoregressive log-likelihood conditioned on both contexts. On a Python test set of $12$5 prompts, CoCoMIC improves exact match from $12$6 to $12$7, BLEU-4 from $12$8 to $12$9, identifier-match EM from 0 to 1, and reduces perplexity from 2 to 3. The paper reports a 4 relative increase in exact match and a 5 relative increase in identifier matching when cross-file context is provided (Ding et al., 2022).
"Impact-driven Context Filtering For Cross-file Code Completion" (Li et al., 8 Aug 2025) addresses a central difficulty of repository-level retrieval: many retrieved chunks are neutral or negative. It defines a likelihood-based contribution score
6
where 7 is the log-likelihood of the ground-truth completion under generator 8. With thresholds 9 and 00, retrieved chunks are labeled Positive, Neutral, or Negative. On RepoEval-API with StarCoderBase-3B, only approximately 01 of retrieved chunks are Positive, approximately 02 are Negative, and the remaining approximately 03 are Neutral. CODEFILTER trains a generator to emit adaptive-retrieval tokens 04 and polarity tokens 05. Reported gains include roughly 06–07 pp EM over strong RAG baselines and approximately 08 reduction in cross-file prompt tokens (Li et al., 8 Aug 2025). This directly counters the misconception that more repository context is automatically beneficial.
5. Cross-modal completion under missing modalities and reference retrieval
Incomplete text-based person re-identification provides an explicit missing-modality setting. "Prototype-guided Cross-modal Completion and Alignment for Incomplete Text-based Person Re-identification" (Gong et al., 2023) defines an incomplete text-based ReID task in which person images and text descriptions are not completely matched and contain partially missing modality data. The proposed PCCA framework uses cross-modal nearest neighbor construction by computing the cross-modal similarity between existing images and texts, then builds relation graphs with the nearest-neighbor sets and corresponding prototypes to complete missing modal features. It also introduces a prototype-aware cross-modal alignment loss to reduce the modality heterogeneity gap for better fine-grained alignment in common space. The abstract reports that the method consistently outperforms state-of-the-art text-image ReID approaches across benchmarks with different missing ratios (Gong et al., 2023).
Cross-modal point-cloud completion extends the same principle to geometric data. "Benefit from Reference: Retrieval-Augmented Cross-modal Point Cloud Completion" (Hou et al., 19 Jul 2025) builds a 3D-image database and retrieves the top-09 most similar reference samples using CLIP or ULIP image embeddings. Its Structural Shared Feature Encoder jointly extracts cross-modal features from the incomplete point cloud, the paired image, and the retrieved complete point cloud, while a dual-channel control gate enhances relevant structural features and suppresses irrelevant information. The Progressive Retrieval-Augmented Generator fuses reference prior information from global to local. The overall loss combines Chamfer Distance on seed and output point sets with a Gram-matrix-based cross-modal feature-transfer loss. On ShapeNet-ViPC, the method reports CD 10 and F1 11, compared with EGIINet CD 12 and F1 13; on unseen categories it reports CD 14 and F1 15; and with only 16 noisy input points it reports CD@2048 17 and F1 18 (Hou et al., 19 Jul 2025).
"HGACNet: Hierarchical Graph Attention Network for Cross-Modal Point Cloud Completion" (Zeng et al., 17 Sep 2025) uses a Hierarchical Graph Attention encoder, a Multi-Scale Cross-Modal Fusion module, and a contrastive InfoNCE-style loss to align the point and image branches. The decoder upsamples fused features to a complete point cloud, and the loss combines 19 with contrastive alignment. Reported results on ShapeNet-ViPC are CD 20 and F1 21, versus EGIINet CD 22 and F1 23; on YCB-Complete, known objects reach CD 24 and F1 25, while unknown objects reach CD 26 and F1 27 (Zeng et al., 17 Sep 2025). A plausible implication is that retrieval-based priors and hierarchical fusion are two distinct but convergent strategies for supplying missing geometric structure.
6. Tensor “Cross” schemes and theoretical guarantees
In low-rank tensor recovery, “Cross” denotes a measurement and reconstruction scheme rather than a neural completion module. "Cross: Efficient Low-rank Tensor Completion" (Zhang, 2016) studies a third-order tensor of Tucker rank-28 in 29 space. The method observes a “body” subtensor and three “arms,” then reconstructs
30
With the optimal noiseless choice 31, the required number of measurements is
32
which the paper states matches the sample-complexity lower bound. The noisy theory provides an upper bound and a matching minimax lower bound for recovery error, and the framework extends to higher-order tensors (Zhang, 2016).
"Cross Tensor Approximation for Image and Video Completion" (Ahmadi-Asl et al., 2022) adapts cross approximation and tensor CUR approximation to incomplete images and videos. Its multistage completion loop alternates between a CUR-based low-rank update and mask enforcement:
33
For highly structured missingness or very high missing rate, the method smooths sampled fibers before applying CUR. The paper reports that this smoothing can yield up to 34–35 dB PSNR when more than 36 of entries are missing or entire rows and columns are absent. On 37 color images with 38 missingness, PSNR is approximately 39–40 dB for all methods, but Smooth Tucker CUR runs in approximately 41 s versus TR-WOPT approximately 42 s and TR-ALS approximately 43 s. At 44 missingness, Smooth Tucker CUR achieves PSNR approximately 45 dB in 46 s; at 47 missingness it still recovers approximately 48 dB PSNR in approximately 49 s (Ahmadi-Asl et al., 2022).
Taken together, these tensor papers show a different branch of the XCom lineage: exact or approximate recovery from strategically chosen low-rank measurements, rather than semantic completion from auxiliary modalities. This distinction is important. The shared word “Cross” points to the use of intersecting substructures or complementary observations, but the operational objects differ substantially: arms and body subtensors in one case, transformer embeddings and retrieved context in another.