acceptodds
Under review as a conference paper at ICLR 2027

When Semantics Defy Context: Semantic Anomaly Detection in Text-Attributed Graphs

Abstract

Graph anomaly detection in text-attributed graphs (TAGs) seeks to identify suspicious entities using textual attributes and relational information. A key challenge is detecting semantic anomalies: nodes whose content is plausible in isolation but incompatible with their relational context. Existing methods that primarily model deviations in node attributes or graph structure can struggle to identify the semantic conflicts underlying such anomalies. Specifically, textual similarity can obscure semantic conflicts, while reliance on a single contextual scale conceals anomalies or misclassifies legitimate semantic differences. Without anomaly labels, constructing informative negative examples is also challenging because strong perturbations create obvious outliers, whereas weak ones preserve contextual compatibility. We propose the Context-Aware Anomaly Reasoning Network (CARNet), an unsupervised framework for assessing semantic compatibility between nodes and their contexts. CARNet compares attribute-based and structure-based community distributions to expose potential conflicts and integrates local and global evidence to infer the semantics expected from the context. Mixing attributes between semantically dissimilar nodes from different communities while preserving the target's relational context provides synthetic mismatches for self-supervised learning. Extensive experiments on five benchmark datasets demonstrate that CARNet achieves state-of-the-art or competitive performance, with further analyses supporting the effectiveness of its key components.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Graph anomaly detection, Contextual Anomaly Detection, Text-Attributed Graphs

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_3WnJOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

CARNet detects anomalies in text-attributed graphs by comparing attribute and structural community assignments and predicting node attributes from context. It uses cross-community attribute mixing to create training negatives. The method performs well on five synthetic benchmarks, with the largest ablation drop coming from removing these negatives.

Critical strengths

1.The results are competitive against recent TAG anomaly detectors, including CAMERA and CoLL. Separate results for semantic and structural anomalies make the comparison more informative. 2.The ablations help identify where the gains come from, particularly the synthetic negatives and community inference.

Critical weaknesses

1.My main concern is whether the benchmark tests the problem described in the introduction. The injected anomalies change a node’s text to a different topic that is uncommon in its neighborhood. This does not show that CARNet detects conflicts between texts with similar wording, such as the drill/disaster example. The paper also does not test whether legitimate cross-topic connections receive high anomaly scores. 2.I could not determine whether the context predictor has access to the target attributes indirectly. Both the GNN representations and global prototypes are computed from the full feature matrix. Removing the target token from the Transformer does not by itself exclude this information. The separate K-means initialization of the two community heads also needs clarification: how are their community indices aligned before computing KL divergence?

Questions for authors

1.Do you have results on semantically conflicting examples with similar wording, including legitimate cross-topic nodes as controls? 2.Is the target feature masked before computing the GNN representations and prototypes? How are the two sets of community assignments aligned? 3.How were hyperparameters selected without anomaly labels, and what sources of randomness are included in the reported standard deviations?

2 comments

Q1 : Do you have results on semantically conflicting examples with similar wording, including legitimate cross-topic nodes as controls?

A1: The revision adds a more constrained perturbation, with text statistics in Appendix E.1 and Table 6. These rewrites aim to change the topic while retaining the source wording. Across the six datasets, rewrite embedding cosine similarity ranges from 0.7667 to 0.9563, and the retained proportion of distinct original words ranges from 85.91% to 95.71%. These quantities measure resemblance to the source text.

The tables below reproduce the Table 2 comparison of CARNet with CMUCL, CoLL, and CAMERA on Cora, Citeseer, Pubmed, and Wikics under this perturbation setting.

AUROC (%)

MethodCoraCiteseerPubmedWikicsComputersArxiv
CMUCL71.49±1.4274.05±1.5360.68±0.3467.17±0.8468.30±1.4172.63±0.58
CoLL77.83±1.6273.60±2.2065.74±0.7268.35±2.0771.06±0.7373.06±0.74
CAMERA74.12±0.6877.08±1.2466.27±1.1869.91±1.5372.49±0.9672.69±1.35
CARNet80.94±1.0781.17±0.1766.20±0.2472.23±1.4174.50±1.6675.04±0.47

Average precision (AP, %)

MethodCoraCiteseerPubmedWikicsComputersArxiv
CMUCL14.10±0.7429.77±1.3514.60±0.2515.42±0.3328.35±1.2718.53±0.72
CoLL18.24±1.7527.35±2.1915.63±0.5915.14±2.1130.51±0.6218.42±0.60
CAMERA17.93±1.0936.93±1.3715.42±0.7917.58±1.3929.77±0.8819.17±0.84
CARNet21.94±0.7739.30±0.3915.44±0.0520.04±1.1331.72±1.2021.56±0.24

Within this setting, CARNet has the highest reported AUROC and AP on Citeseer (81.17% and 39.30%) and Wikics (72.23% and 20.04%). Pubmed remains challenging: CARNet obtains 56.20% AUROC and 5.44% AP, while CAMERA and CoLL have the highest reported AUROC and AP, respectively.

Revision and evidence status: Section 5.2/Table 2 and Appendix E.1/Table 6 are present in the manuscript.


Q2 Is the target feature masked before computing the GNN representations and prototypes? How are the two sets of community assignments aligned?

A2: The target feature is not masked before computing the GNN representations and community prototypes. Although omitted as a standalone Transformer token, it can influence prediction indirectly through graph propagation and community aggregation. We have clarified this in Section 4.2.  The two community heads are initialized independently without explicit index matching. A structure-to-attribute KL regularizer encourages agreement during joint training but does not guarantee initial cluster correspondence. Appendices C–D now clarify this procedure. These revisions describe the existing implementation; no masking or alignment modifications were made.


Q3: How were hyperparameters selected without anomaly labels, and what sources of randomness are included in the reported standard deviations?

A3: Hyperparameters were selected through grid search using label-independent criteria. AUROC and AP computed from anomaly annotations were not used to choose the hyperparameter configuration. The candidate values reported in Appendix E.1 are learning rates of {0.001, 0.0005}, community counts of {32, 64, 128}, and neighborhood sizes of {4, 8, 16, 32}.


For CARNet, the standard deviations describe variation across repeated training runs on a fixed constructed benchmark. Section 5.1 and Appendix E.1 now clarify that the training seed controls neural-network initialization, K-means initialization, dropout, and the selection of target and donor nodes for self-supervised feature mixing. The graph, rewritten node texts, encoded features, anomaly annotations, and hyperparameters are held fixed across runs.

Revisions made in response to your comments are highlighted in orange. Some of the content may overlap with other colored annotations.

Reviewer_dhEuOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

CARNet detects anomalies in text-attributed graphs through community disagreement, local-global contextual prediction, and synthetic negative training. It reports competitive performance on five datasets with injected anomalies.

Critical strengths

CARNet performs well against a broad set of baselines across multiple datasets. Ablations support the contributions of synthetic supervision and global context.

Critical weaknesses

The problem definition does not sufficiently distinguish semantic conflict from legitimate variation. Cross-topic connections can be normal. In the motivating example, the anomaly concerns a particular misuse or citation of a post, rather than the post itself. It is unclear how the graph representation and node-level score distinguish legitimate references from misleading uses.

The benchmark does not adequately test the central claim. Appendix E.1 primarily constructs anomalies by rewriting node texts toward topics uncommon in their neighborhoods. This tests topic–context mismatch, but does not establish detection of semantic conflicts hidden by high textual similarity. Controls for legitimate cross-topic connections and LLM rewriting artifacts are missing. Evaluation under alternative anomaly constructions or on real-world data would also strengthen the evidence.

Questions for authors

What distinguishes genuine semantic conflict from legitimate cross-topic relationships, and why is node-level detection appropriate for the motivating misuse example? Can you provide results on high-similarity semantic conflicts and legitimate cross-topic nodes, with same-topic rewriting controls to assess possible generation artifacts?

2 comments

Q1: Can you provide results on high-similarity semantic conflicts and legitimate cross-topic nodes, with same-topic rewriting controls to assess possible generation artifacts?

A1: The added subtle rewriting benchmark tests topic changes that preserve much of the source wording; on CiteSeer and WikiCS, CARNet outperforms the strongest baseline by 2.32–4.09 % in AUROC and 2.37–2.46 % in AP.

Results are summarized below.

AUROC (%)

MethodCoraCiteseerPubmedWikicsComputersArxiv
CMUCL71.49±1.4274.05±1.5360.68±0.3467.17±0.8468.30±1.4172.63±0.58
CoLL77.83±1.6273.60±2.2065.74±0.7268.35±2.0771.06±0.7373.06±0.74
CAMERA74.12±0.6877.08±1.2466.27±1.1869.91±1.5372.49±0.9672.69±1.35
CARNet80.94±1.0781.17±0.1766.20±0.2472.23±1.4174.50±1.6675.04±0.47

AP (%)

MethodCoraCiteseerPubmedWikicsComputersArxiv
CMUCL14.10±0.7429.77±1.3514.60±0.2515.42±0.3328.35±1.2718.53±0.72
CoLL18.24±1.7527.35±2.1915.63±0.5915.14±2.1130.51±0.6218.42±0.60
CAMERA17.93±1.0936.93±1.3715.42±0.7917.58±1.3929.77±0.8819.17±0.84
CARNet21.94±0.7739.30±0.3915.44±0.0520.04±1.1331.72±1.2021.56±0.24

Manuscript location and status: Section 5.2/Table 2 and Appendix E.1/Table 6 have been added.


LLM rewriting should also be applied when the topic and meaning are preserved. Our results show that CARNet effectively distinguishes the evaluated semantic anomalies from meaning-preserving LLM rewrites, suggesting that its predictions are not driven solely by generic LLM writing style. We have incorporated this control into Appendix F.1 and Table 9 to examine false alarms associated with benign textual changes.

Within each benchmark, normal nodes are randomly assigned to disjoint unmodified (O) and rewritten (R) groups. The existing semantic anomalies (A) are retained, and the graph structure is fixed.

Metric (%)CoraCiteseerPubmedWikics
AUROC (A vs. R)92.44±0.9891.34±0.4492.24±0.1288.45±1.09
FPR (O)5.24±1.724.76±0.598.16±1.026.50±1.86
FPR (R)6.37±1.303.40±0.595.44±0.598.13±2.54
TPR (A)74.69±2.6758.44±1.3966.89±3.3055.17±2.52

The high AUROC values indicate that CARNet effectively distinguishes existing semantic anomalies from meaning-preserving normal rewrites. The low false-positive rates for both O and R further show that it rarely misclassifies either original or rewritten normal texts as anomalous.

Manuscript location and status: Appendix F.1, “Sensitivity to LLM rewriting,” and Table 9 are present in the manuscript.

Revisions made in response to your comments are highlighted in green. Some of the content may overlap with other colored annotations.

Reviewer_qKLZOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

To address the challenging problem of semantic anomaly detection in text-attributed graphs, where node content is incompatible with its relational context, this paper proposes an unsupervised Context-Aware Anomaly Reasoning Network (CARNet). This framework quantifies semantic conflicts by comparing the latent community distributions derived from attributes and structures, integrates local and global contexts to infer expected semantics, and introduces a cross-context semantic perturbation strategy to construct self-supervised learning signals, ultimately achieving state-of-the-art anomaly detection performance across multiple benchmark datasets.

Critical strengths

1- The paper highlights the blind spot in existing graph anomaly detection methods that solely focus on attribute or structural deviations, reformulating the core objective of semantic anomaly detection from measuring the extent of a node's deviation to evaluating whether its relational context can explain its observed semantics.

2- Leveraging its proposed dual-view community distributions, the paper selects nodes from different latent communities that exhibit the lowest semantic similarity for attribute mixing, thereby constructing high-quality negative samples.

Critical weaknesses

1- Due to the lack of real-world semantic anomaly labels, the paper relies on LLMs to rewrite text for constructing synthetic anomaly samples. However, texts generated by LLMs often carry specific generation patterns or stylistic features. The model is highly likely to have merely learned to identify "LLM-generated text features" rather than truly understanding the "incompatibility between semantics and context."

2- The paper does not explicitly clarify whether the 14 baseline methods were rigorously re-evaluated using the exact same text encoder and preprocessing pipeline.

Questions for authors

1- The framework illustration in Figure 2 lacks sufficient explanation.

2- The related work section is not sufficiently comprehensive.

3- The AI use statement contradicts the actual practice described in the paper, which explicitly states that the negative sample data is synthesized using an LLM.

4- The presentation of the three challenges in the Introduction is overly verbose, which dilutes the core message and obscures the key takeaways. The authors should streamline this section to highlight the most critical aspects more concisely and effectively.

5- The terminology of "local-global" reasoning is well-established and frequently used in graph learning literature. Consequently, the authors should explicitly and thoroughly detail how their proposed method specifically extracts, represents, and integrates local and global information, rather than merely relying on this generic phrasing.

6- The benchmark datasets utilized in this paper (e.g., Cora, Citeseer, PubMed) are relatively outdated and may not reflect the complexities of modern applications. To better demonstrate the practical applicability and robustness of the proposed method, the authors should evaluate it on more recent and realistic, large-scale real-world datasets.

4 comments

W1: Due to the lack of real-world semantic anomaly labels, the paper relies on LLMs to rewrite text for constructing synthetic anomaly samples. However, texts generated by LLMs often carry specific generation patterns or stylistic features. The model is highly likely to have merely learned to identify “LLM-generated text features” rather than truly understanding the “incompatibility between semantics and context.”

A1: we have added a same-topic normal-rewriting control in Appendix F.1. The control includes unmodified normal nodes (O), meaning preserving LLM rewrites of normal nodes (R), and all existing semantic anomalies (A).

The high AUROC values indicate that CARNet effectively distinguishes existing semantic anomalies from meaning-preserving normal rewrites. The low false-positive rates for both O and R further show that it rarely misclassifies either original or rewritten normal texts as anomalous.

Metric (%)CoraCiteseerPubmedWikics
AUROC (A vs. R)92.44±0.9891.34±0.4492.24±0.1288.45±1.09
FPR (O)5.24±1.724.76±0.598.16±1.026.50±1.86
FPR (R)6.37±1.303.40±0.595.44±0.598.13±2.54
TPR (A)74.69±2.6758.44±1.3966.89±3.3055.17±2.52

Q1: The framework illustration in Figure 2 lacks sufficient explanation.

A1: We have revised the Figure 2 caption and the opening of Section 4 to explain the computation from graph and feature inputs to anomaly scoring. The explanation follows the three named modules in the figure.


Q2: The related work section is not sufficiently comprehensive.

A2: We have expanded and reorganized Section 2 into two focused paragraphs: “Unsupervised Graph Anomaly Detection” and “Anomaly Detection on Text-Attributed Graphs.”


Q3: The AI use statement contradicts the actual practice described in the paper, which explicitly states that the negative sample data is synthesized using an LLM.

A3: We acknowledge the inconsistency in the original disclosure and have corrected Appendix A. The revised statement explicitly reports that LLMs were used to rewrite node texts when constructing the synthetic semantic-anomaly benchmarks described in Appendix E.1.


Q4: The presentation of the three challenges in the Introduction is overly verbose, which dilutes the core message and obscures the key takeaways. The authors should streamline this section to highlight the most critical aspects more concisely and effectively.

A4: We have shortened the three challenges in the Introduction and focused each on the underlying difficulty. The challenge descriptions now focus on the problems, while the following method overview separately explains how CARNet’s components address them.

Manuscript location: Section 1, the three challenge descriptions and the following method overview.


Q5: The terminology of “local-global” reasoning is well-established and frequently used in graph learning literature. Consequently, the authors should explicitly and thoroughly detail how their proposed method specifically extracts, represents, and integrates local and global information, rather than merely relying on this generic phrasing.

A5: We have expanded Sections 4.1–4.2 in the revised manuscript to explicitly describe how CARNet extracts, represents, and integrates local and global information**.** These additions clarify the construction of neighbor tokens and the local summary, the aggregation of community prototypes into global context, and their integration through the Transformer reasoner.


Q6: The benchmark datasets utilized in this paper (e.g., Cora, Citeseer, Pubmed) are relatively outdated and may not reflect the complexities of modern applications. To better demonstrate the practical applicability and robustness of the proposed method, the authors should evaluate it on more recent and realistic, large-scale real-world datasets.

A6: We have added Computers, an Amazon e-commerce graph with 87,229 nodes and 742,792 edges, extending the evaluation beyond citation and hyperlink networks. CARNet achieves 82.06% AUROC in the main setting and 74.50% AUROC / 31.72% AP in the subtle setting.

MethodMain AUCMain APSubtle AUCSubtle AP
HUGE-GAD79.55±1.2538.30±1.2865.59±1.2724.66±1.44
CMUCL78.36±1.1637.28±1.0968.30±1.4128.35±1.27
CoLL81.36±1.2240.53±1.4971.06±0.7330.51±0.62
CAMERA80.41±1.2538.59±1.1572.49±0.9629.77±0.88
CARNet82.06±1.2940.11±1.0574.50±1.6631.72±1.20

CARNet has the highest mean AUROC in the main setting, while CoLL has slightly higher AP (40.53% vs. 40.11%). In the subtle setting, CARNet exceeds the strongest baseline by 2.01 percentage points in AUROC and 1.21 in AP.

Reviewer_qKLZOpenReview ↗

Please Update Your PDF

Can the author mark the modified sections? My corresponding part is marked in red, while other reviewers use other colors for differentiation.

Revisions made in response to your comments are highlighted in red.

Reviewer_qKLZOpenReview ↗

Upweight Score

Thank you for your response, I have upweighted my rating.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.