James L. McClelland

78 papers A* 5A 1B 14C 1Journal 47Unranked 9
YearRankTypeTitle / Venue / Authors
2025 J jnl
CoRR
Satchel Grant, Noah D. Goodman, James L. McClelland
2025 J jnl
Trans. Mach. Learn. Res.
Satchel Grant, Noah Goodman, James L. McClelland
2025 J jnl
CoRR
Andrew Kyle Lampinen, Martin Engelcke, Yuxuan Li, Arslan Chaudhry, James L. McClelland
2025 J jnl
CoRR
Nasim Borazjanizadeh, James L. McClelland
2025 J jnl
CoRR
Shaunak Bhandarkar, James L. McClelland
2025 J jnl
CoRR
Andrew K. Lampinen, Arslan Chaudhry, Stephanie C. Y. Chan, Cody Wild, Diane Wan, Alex Ku, Jörg Bornschein, Razvan Pascanu, Murray Shanahan, James L. McClelland
2025 J jnl
Top. Cogn. Sci.
James L. McClelland
2024 A* conf
CVPR
Drew A. Hudson, Daniel Zoran, Mateusz Malinowski, Andrew K. Lampinen, Andrew Jaegle, James L. McClelland, Loic Matthey, Felix Hill, Alexander Lerchner
2023 conf
ACL (Findings)
Takateru Yamakoshi, James L. McClelland, Adele Goldberg, Robert D. Hawkins
2023 J jnl
CoRR
Takateru Yamakoshi, James L. McClelland, Adele E. Goldberg, Robert D. Hawkins
2023 J jnl
Trans. Mach. Learn. Res.
Yuxuan Li, James L. McClelland
2023 J jnl
CoRR
Drew A. Hudson, Daniel Zoran, Mateusz Malinowski, Andrew K. Lampinen, Andrew Jaegle, James L. McClelland, Loic Matthey, Felix Hill, Alexander Lerchner
2022 J jnl
PLoS Comput. Biol.
Yuxuan Li, James L. McClelland
2022 conf
EMNLP (Findings)
Andrew K. Lampinen, Ishita Dasgupta, Stephanie C. Y. Chan, Kory W. Mathewson, Michael Henry Tessler, Antonia Creswell, James L. McClelland, Jane Wang, Felix Hill
2022 J jnl
CoRR
Andrew K. Lampinen, Ishita Dasgupta, Stephanie C. Y. Chan, Kory W. Mathewson, Michael Henry Tessler, Antonia Creswell, James L. McClelland, Jane X. Wang, Felix Hill
2022 A* conf
NeurIPS
Stephanie C. Y. Chan, Adam Santoro, Andrew K. Lampinen, Jane X. Wang, Aaditya K. Singh, Pierre H. Richemond, James L. McClelland, Felix Hill
2022 J jnl
CoRR
Ishita Dasgupta, Andrew K. Lampinen, Stephanie C. Y. Chan, Antonia Creswell, Dharshan Kumaran, James L. McClelland, Felix Hill
2022 J jnl
CoRR
Andrew Joohun Nam, Mengye Ren, Chelsea Finn, James L. McClelland
2022 J jnl
CoRR
Andrew Joohun Nam, Mustafa Abdool, Trevor Maxfield, James L. McClelland
2022 J jnl
CoRR
Yuxuan Li, James L. McClelland
2022 A* conf
ICML
Andrew K. Lampinen, Nicholas A. Roy, Ishita Dasgupta, Stephanie C. Y. Chan, Allison C. Tam, James L. McClelland, Chen Yan, Adam Santoro, Neil C. Rabinowitz, Jane X. Wang, Felix Hill
2021 J jnl
CoRR
Andrew K. Lampinen, Nicholas A. Roy, Ishita Dasgupta, Stephanie C. Y. Chan, Allison C. Tam, James L. McClelland, Chen Yan, Adam Santoro, Neil C. Rabinowitz, Jane X. Wang, Felix Hill
2021 J jnl
CoRR
Andrew Joohun Nam, James L. McClelland
2020 C conf
ALIFE
Silvester Sabathiel, James L. McClelland, Trygve Solstad
2020 A* conf
ICLR
Felix Hill, Andrew K. Lampinen, Rosalia Schneider, Stephen Clark, Matthew M. Botvinick, James L. McClelland, Adam Santoro
2020 A* conf
AAAI
Mohammad Rostami, Soheil Kolouri, Praveen K. Pilly, James L. McClelland
2020 J jnl
CoRR
Andrew K. Lampinen, James L. McClelland
2020 J jnl
Proc. Natl. Acad. Sci. USA
Andrew K. Lampinen, James L. McClelland
2019 J jnl
Nat. Mach. Intell.
Alessandro G. Di Nuovo, James L. McClelland
2019 J jnl
CoRR
Andrew K. Lampinen, James L. McClelland
2019 J jnl
CoRR
Felix Hill, Andrew K. Lampinen, Rosalia Schneider, Stephen Clark, Matthew M. Botvinick, James L. McClelland, Adam Santoro
2019 J jnl
CoRR
James L. McClelland, Felix Hill, Maja Rudolph, Jason Baldridge, Hinrich Schütze
2019 J jnl
CoRR
Mohammad Rostami, Soheil Kolouri, James L. McClelland, Praveen K. Pilly
2018 J jnl
CoRR
Andrew M. Saxe, James L. McClelland, Surya Ganguli
2018 J jnl
J. Cogn. Neurosci.
Frank J. Kanayet, Andrew Mattarella-Micke, Peter J. Kohler, Anthony M. Norcia, Bruce D. McCandliss, James L. McClelland
2017 B conf
CogSci
Andrew K. Lampinen, Shaw Hsu, James L. McClelland
2017 B conf
CogSci
Alex Kuefler, Mykel J. Kochenderfer, James L. McClelland
2017 B conf
CogSci
Milena Rabovsky, Steven Stenberg Hansen, James L. McClelland
2017 J jnl
CoRR
Andrew K. Lampinen, James L. McClelland
2016 B conf
CogSci
Arianna Yuan, Te-Lin Wu, James L. McClelland
2016 B conf
CogSci
Milena Rabovsky, Steven Stenberg Hansen, James L. McClelland
2016 B conf
CogSci
James L. McClelland, Steven Stenberg Hansen, Andrew M. Saxe
2015 B conf
CogSci
Martha W. Alibali, Chuck Kalish, Timothy T. Rogers, Christine M. Massey, Philip J. Kellman, Vladimir M. Sloutsky, James L. McClelland, Kevin W. Mickey
2014 B conf
CogSci
Kevin W. Mickey, James L. McClelland
2014 conf
ICLR
Andrew M. Saxe, James L. McClelland, Surya Ganguli
2014 J jnl
Cogn. Sci.
James L. McClelland, Daniel Mirman, Donald J. Bolger, Pranav Khaitan
2014 J jnl
Cogn. Sci.
Timothy T. Rogers, James L. McClelland
2014 B conf
CogSci
Steven Stenberg Hansen, Cameron R. L. McKenzie, James L. McClelland
2013 J jnl
J. Cogn. Neurosci.
Amy H. Criss, Mark E. Wheeler, James L. McClelland
2013 B conf
CogSci
Cameron R. L. McKenzie, James L. McClelland
2013 B conf
CogSci
Andrew M. Saxe, James L. McClelland, Surya Ganguli
2013 B conf
CogSci
Will Y. Zou, James L. McClelland
2013 B conf
CogSci
Kevin W. Mickey, James L. McClelland
2013 J jnl
J. Cogn. Neurosci.
Anna C. Schapiro, James L. McClelland, Stephen R. Welbourne, Timothy T. Rogers, Matthew A. Lambon Ralph
2011 J jnl
Connect. Sci.
Cynthia M. Henderson, James L. McClelland
2011 B conf
CogSci
Brenden M. Lake, James L. McClelland
2011 J jnl
J. Phonetics
Erin M. Ingvalson, James L. McClelland, Lori L. Holt
2010 J jnl
Top. Cogn. Sci.
James L. McClelland
2009 J jnl
Cogn. Comput.
James L. McClelland
2009 J jnl
IEEE Trans. Auton. Ment. Dev.
Brenden M. Lake, Gautam K. Vallabha, James L. McClelland
2009 J jnl
Top. Cogn. Sci.
James L. McClelland
2008 J jnl
Cogn. Sci.
Daniel Mirman, James L. McClelland, Lori L. Holt, James S. Magnuson
2007 J jnl
IEEE Trans. Evol. Comput.
James L. McClelland, Kim Plunkett, Juyang Weng
2006 J jnl
J. Cogn. Neurosci.
Elizabeth Tricomi, Mauricio R. Delgado, Bruce D. McCandliss, James L. McClelland, Julie A. Fiez
2005 J jnl
J. Cogn. Neurosci.
Andrea Mechelli, Jennifer T. Crinion, Steven Long, Karl J. Friston, Matthew A. Lambon Ralph, Karalyn Patterson, James L. McClelland, Cathy J. Price
2000 A conf
INTERSPEECH
Karalyn Patterson, Matthew A. Lambon Ralph, Helen Bird, John R. Hodges, James L. McClelland
1999 conf
NIPS
Javier R. Movellan, James L. McClelland
1997 conf
NIPS
Randall C. O'Reilly, Kenneth A. Norman, James L. McClelland
1993 J jnl
Cogn. Sci.
Javier R. Movellan, James L. McClelland
1991 J jnl
Mach. Learn.
David Servan-Schreiber, Axel Cleeremans, James L. McClelland
1990 ch.
The Philosophy of Artificial Intelligence
Geoffrey E. Hinton, James L. McClelland, David E. Rumelhart
1990 J jnl
Artif. Intell.
Mark F. St. John, James L. McClelland
1989 conf
IWPT
James L. McClelland
1989 J jnl
Neural Comput.
Axel Cleeremans, David Servan-Schreiber, James L. McClelland
1988 conf
NIPS
David Servan-Schreiber, Axel Cleeremans, James L. McClelland
1987 conf
NIPS
Geoffrey E. Hinton, James L. McClelland
1987 conf
TINLAP
James L. McClelland
1985 J jnl
Cogn. Sci.
James L. McClelland
redb/extractors/js_extractors/js_xray.py
← Index redb/extractors/js_extractors/js_xray.py python
"""Subprocess wrapper for the bundled js-x-ray Node bridge.

Mirrors `js_deobfuscator.py`: shell out to a Node script with a per-sample
timeout, kill the process group on hang, demote `FileNotFoundError` to debug
(missing tool is routine — the host either has Node + the bundled package
installed or it doesn't), and return a structured result on success.

The bridge lives at `redb/extractors/js_extractors/scripts/js-xray-runner.js`.
Operators install the JS dependency once with `npm install` in that directory
(or override the path with `JS_XRAY_RUNNER_PATH`).

Configuration (env vars):
    JS_XRAY_RUNNER_PATH   Path to the Node bridge script (default: bundled).
    JS_XRAY_TIMEOUT       Seconds before the subprocess is killed. Default: 30.

`run(source, log)` returns `XRayResult(obfuscator, warnings)` on a successful
analysis, or `XRayResult(None, [])` for any non-success path (binary missing,
timeout, parse failure, etc.). The two unsuccessful states are
indistinguishable to the caller on purpose — they all collapse to "no
js-x-ray verdict, fall back to heuristic".
"""

from __future__ import annotations

import json
import os
import signal
import subprocess
import tempfile
from dataclasses import dataclass, field
from typing import List, Optional

# Bundled bridge: redb/extractors/js_extractors/scripts/js-xray-runner.js
_DEFAULT_RUNNER = os.path.join(
    os.path.dirname(__file__), "scripts", "js-xray-runner.js"
)
_DEFAULT_NODE = "node"
_DEFAULT_TIMEOUT_SECS = 30


@dataclass
class XRayResult:
    """Parsed js-x-ray output. `obfuscator` is the recognised family name
    (e.g. "jsfuck", "obfuscator.io") or None when js-x-ray did not flag the
    code. `warnings` carries every {kind, value} pair the analyser produced;
    the heuristic uses it as a corroborating signal. `avg_identifier_length`
    is js-x-ray's own AST-derived figure — used as a fallback for the
    heuristic's `avg_identifier_length<2` strong signal when pyjsparser
    can't parse the source (anything ES2015+ trips it)."""

    obfuscator: Optional[str] = None
    warnings: List[dict] = field(default_factory=list)
    avg_identifier_length: Optional[float] = None

    @property
    def flagged(self) -> bool:
        return self.obfuscator is not None


def _empty() -> XRayResult:
    return XRayResult(obfuscator=None, warnings=[])


def run(source: str, log) -> XRayResult:
    if not source:
        return _empty()

    runner = os.getenv("JS_XRAY_RUNNER_PATH", _DEFAULT_RUNNER)
    node_bin = os.getenv("JS_XRAY_NODE_BIN", _DEFAULT_NODE)
    timeout = int(os.getenv("JS_XRAY_TIMEOUT", str(_DEFAULT_TIMEOUT_SECS)))

    if not os.path.exists(runner):
        log.debug(f"js-x-ray runner not found at {runner}")
        return _empty()

    # Skip the subprocess entirely when the JS dependency isn't installed.
    # Without this, every call to a host that has `node` but never ran
    # `npm install` next to the runner would still fork node, get a require
    # error, and exit nonzero — wasted ~50–200ms per JS sample (and per test).
    runner_dir = os.path.dirname(runner)
    if not os.path.isdir(os.path.join(runner_dir, "node_modules", "@nodesecure", "js-x-ray")):
        log.debug(f"@nodesecure/js-x-ray not installed in {runner_dir}")
        return _empty()

    tmp_path = None
    try:
        with tempfile.NamedTemporaryFile(
            suffix=".js", mode="w", delete=False, encoding="utf-8"
        ) as tmp:
            tmp.write(source)
            tmp_path = tmp.name

        try:
            process = subprocess.Popen(
                [node_bin, runner, tmp_path],
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE,
                preexec_fn=os.setsid,
            )
            try:
                stdout, stderr = process.communicate(timeout=timeout)
            except subprocess.TimeoutExpired:
                # Kill the whole process group so any node helpers die too.
                try:
                    os.killpg(os.getpgid(process.pid), signal.SIGTERM)
                    process.wait(timeout=5)
                except Exception:
                    try:
                        os.killpg(os.getpgid(process.pid), signal.SIGKILL)
                    except Exception:
                        pass
                log.warning(f"js-x-ray timed out after {timeout}s")
                return _empty()

            if process.returncode != 0:
                err = stderr.decode("utf-8", errors="replace").strip()
                log.debug(f"js-x-ray exited {process.returncode}: {err}")
                return _empty()

            text = stdout.decode("utf-8", errors="replace").strip()
            if not text:
                return _empty()

            try:
                payload = json.loads(text)
            except json.JSONDecodeError as e:
                log.warning(f"js-x-ray emitted non-JSON output: {e}")
                return _empty()

            obfuscator = payload.get("obfuscator")
            warnings = payload.get("warnings") or []
            if not isinstance(warnings, list):
                warnings = []

            ids_avg = payload.get("idsLengthAvg")
            if not isinstance(ids_avg, (int, float)):
                ids_avg = None

            return XRayResult(
                obfuscator=obfuscator,
                warnings=warnings,
                avg_identifier_length=ids_avg,
            )
        finally:
            if tmp_path:
                try:
                    os.unlink(tmp_path)
                except Exception:
                    pass
    except FileNotFoundError:
        log.debug(f"node binary not found at {node_bin}")
        return _empty()
    except Exception as e:
        log.error(f"js-x-ray subprocess error: {e}")
        return _empty()