REVIEW 4 major objections 5 minor 1 cited by
Toward Neurosymbolic Program Comprehension
T0 review · 4 major / 5 minor · reviewed 2026-08-09 · deepseek-v4-flash
Pith's one-line read SHAP explanations of a code model, grouped by AST type and token position, can be converted into symbolic rules for identifying secure and insecure code snippets.
desk verdict A well-scoped vision paper whose empirical seed—SHAP-by-AST-type patterns—lacks a null model and whose promised rules are never actually stated. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the SHAP tensor, a per-token record $(i, w_i, \varphi_i, \mu_i)$ where $i$ is the token's position, $w_i$ is the token, $\varphi_i$ is its SHAP value, and $\mu_i$ is its abstract-syntax-tree type. An alignment function maps each token to its AST type, and the framework trains supervised models (logistic regression in the case study) on SHAP values grouped by AST type across position ranges; a curve with accuracy above 60% and an x-axis intersection is treated as evidence of a symbolic rule.
What would settle it
Permute the SHAP values within each abstract-syntax-tree type and position bin, retrain the same logistic-regression probes, and count how often the 60%-accuracy plus x-intercept criterion is met; if shuffled attributions produce patterns at a comparable rate, the proposed rules are artifacts rather than signal.
Extended reading notes
Core claim
The paper's central claim is that position-sensitive SHAP patterns carry enough signal to define symbolic rules for vulnerability classification. In the case study, literals appearing early in a snippet are associated with insecure predictions, while operators appearing late are associated with secure predictions; the authors take these as instances of the general claim that AST-type and position configurations with high SHAP influence can be turned into rules. They answer their research question affirmatively, stating that the NsPC framework identified meaningful insecure-prone patterns within specific position ranges that facilitated rule definition.
Load-bearing premise
The approach assumes that a logistic-regression probe crossing a 60% accuracy threshold on SHAP values grouped into six fixed position ranges indicates a genuine, stable symbolic pattern rather than noise or dataset artifact.
Editorial extensions
If this is right
- Symbolic rules derived this way can be attached in the post-training stage, letting low-confidence predictions be guided by deterministic conditions.
- Practitioners could inspect which syntax types in which token ranges contribute to insecure predictions, turning part of the model's judgment into checkable statements.
- The evidence is model-specific, so any new code model used for vulnerability detection would need its own SHAP-tensor analysis before its rules are trusted.
- Because the tensor format is class-agnostic, the same extraction pipeline can target other labels beyond secure and insecure, such as bug-prone or style-violating code.
Reading between the lines
- I infer that the six fixed position bins and the 60% threshold need calibration: without a null baseline or multiple-comparison control, some cells in Table I may reflect chance, and a permutation test would settle this.
- I infer that the same pipeline could be run with other attribution methods, such as integrated gradients, to check whether the derived rules reflect the model's behavior or SHAP's particular value allocation.
- A test the paper leaves open is whether applying the extracted rules to low-confidence predictions improves overall detection accuracy, which would close the loop from pattern to rule to model adjustment.
- Tokenization interacts with position ranges, so the rules may encode subword-tokenizer artifacts as much as syntax; controlling for token length would make the position signal cleaner.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes NsPC, a neurosymbolic framework for program comprehension: compute SHAP values from a fine-tuned CodeBERT model on Java snippets, align tokens to AST types, group SHAP values by AST type and position bin, train logistic regression models on each bin, and use cells with accuracy above 60% and an x-axis intersection as evidence of symbolic rules for vulnerability detection. A case study on 300 insecure and 300 secure snippets reports Table I and answers RQ1 affirmatively, while acknowledging that the evidence is model-specific and not yet generalizable.
Significance. If the proposed pipeline were validated, it would be an interesting step toward interpretable, rule-augmented code models, responding to legitimate concerns about the opacity and cost of large code models. The paper is honest about limitations and builds on relevant prior work in probing and neurosymbolic SE. However, the current evidence does not establish the central claim: there is no null model, no concrete rule set, no evaluation of rules, and the design creates a potential internal loop between SHAP values and the model being explained. The contribution at present is a promising idea plus a preliminary, under-controlled case study.
major comments (4)
- [Section III-A, Table I] The criterion of "accuracy exceeding 60%" plus an "intersection with the x-axis" is not validated against any null model. With 8 AST types and 6 position ranges, some cells will pass the 0.60 threshold by chance, yet the paper reports no confidence intervals, significance tests, or multiple-comparison correction, and the x-intercept criterion is never formally defined for a logistic regression. This is load-bearing because RQ1 is answered solely from the qualified cells in Table I.
- [Section III-B and Section IV-A] The symbolic rules promised by RQ1 are never actually stated. Section III-B gives only a template ("if a feature linked to an AST node consistently shows high SHAP values..."), and the case study stops at Table I plus narrative interpretations in Section IV-A. To support the claim that patterns "facilitated the definition of symbolic rules," the manuscript must present a concrete rule syntax, the rules derived for the studied model, and a held-out evaluation of those rules against the base model.
- [Section III-A, Figure 1] Because the SHAP values are computed from the very CodeBERT model whose predictions define the target labels, a logistic regression on those SHAP values can separate classes simply by inheriting the model's predictive signal. The paper does not test whether the AST-type/position grouping adds explanatory value beyond raw SHAP values; a control using shuffled SHAP values, ungrouped SHAP values, or a label permutation test is needed to distinguish real structure from model-reproduced signal.
- [Section IV, Evaluation Dataset and Results] With only 300 snippets per class and most qualifying accuracies clustered around 0.60, the reported numbers are too fragile to support the conclusion. The paper gives no variance estimates, confidence intervals, or tests against chance, and the threshold is close to the observed values. A bootstrap or cross-validated estimate, together with reporting which cells fail the threshold under resampling, would be needed to establish the stability of the patterns.
minor comments (5)
- [Section IV-A] The text says the qualified AST types include "primitive," but Table I shows no primitive cell with both accuracy above 0.60 and an x-intercept; the list of qualifying types and the gray shading need to be reconciled.
- [Section IV, Evaluation Dataset] The paper states a 500-token limit in dataset construction but then says "considering a maximum token length of 300 per snippet"; clarify whether snippets were truncated to 300 tokens for the SHAP analysis.
- [Section IV-A, Figure 2] The phrases "positions [0 − 43]" and "positions [251 − 280]" conflate the fixed position bins ([0-50], [251-300]) with the reported x-intercepts; specify whether the proposed rule applies to the whole bin or to a subrange defined by the intercept.
- [Section III-A] The prose says "curves with an accuracy exceeding 60%" and later that the "logistic regression model surpassed" the threshold; accuracy belongs to the classifier, not to the fitted curve, and the text should distinguish the decision curve from the classifier's accuracy.
- [Section II, Reference [15]] The paper cites [15] on problems with SHAP-based feature importance but does not return to those caveats when interpreting Table I; a short discussion of SHAP's known limitations in this setting would strengthen the validity discussion.
Circularity Check
No significant circularity: the paper's SHAP-based rule extraction is descriptive of the fixed model's behavior and does not reduce to its inputs by construction.
full rationale
The paper's derivation chain is an interpretability pipeline over a fixed, externally trained model (CodeBERT fine-tuned on Devign/CodeXGLUE). SHAP values are computed from that model, grouped by AST type and token position, and a logistic regression is fitted for each cell; the fitted curves are presented as descriptive evidence of where the model's SHAP attributions correlate with security labels. No equation in the paper defines a rule in terms of the rule's own conclusion, and no parameter is fitted to a target quantity and then renamed as a prediction. The logistic regressions could fail to reach 60% accuracy, and indeed many cells in Table I do fail, so the reported patterns are not forced by construction. The paper's own limitation statement acknowledges that the evidence is model-specific and not a generalizable rule set, which further indicates that the authors are not claiming an independent predictive result. Self-citations [24]-[26] are used only as inspiration for syntax-based token alignment, not as load-bearing support for the central claim, and the cited external model and benchmark provide an independent anchor. Concerns about the absence of a null model, the in-sample accuracy threshold, and the undefined x-intercept criterion are methodological validity issues, not circularity. No circular step can be exhibited from the paper's text, so the appropriate finding is no significant circularity.
Assumptions & free parameters
free parameters (3)
- Pattern detection accuracy threshold =
60%
- Position range boundaries =
six bins of width 50 over [0,300]
- Maximum analyzed token length =
300 tokens
assumptions (3)
- domain assumption SHAP values computed for CodeBERT faithfully represent each feature's contribution to individual predictions.
- ad hoc to paper Logistic regression accuracy above 60% with an x-axis intersection indicates a meaningful symbolic rule.
- domain assumption The alignment function delta(w_i) that tags tokens with AST types is accurate and preserves semantic meaning.
invented entities (1)
-
NsPC framework
Cite this review
Pith. "Pith review of Toward Neurosymbolic Program Comprehension." pith.science (2026). https://pith.science/paper/UTK7ZIKR
@misc{pith2026250201806,
author = {Pith},
title = {Pith review of: Toward Neurosymbolic Program Comprehension},
year = {2026},
howpublished = {\url{https://pith.science/paper/UTK7ZIKR}},
note = {Machine review of arXiv:2502.01806}
}
read the original abstract
Recent advancements in Large Language Models (LLMs) have paved the way for Large Code Models (LCMs), enabling automation in complex software engineering tasks, such as code generation, software testing, and program comprehension, among others. Tools like GitHub Copilot and ChatGPT have shown substantial benefits in supporting developers across various practices. However, the ambition to scale these models to trillion-parameter sizes, exemplified by GPT-4, poses significant challenges that limit the usage of Artificial Intelligence (AI)-based systems powered by large Deep Learning (DL) models. These include rising computational demands for training and deployment and issues related to trustworthiness, bias, and interpretability. Such factors can make managing these models impractical for many organizations, while their "black-box'' nature undermines key aspects, including transparency and accountability. In this paper, we question the prevailing assumption that increasing model parameters is always the optimal path forward, provided there is sufficient new data to learn additional patterns. In particular, we advocate for a Neurosymbolic research direction that combines the strengths of existing DL techniques (e.g., LLMs) with traditional symbolic methods--renowned for their reliability, speed, and determinism. To this end, we outline the core features and present preliminary results for our envisioned approach, aimed at establishing the first Neurosymbolic Program Comprehension (NsPC) framework to aid in identifying defective code components.
Figures
Forward citations
Cited by 1 Pith paper
-
Not All Tokens Matter: Data-Centric Optimization for Efficient Code Summarization
The best token-pruning strategy for code summarization is language-dependent: AST inputs help Java but hurt Python, while function signatures are best for Python.
Reference graph
Works this paper leans on
-
[1]
Gpt-4 technical report,
OpenAI et al., “Gpt-4 technical report,” 2024
2024
- [2]
- [3]
-
[4]
J. White et al., “ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Design,” Mar. 2023, arXiv:2303.07839
arXiv 2023
-
[5]
Retrieval-based prompt selection for code-related few- shot learning,
N. Nashid et al., “Retrieval-based prompt selection for code-related few- shot learning,” in 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE) . IEEE, 2023, pp. 2450–2462
work page 2023
-
[6]
On the use of chatgpt for code review: Do devel- opers like reviews by chatgpt?
M. Watanabe et al., “On the use of chatgpt for code review: Do devel- opers like reviews by chatgpt?” in Proceedings of the 28th International Conference on Evaluation and Assessment in Software Engineering , 2024, pp. 375–380
work page 2024
-
[7]
Beyond code generation: An observational study of chatgpt usage in software engineering practice,
R. Khojah et al. , “Beyond code generation: An observational study of chatgpt usage in software engineering practice,” Proceedings of the ACM on Software Engineering , vol. 1, no. FSE, pp. 1819–1840, 2024
work page 2024
-
[8]
Github copilot ai pair programmer: Asset or liability?
A. M. Dakhel et al. , “Github copilot ai pair programmer: Asset or liability?” Journal of Systems and Software , vol. 203, p. 111734, 2023
2023
Show all 47 references
-
[9]
Large language models for software engineering: A sys- tematic literature review,
X. Hou et al., “Large language models for software engineering: A sys- tematic literature review,” ACM Transactions on Software Engineering and Methodology, 2023
2023
-
[10]
Towards greener llms: Bringing energy-efficiency to the forefront of llm inference,
J. Stojkovic et al., “Towards greener llms: Bringing energy-efficiency to the forefront of llm inference,” 2024
2024
-
[11]
Will we run out of data? Limits of LLM scaling based on human-generated data,
P. Villalobos et al. , “Will we run out of data? Limits of LLM scaling based on human-generated data,” Jun. 2024, arXiv:2211.04325
2024 arXiv
-
[12]
Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks,
Y . Zhou et al., “Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks,” Advances in neural information processing systems , vol. 32, 2019
2019
-
[13]
A unified approach to interpreting model predictions,
S. M. Lundberg et al. , “A unified approach to interpreting model predictions,” in Advances in Neural Information Processing Systems , I. Guyon et al., Eds., vol. 30. Curran Associates, Inc., 2017
2017
-
[14]
A value for n-person games,
L. S. Shapley, “A value for n-person games,” in Contributions to the Theory of Games II , H. W. Kuhn et al. , Eds. Princeton: Princeton University Press, 1953, pp. 307–317
1953
-
[15]
Problems with shapley-value-based explanations as feature importance measures,
I. E. Kumar et al., “Problems with shapley-value-based explanations as feature importance measures,” in Proceedings of the 37th International Conference on Machine Learning. PMLR, pp. 5491–5500, ISSN: 2640- 3498
-
[16]
WWW: A unified framework for explaining what, where and why of neural networks by interpretation of neuron con- cepts,
Y . H. Ahn et al. , “WWW: A unified framework for explaining what, where and why of neural networks by interpretation of neuron con- cepts,” in 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, pp. 10 968–10 977
2024
-
[17]
The many shapley values for model explana- tion,
M. Sundararajan et al. , “The many shapley values for model explana- tion,” in Proceedings of the 37th International Conference on Machine Learning. PMLR, pp. 9269–9278, ISSN: 2640-3498
-
[18]
Interpretability of machine learning-based prediction models in healthcare,
G. Stiglic et al. , “Interpretability of machine learning-based prediction models in healthcare,” WIREs Data Mining and Knowledge Discovery , vol. 10, no. 5, p. e1379, 2020
2020
-
[19]
Navigating the Complexities of AI: The Critical Role of Interpretability and Explainability in Ensuring Transparency and Trust,
E. Barnes et al. , “Navigating the Complexities of AI: The Critical Role of Interpretability and Explainability in Ensuring Transparency and Trust,” Educational Research (IJMCER) , vol. 6, no. 3, pp. 248–256, 2024
2024
-
[20]
Designing and Interpreting Probes with Control Tasks,
J. Hewitt et al., “Designing and Interpreting Probes with Control Tasks,” in Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) , K. Inui et al. , Eds. ...
2019
-
[21]
Ast-probe: Recovering abstract syntax trees from hidden representations of pre-trained language models,
J. A. Hern ´andez L ´opez et al. , “Ast-probe: Recovering abstract syntax trees from hidden representations of pre-trained language models,” in Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, ser. ASE ’22. New York, NY , USA: Associ...
2023
-
[22]
Probing pretrained models of source codes,
S. Troshin et al. , “Probing pretrained models of source codes,” in Proceedings of the Fifth BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP , J. Bastings et al. , Eds. Abu Dhabi, United Arab Emirates (Hybrid): Association for Computational Linguisti...
2022
-
[23]
Probing classifiers: Promises, shortcomings, and ad- vances,
Y . Belinkov, “Probing classifiers: Promises, shortcomings, and ad- vances,” Computational Linguistics , vol. 48, no. 1, pp. 207–219, 04 2022
2022
-
[24]
Which syntactic capabilities are statistically learned by masked language models for code?
A. Velasco et al., “Which syntactic capabilities are statistically learned by masked language models for code?” in Proceedings of the 2024 ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results , ser. ICSE-NIER’24. New York, NY , USA: As...
2024
-
[25]
Towards More Trustworthy and Interpretable LLMs for Code through Syntax-Grounded Explanations,
D. N. Palacio et al. , “Towards More Trustworthy and Interpretable LLMs for Code through Syntax-Grounded Explanations,” Jul. 2024, arXiv:2407.08983
2024
-
[26]
Toward a Theory of Causation for Interpreting Neural Code Models ,
D. Nader Palacio et al., “ Toward a Theory of Causation for Interpreting Neural Code Models ,” IEEE Transactions on Software Engineering , vol. 50, no. 05, pp. 1215–1243, May 2024
2024
-
[27]
CodeBERT: A Pre-Trained Model for Programming and Natural Languages,
Z. Feng et al., “CodeBERT: A Pre-Trained Model for Programming and Natural Languages,” Sep. 2020, arXiv:2002.08155
2020 arXiv
-
[28]
Bert-based github issue report classification,
M. L. Siddiq et al. , “Bert-based github issue report classification,” in Proceedings of the 1st International Workshop on Natural Language- Based Software Engineering , ser. NLBSE ’22. New York, NY , USA: Association for Computing Machinery, 2023, p. 33–36
2023
-
[29]
Bert for sentiment classification in software engineering,
J. Wu et al., “Bert for sentiment classification in software engineering,” in 2021 International Conference on Service Science (ICSS) , 2021, pp. 115–121
2021
-
[30]
Using bert to predict bug-fixing time,
P. Ardimento et al., “Using bert to predict bug-fixing time,” in 2020 ieee conference on evolving and adaptive intelligent systems (eais) . IEEE, 2020, pp. 1–7
2020
-
[31]
Using a nearest-neighbour, bert-based approach for scalable clone detection,
M. Chochlov et al. , “Using a nearest-neighbour, bert-based approach for scalable clone detection,” in 2022 IEEE International Conference on Software Maintenance and Evolution (ICSME) . IEEE, 2022, pp. 582–591
2022
-
[32]
Devign: Effective Vulnerability Identification by Learn- ing Comprehensive Program Semantics via Graph Neural Networks,
Y . Zhou et al., “Devign: Effective Vulnerability Identification by Learn- ing Comprehensive Program Semantics via Graph Neural Networks,” Sep. 2019, arXiv:1909.03496
2019 arXiv
-
[33]
CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation,
S. Lu et al. , “CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation,” Mar. 2021, arXiv:2102.04664
2021 arXiv
-
[34]
CAT-probing: A metric-based approach to interpret how pre-trained models for programming language attend code structure,
N. Chen et al., “CAT-probing: A metric-based approach to interpret how pre-trained models for programming language attend code structure,” in Findings of the Association for Computational Linguistics: EMNLP 2022, Y . Goldberget al., Eds. Association for Computational Linguis- ...
2022
-
[35]
A Critical Study of What Code-LLMs (Do Not) Learn,
A. Anand et al. , “A Critical Study of What Code-LLMs (Do Not) Learn,” in Findings of the Association for Computational Linguistics: ACL 2024, L.-W. Ku et al., Eds. Bangkok, Thailand: Association for Computational Linguistics, Aug. 2024, pp. 15 869–15 889
2024
-
[36]
AutoFocus: Interpreting attention-based neural networks by code perturbation,
N. D. Q. Bui et al. , “AutoFocus: Interpreting attention-based neural networks by code perturbation,” in 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE) . IEEE, pp. 38– 41
2019
-
[37]
Looking into Black Box Code Language Models,
M. U. Haider et al., “Looking into Black Box Code Language Models,” Jul. 2024, arXiv:2407.04868
2024 arXiv
-
[38]
DeepCodeProbe: Towards Understanding What Models Trained on Code Learn,
V . Majdinasab et al. , “DeepCodeProbe: Towards Understanding What Models Trained on Code Learn,” Jul. 2024, arXiv:2407.08890
2024 arXiv
-
[39]
Enhancing SQL Query Generation with Neurosym- bolic Reasoning,
H. Princis et al. , “Enhancing SQL Query Generation with Neurosym- bolic Reasoning,” Aug. 2024, arXiv:2408.13888
2024 arXiv
-
[40]
Ns3: neuro-symbolic semantic code search,
S. Arakelyan et al. , “Ns3: neuro-symbolic semantic code search,” in Proceedings of the 36th International Conference on Neural Information Processing Systems , ser. NIPS ’22. Red Hook, NY , USA: Curran Associates Inc., 2024
2024
-
[41]
CoTran: An LLM-based Code Translator using Reinforce- ment Learning with Feedback from Compiler and Symbolic Execution,
P. Jana et al., “CoTran: An LLM-based Code Translator using Reinforce- ment Learning with Feedback from Compiler and Symbolic Execution,” Oct. 2024, arXiv:2306.06755
2024 arXiv
-
[42]
Neuro-Symbolic Program Synthesis,
E. Parisotto et al. , “Neuro-Symbolic Program Synthesis,” Nov. 2016, arXiv:1611.01855
2016 arXiv
-
[43]
Programming with a differentiable forth interpreter,
M. Bo ˇsnjak et al., “Programming with a differentiable forth interpreter,” in Proceedings of the 34th International Conference on Machine Learn- ing - Volume 70 , ser. ICML’17. JMLR.org, 2017, p. 547–556
2017
-
[44]
Learning continuous semantic representations of symbolic expressions,
M. Allamanis et al. , “Learning continuous semantic representations of symbolic expressions,” in Proceedings of the 34th International Con- ference on Machine Learning - Volume 70 , ser. ICML’17. JMLR.org, 2017, p. 80–88
2017
-
[45]
An interpretable error correction method for enhancing code-to-code translation,
M. Xue et al., “An interpretable error correction method for enhancing code-to-code translation,” in The Twelfth International Conference on Learning Representations, 2024
2024
-
[46]
Semantic Code Repair using Neuro-Symbolic Trans- formation Networks,
J. Devlin et al. , “Semantic Code Repair using Neuro-Symbolic Trans- formation Networks,” Oct. 2017, arXiv:1710.11054
2017 arXiv
-
[47]
Fix Bugs with Transformer through a Neural-Symbolic Edit Grammar,
Y . Hu et al. , “Fix Bugs with Transformer through a Neural-Symbolic Edit Grammar,” Apr. 2022, arXiv:2204.06643
2022 arXiv
Reviewed August 9, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.