acceptodds
Under review as a conference paper at ICLR 2027

CancerEmbed: Learning Temporal Patient Representations with Comorbidity-Guided Geometry

Abstract

Identifying the primary site of cancer from longitudinal electronic health records (EHRs) is challenging due to heterogeneous clinical evidence, irregular trajectories, and nonspecific phenotypes. We introduce CancerEmbed, a representation-learning framework that formulates primary-site identification as trajectory-aware patient retrieval over structured and unstructured EHRs. CancerEmbed combines a diagnosis-relative temporal Transformer that integrates summarized clinical notes with structured context, cluster-specific sparse attention (CSA) that extracts cancer-specific evidence directly from full clinical notes, and comorbidity-guided deep metric learning (DML) that structures patient representations using phenotypic similarity beyond cancer labels. Across five cancer types, CancerEmbed demonstrates strong generalization to an independent cohort of diagnostically challenging cases. The temporal Transformer with SupCon achieves 86.8% H@5 and 61.1% P@5, improving over the same representation without DML by 28.3 and 15.1 percentage points, respectively, and reaches 64.2% classification accuracy and 45.4% macro-F1. Complementarily, CSA achieves 81.1% H@5 and 53.6% P@5 without DML using full clinical notes alone, without structured EHR inputs at inference. These results show that jointly modeling temporal, semantic, and phenotypic similarity improves generalization under distribution shift and that metric-learning gains depend on the underlying representation. More broadly, CancerEmbed provides a framework for organizing heterogeneous longitudinal clinical data into meaningful patient neighborhoods for retrieval-based reasoning.

Primary area:
unsupervised, self-supervised, semi-supervised, and supervised representation learning
Keywords:
Patient Representation Learning, Temporal Modeling, Deep Metric Learning, Similar-Patient Retrieval

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_ZJa5OpenReview ↗
Rating
2(+1)
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

The paper proposes a new Transformer-based model to identify the primary site of cancer from longitudinal electronic health records. Specifically, the authors concentrate on two aspects: 1) classification of 5 different cancers and 2) similar patient retrieval. The main contribution of the paper is the new architecture which perform better than examined baselines. The authors evaluate their proposed model on an internal set and more importantly an external Unidentified Mass Clinic cohort encompassing 53 patients.

Critical strengths

The main strength of this paper lies in its research topic, which is timely and interesting.

Critical weaknesses
  1. Several recent studies have investigated temporal EHR modelling for patient similarity retrieval, while primary tumour-site prediction has also received increasing attention. Therefore, comparisons with more recent approaches are necessary to establish the novelty and competitiveness of the proposed framework. Most of the methods discussed or cited in the manuscript were published before 2024. Moreover, only a limited number of baseline models are included in the experimental evaluation. As a result, it is difficult to determine whether the proposed framework offers meaningful improvements over existing approaches, which weakens the authors' claims regarding its effectiveness.

  2. The authors claim several advantages of the proposed model and present its components as key contributions. However, the experimental results do not clearly demonstrate the benefits of individual components, such as the diagnosis-relative temporal Transformer and the cluster-specific sparse attention mechanism. This concern is further reinforced by the relatively poor performance on the external UMC cohort, which raises questions about the practical effectiveness and generalizability of these components. Although some configurations outperform others, the results do not provide sufficiently and statistically convincing evidence that the proposed architectural innovations offer meaningful advantages over existing approaches.

Questions for authors
  1. Does Contribution (1) not already encompass Contributions (2), (3), and (4)? These contributions appear to address different aspects of the same overarching idea rather than presenting clearly distinguishable innovations.

  2. Contribution (5) does not appear to represent a "real contribution", as it primarily describes the evaluation of the proposed framework. The authors should reconsider whether this should be listed as a standalone contribution.

  3. Several recent studies have investigated temporal EHR modeling for patient similarity retrieval, while primary tumor-site prediction has also received increasing attention. Therefore, comparisons with more recent approaches are necessary to establish the novelty and competitiveness of the proposed framework. Most of the methods discussed or cited in the manuscript were published before 2024. Given the rapid developments in this field over the past two years, the related work should be updated to include more recent studies and clearly distinguish the proposed approach from existing methods.

  4. The mathematical formulations are difficult to follow because several variables are introduced without clear definitions or dimensional information. Furthermore, the notation is inconsistent, with some variables written in boldface and others in regular font without an apparent distinction.

  5. The dataset description is rather vague. Important information concerning data characteristics, preprocessing procedures, missing-value handling and statistical properties is not adequately presented. Furthermore, the external evaluation involves very few patients for several cancer types, making it difficult to assess the reliability and generalizability of the reported findings.

  6. The experimental design is not explained in sufficient detail. In particular, the authors should clearly state the purpose of each experiment, which research objective or methodological contribution it is intended to evaluate and why the selected baselines are appropriate.

  7. The number of baseline methods is relatively limited, making it difficult to assess the competitiveness of the proposed approach.

  8. The evaluation metrics are not adequately introduced or explained.

  9. The manuscript presents primary cancer-site identification as a broad research objective, particularly in the context of diagnostically uncertain patients. However, the experiments are restricted to five predefined cancer categories. While these experiments demonstrate the framework's ability to. distinguish among the selected cancer types, they do not fully establish its effectiveness for primary-site identification in more general clinical settings, particularly for patients with cancer of unknown primary.

Reviewer_oQLYOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

CancerEmbed is a patient-level representation learning framework for identifying the primary site of cancer. It also aims to retrieve records of similar patients from EHR datasets. The framework uses a diagnosis-relative temporal Transformer to aggregate encounter-level information and a cluster-specific sparse attention module to select useful information from unstructured medical notes. It also uses a comorbidity-guided deep metric learning framework to refine the embedding space using information about relationships between patients. The resulting embeddings are evaluated on patient classification and retrieval tasks. The authors report strong performance in both internal and external evaluations, although the external results vary across configurations.

Critical strengths
  1. The question addressed is practical and valuable, and using comorbidity similarity to reshape the representation space might be a promising approach to improving generalization.

  2. The authors provide a unified framework that combines complementary clinical evidence, including structured records, unstructured clinical notes, comorbidity information, and peer information, to create comprehensive patient representations.

  3. The proposed method achieves strong empirical performance on both internal and external datasets under the specified settings, demonstrating good generalization to the external dataset.

Critical weaknesses
  1. LLMs can be sensitive to prompt wording and the cases provided as input. Given these sensitivities and the authors’ use of small open-source models such as Qwen for summarization, issues such as hallucinations and instruction-following errors may arise. An analysis of failure cases or a human evaluation of the quality of summaries generated using the selected prompts would be helpful.

  2. Could the authors clarify why they select only eight text chunks instead of using predefined information categories? Useful evidence may be distributed across different sections of unstructured medical notes. Could the authors explain the trade-offs between these two approaches, given that advanced LLMs should be capable of retrieving and organizing unstructured information into categories based on context.

  3. The current dataset description is brief. Providing additional statistics and details would be helpful. Could the authors also explain how the pairwise similarity threshold is determined and provide a sensitivity analysis, given that the appropriate threshold may vary across data distributions.

  4. For retrieval, a baseline based solely on the Jaccard score should be included. This would help show that Jaccard scores alone may be insufficient or may fail under external dataset settings. It would also help quantify how much the proposed method improves over a basic rule-based strategy. In addition, comparisons with recent state-of-the-art retrieval methods could help demonstrate the superiority of the proposed design under the specified settings.

  5. The presentation of the main table could be improved through clearer organization, as it currently combines baseline comparisons, architecture comparisons, and component ablations.

  6. The model achieves leading performance in some of the reported settings, but not under a unified set of settings. This requires additional effort when adapting the model to new use cases.

Questions for authors
  1. Regarding note processing, could authors explain why medical notes are not filtered before being divided into chunks? The original notes may be lengthy and contain noise, potentially making the approach difficult to scale to longer visit histories and notes. Would processing long patient records therefore become computationally expensive?

  2. Could authors include a retrieval baseline based solely on the Jaccard score? This would help demonstrate how much the proposed method improves performance under the specified settings. If possible, including one or two state-of-the-art general retrieval methods would also help demonstrate the superiority of your design for the medical context under these settings. Although the Jaccard score may help identify patients with similar codes, could relying on it limit the ability to capture complementary information across patients? For example, a retrieved patient with a low Jaccard similarity to the query patient may contain key information that complements information from other retrieved peers with high scores.

  3. Could authors provide an analysis of the quality of the summaries generated by Qwen? If possible, could Table 1 also be reorganized to distinguish between different types of methods, or could a header row be added to clarify the purpose of each comparison? In addition, the current dataset description is brief, and providing additional statistics and details would be helpful. Could you also explain how the pairwise similarity threshold is determined and provide a sensitivity analysis, given that the appropriate threshold may vary across data distributions?

Reviewer_pD4WOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
1
Soundness
2
Read review
Paper summary

This paper recasts cancer primary-site identification as trajectory-aware patient retrieval over longitudinal EHRs. Two representation pathways, cluster-specific sparse attention (CSA) for clinical notes, and a temporal Transformer with diagnosis-relative encoding for mixed EHR data, are refined by comorbidity-guided deep metric learning using ICD-10 Jaccard similarity. Trained on 11,440 patients across five cancer types, the full system achieves 86.8% H@5 and 61.1% P@5 on an external cohort of 53 diagnostically challenging cases.

Critical strengths
  • Reframing primary-site identification as retrieval is well-motivated for clinical use, clinicians get interpretable precedents, not a black-box label.

  • The CSA pathway achieving strong retrieval without structured EHR input is practically useful, since structured data is often messy or unavailable.

  • Comorbidity-guided DML is a sensible design choice. Using phenotypic similarity beyond cancer labels to structure the embedding space is clinically grounded.

  • The paper honestly reports the large internal-external performance gap, and ablations show DML gains are representation-dependent.

Critical weaknesses
  • The external cohort is N=53, with 3 breast, 2 prostate, and 3 pancreatic cases. A single misclassification swings per-class F1 by 10+ points. No confidence intervals are reported. This is too small to support generalization claims.

  • The pipeline is very complex (chunk embedding, sparse attention, Qwen summarization, temporal Transformer, two auxiliary heads, residual DML adapters, many hyperparameters) but the ablation only varies the DML objective. What happens if you drop the Qwen summarizer, the future-representation head, or the budget penalty?

  • Single-institution training data. The external set tests prevalence shift but not documentation practices, EHR systems, or clinical workflows.

  • "Trajectory-aware" is somewhat oversold — the temporal encoding is basically normalized positional encoding, with no explicit disease-progression modeling.

  • The Qwen summarization step (a fine-tuned 7B model) is a substantial dependency that is never ablated.

Questions for authors
  • Can you provide bootstrap confidence intervals for the external UMC metrics?

  • What happens if you remove Qwen summarization and encode notes directly?

  • How sensitive is DML to the α_+ = 0.45, α_− = 0.25 thresholds?

  • How does performance change with a shorter pre-diagnosis window (30 or 60 days)?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.