ENSCO Rail TGMS AI · Plasser & Theurer RAPLAS AI · Herzog NEXGEN AI · FRA 49 CFR Part 213 Track Safety Standards · ERA TSI INF EN 13848-1 · Network Rail NR/SP/TRK/0021 · gauge deviation render AI · rail surface defect B-scan AI
Prompt injection in rail track geometry measurement car AI
The United States Class I railroad network operates approximately 140,000 route miles of mainline track carrying 1.7 trillion tonne-kilometres of freight annually, alongside Amtrak intercity passenger operations and approximately 28 commuter rail systems serving major metropolitan areas. Track geometry — the spatial relationship between the two running rails in gauge, cross-level, surface (vertical profile), and alignment (horizontal profile) — is the foundational physical parameter governing safe train operation: a rail gauge widening beyond the Federal Railroad Administration (FRA) Class 4 exception limit of 57.5 mm (2.263 inches above the nominal 56.5 inch US standard gauge), an uncorrected surface deviation above 1.0 inch over a 62-foot chord, or a crosslevel deviation above 1.5 inches can cause wheel climb derailment, wheel flange damage, or overturning of high-centre-of-gravity rail vehicles at speeds authorised for the track class. The FRA Track Safety Standards (49 CFR Part 213) establish geometry exception limits for Track Classes 1 through 6 (from 10 mph maximum authorised speed for Class 1 to 110 mph for Class 6 conventional rail and 150 mph for Class 8 high-speed operations) and require that track owners inspect track geometry at frequencies that scale with traffic density and passenger service designation — Class 4 main line carrying passenger service must be geometry-inspected at least once per calendar month. Track geometry measurement cars (TGMCs) — instrumented railroad vehicles or purpose-built measurement platforms carrying inertial measurement units (IMUs), laser profilometers, optical camera arrays, and acoustic or electromagnetic ultrasonic rail flaw detection systems — perform these inspections and generate geometry exception reports that drive maintenance work orders and speed restrictions (slow orders). AI systems now process the rendered outputs of these measurement systems — gauge deviation depth-colour charts, rail surface defect ultrasonic B-scan images, crosslevel deviation waveforms, and thermal expansion joint gap camera images — to classify geometry condition at scale, prioritise maintenance queues, and, in the most current TGMC deployments, issue exception reports directly without human review of individual exception signatures. ENSCO Rail Track Geometry Measurement System (TGMS) AI, Plasser & Theurer EM250 RAPLAS AI, Herzog Services NEXGEN AI, Harsco Rail NEXSYS AI, Loram Rail AI, Network Rail GEISMAR IRIS320 AI, and Deutsche Bahn Gleismessfahrzeug AI collectively cover the geometry inspection programmes of the major North American Class I railroads (BNSF, Union Pacific, CSX, Norfolk Southern, CN, CP), Amtrak, and national rail infrastructure managers in the UK and EU. The consequence calibration point for track geometry inspection AI failure is the Amtrak Cascades 501 derailment of 18 December 2017 (NTSB RAB-17-02): three fatalities and 57 injuries on the inaugural revenue run of Amtrak’s Point Defiance Bypass in Washington state, where a track geometry car had recently inspected the alignment and found it compliant, yet the service entered the DuPont curve at 78 mph — more than 50 mph above the posted speed restriction — partly because speed authority information was not accurately conveyed in the track authority system. The 2021 Amtrak Joplin derailment (4 fatalities) involved a broken rail fragment, the detection of which depends on ultrasonic rail inspection AI. A suppressed geometry exception — where adversarial pixel injection causes the TGMC AI to classify a Class 4 exception signature as a Class 3 or acceptable condition — means no maintenance order is issued, no slow order is placed, and passenger trains continue to operate at the full authorised speed over a defective track segment until the geometry defect progresses to the point of visible mechanical failure or derailment.
TL;DR
Rail track geometry measurement car AI — gauge deviation render AI, rail surface defect B-scan AI, crosslevel deviation waveform AI, and thermal joint gap AI — processes rendered measurement outputs at classification boundaries where adversarial pixel injection of ±8–10 DN can suppress FRA 49 CFR Part 213 Class 4 geometry exceptions for gauge widening, transverse rail defects, crosslevel deviations above the 1.5-inch limit, and impending thermal buckle conditions; a suppressed exception means no maintenance order, no slow order, and passenger trains at full line speed over defective track, with the Amtrak Cascades 501 derailment (3 fatalities, 2017) and Amtrak Joplin derailment (4 fatalities, 2021) as the consequence envelope. FRA 49 CFR Part 213 does not require adversarial robustness testing for TGMC AI exception classification systems. Glyphward threshold 35 for rail track geometry AI contexts. Free tier — 10 scans/day, no card required.
Four adversarial injection surfaces in rail track geometry measurement car AI
1. Rail gauge deviation render AI (ENSCO Rail TGMS AI, Plasser & Theurer RAPLAS AI)
Track gauge — the perpendicular distance between the inner faces of the two running rails, measured 5/8 inch below the top of rail — is measured continuously along the track by the TGMC’s contact or laser profilometer system and rendered as a deviation chart: a colour-depth map or time-series waveform where the vertical axis represents the signed deviation from nominal gauge (56.5 inches for US standard gauge; 1,435 mm for EU standard gauge), and horizontal position represents track milepost or chainage. ENSCO Rail’s TGMS AI and Plasser & Theurer’s RAPLAS (Rail Profile and Lateral Alignment System) AI process these rendered deviation charts using a convolutional classification model to identify and classify geometry exceptions under 49 CFR Part 213. For Class 4 track (authorised speed up to 80 mph for freight, 110 mph for passenger), the gauge exception thresholds are: narrow gauge below 56.0 inches (−0.5 inch deviation) and wide gauge above 57.5 inches (+1.0 inch deviation above nominal). When the AI identifies a gauge deviation spike exceeding the Class 4 wide gauge limit of 57.5 inches, it classifies that track segment as a Class 4 exception, and the TGMC data system generates a maintenance work order that specifies the milepost location, exception magnitude, and required corrective action — typically rail spike replacement, tie plate realignment, or tie replacement to restore gauge restraint. In some deployments, TGMC AI exception reports are directly transmitted to the track maintenance management system (MMS) without intermediate human review, with a maintenance crew dispatch window of 24–48 hours depending on exception severity. The EU ERA Technical Specification for Interoperability (TSI INF) EN 13848-1 establishes equivalent gauge exception thresholds for EU rail infrastructure and requires geometry measurement system calibration against certified reference tracks.
The adversarial perturbation for rail gauge deviation render AI is a ±8 DN compression applied to the positive deviation spike region of the rendered gauge deviation chart. In a standard rendered gauge deviation chart (8-bit greyscale or false-colour depth map), a Class 4 gauge widening exception of 57.5 mm above nominal produces a distinct positive spike in the deviation trace, rendered as a bright or red-coded pixel region (approximately 200–230 DN in the exception-coloured channel) against the normal operating range encoded at 100–160 DN. A ±8 DN compression of the spike region reduces its apparent magnitude toward the high end of the normal operating range, causing the ENSCO TGMS or Plasser RAPLAS classification model — calibrated on unperturbed site measurement data — to output a No Exception or Class 3 Acceptable classification instead of a Class 4 Exception. No maintenance work order is generated. The track segment continues to receive train traffic at the Class 4 authorised speed. Gauge widening defects — typically caused by tie plate cut spikes, wood tie decay, or concrete tie fastener clip fracture — are progressive: an exception that starts at the 57.5 mm limit can reach 60–65 mm within days to weeks under heavy axle load traffic, at which point wheel flange climb becomes mechanically possible at Class 4 operating speeds. A derailment on a gauge exception at 80 mph freight speed or 110 mph passenger speed on an alignment with adjacent occupied embankment (as at Dupont, WA) produces a consequence envelope directly comparable to the Amtrak Cascades 501 event.
2. Rail surface defect image AI (Herzog NEXGEN AI, Sperry Rail AI, Vortok International AI)
Rail surface and internal rail defect detection is a distinct measurement function from track geometry, performed by ultrasonic flaw detection systems mounted on the TGMC or on dedicated rail flaw detection cars. Ultrasonic transducers (typically operating at 2.25–5 MHz) transmit acoustic pulses into the rail head, web, and base and receive reflected echoes from internal reflectors. The reflected echo data is rendered as a B-scan image — a two-dimensional cross-sectional view of the rail showing echo amplitude (vertical axis) vs. depth in the rail (horizontal axis) — or as a C-scan (top-down amplitude map). Herzog Services NEXGEN AI, Sperry Rail AI (LORAM subsidiary), and Vortok International AI process these rendered B-scan and C-scan images using classification networks trained to distinguish rail defect signatures — transverse detail fractures (TDFs), vertical split heads (VSHs), compound fissures, shelling and spalling, and base cracks — from normal rail microstructure echoes (grain boundary scattering, surface coupling variation). Transverse detail fractures are the most safety-critical rail defect type: they propagate perpendicular to the rail running direction under rolling contact fatigue loading and can grow to the point of complete rail fracture (broken rail) within days to weeks of reaching a detectable size, depending on traffic loading and thermal stress. FRA 49 CFR Part 213.113(b) requires that a transverse fissure, compound fissure, or detail fracture detected in rail must be given immediate attention — defined as removal from service or a speed restriction to 10 mph until the defective rail can be replaced. Sperry Rail Service estimates that broken rail accounts for approximately 14% of all train derailments in the United States, making it the second most common derailment cause after human factors. Network Rail NR/SP/TRK/0021 contains equivalent requirements for UK rail infrastructure ultrasonic inspection AI.
The adversarial perturbation for rail surface defect image AI is a ±10 DN amplitude suppression applied to the defect echo region of the rendered B-scan image. In a B-scan of a rail with a transverse detail fracture of significant size (area-equivalent diameter above approximately 6 mm, approaching reportable size under AAR and FRA guidelines), the defect echo presents as a high-amplitude reflection zone at the characteristic depth of the defect in the rail head (typically 10–25 mm depth, depending on fracture initiation point in the rail head). This echo is rendered as a bright or red-coded region in the B-scan with pixel values in the 210–240 DN range (8-bit normalisation), above the defect-detection threshold set for the NEXGEN or Sperry classifier at approximately 190–200 DN. A ±10 DN amplitude suppression of the defect echo region reduces its rendered amplitude to 200–230 DN, crossing the classifier’s detection threshold from above to below, and causing the AI to output No Defect Detected or Acceptable Scatter rather than TDF Detected. No immediate attention notification is generated. The rail continues to carry traffic at full operating speed. The 2016 Hoboken terminal collision (1 fatality) and the 2021 Amtrak Joplin derailment (4 fatalities, NTSB RAR-22-03, broken rail fragment involvement) are directly within the consequence envelope of a suppressed TDF detection: both involved rail structural failures on inspected mainline track where ultrasonic flaw detection was part of the maintenance programme.
3. Cross-level and superelevation deviation render AI (ENSCO TGMS AI, Network Rail GEISMAR IRIS320 AI)
Track cross-level — the difference in elevation between the two running rails, measured in inches or millimetres — determines the lateral load distribution between the high and low rail wheels of a rail vehicle. On tangent (straight) track, nominal cross-level is zero; on curved track, one rail is intentionally elevated (superelevated) to counteract centrifugal force at the design speed. Cross-level deviation — the departure from the intended cross-level, whether on tangent or curve — causes a rocking and rolling motion that, at sufficient magnitude and wavelength, excites the natural lateral roll resonance of the rail vehicle suspension, leading to wheel unloading on the high-level rail and wheel flange contact on the low-level rail. FRA 49 CFR Part 213.63 specifies cross-level exception limits: for Class 4 track, the instantaneous cross-level deviation limit is 1.5 inches on tangent track. A deviation above 1.5 inches on Class 4 track constitutes an exception requiring a maintenance order; a deviation above 3 inches on any track class constitutes an immediate action requirement (slow order to 10 mph or track removal from service). ENSCO TGMS AI and Network Rail GEISMAR IRIS320 AI process the rendered cross-level deviation waveform — a time-series trace of cross-level measurement vs. chainage, rendered as a line-on-background image or a colour-coded deviation band chart — to classify exception signatures by magnitude and wavelength. The EU ERA TSI INF standard EN 13848-1 defines equivalent cross-level quality parameters (QN1, QN2, QN3 quality levels for different wavelength bands) and requires geometry measurement system type-approval against certified measurement standards, which GEISMAR IRIS320 holds. The cross-level AI classification output drives the Network Rail or FRA-reportable geometry exception database, from which maintenance scheduling and speed restriction decisions are made by track asset managers.
The adversarial perturbation for cross-level deviation render AI targets the amplitude peak of the crosslevel deviation waveform at the point of the Class 4 exception. In a rendered crosslevel deviation waveform chart (8-bit colour, standard TGMC report format), a 1.5-inch crosslevel exception produces a deviation peak rendered as a distinct coloured spike — typically orange or red coded — above the normal operating band encoded in green or blue at 100–140 DN. The exception peak renders at approximately 195–220 DN in the exception-colour channel. A perturbation that suppresses the exception peak amplitude by ±8 DN reduces the rendered peak to 187–212 DN, dropping it below the ENSCO or GEISMAR classifier’s exception detection threshold for the Class 4 crosslevel limit. The AI classifies the segment as Class 4 Acceptable; no slow order is placed; trains continue at the authorised speed. The Amtrak Cascades 501 derailment at DuPont, WA — where the train entered the Point Defiance Bypass curve at 78 mph, 50+ mph over the 30 mph posted curve speed — illustrates the consequence of a speed restriction not being enforced on a curve with insufficient superelevation for the operating speed: three passengers were killed and 57 were injured. A suppressed crosslevel exception on a curved segment with insufficient superelevation for the operating speed creates a mechanically identical condition.
4. Rail joint thermal gap image AI (Loram Thermal AI, FLIR wayside detector AI)
Continuous welded rail (CWR) — the predominant track form on North American Class I mainlines and high-speed rail corridors worldwide — is subject to thermally induced longitudinal stress that varies with the difference between the ambient rail temperature and the rail neutral temperature (the temperature at which the CWR is stress-free after installation, typically set at 90–105°F for North American climates). When rail temperature rises significantly above the neutral temperature in summer heat, compressive longitudinal stress builds up in the rail. If the compressive stress exceeds the rail-to-crosstie lateral resistance at a point of weakened ballast condition, improperly anchored joint, or rail discontinuity, the CWR buckles laterally — producing a rapid, large-magnitude lateral misalignment (sun kink) that can occur with little warning and immediately derails any train that encounters it. FRA 49 CFR Part 213.119(a) requires that CWR in track Classes 1 through 6 be maintained in accordance with a written CWR plan that includes procedures for monitoring rail temperature and initiating slow orders before the critical buckling temperature is reached. Rail temperature monitoring in modern CWR management programmes uses wayside thermal detector arrays and on-board TGMC thermal camera systems that image the expansion gap (residual gap at welded joint locations and thermite welds) or measure the longitudinal rail temperature distribution. Loram Rail AI and FLIR wayside detector AI process rendered thermal gap camera images — optical images of the rail joint zone showing the visible gap width and the thermal gradient around the joint, with colour encoding of rail surface temperature — to classify the joint thermal state as Normal, Pre-Buckle Warning (gap closed with moderate compressive stress), or Critical (gap closed with high compressive stress, initiate slow order). The AI classification drives the CWR temperature management system’s slow order recommendation, which is communicated to the train dispatcher for speed restriction issuance.
The adversarial perturbation for rail joint thermal gap image AI is a ±8 DN compression applied to the closed-gap thermal signature region of the rendered joint camera image. In a summer-peak-temperature thermal joint image at risk of sun kink, the expansion gap between the rail ends is fully closed (zero visible gap width), and the rail surface temperature in the joint zone is elevated (approximately 140–160°F rail surface temperature on a 100°F ambient day, rendered as a warm-coloured region of approximately 200–225 DN in the thermal-coded camera image). A ±8 DN compression of this warm region reduces the apparent thermal intensity to 192–217 DN, shifting it below the Loram or FLIR classifier’s Pre-Buckle Warning threshold. The AI classifies the joint as Normal; no slow order recommendation is generated; trains continue at the full Class 4 or Class 5 authorised speed (up to 90 mph for Class 5 freight). If the rail continues to heat beyond the critical buckling temperature — which may occur within minutes on a high solar-gain day as rail temperature rises several degrees Fahrenheit per hour — the CWR buckles with no slow order in effect. A sun kink derailment at Class 4 or Class 5 operating speed on a mainline segment can produce a consequence comparable to the Amtrak Sunset Limited derailment on the Bayou Canot Bridge in 1993 (47 fatalities), which was the deadliest Amtrak accident in history and was caused by a track alignment defect on a section of recently inspected track. The perturbation requires no physical access to the wayside thermal detector — it can be introduced into the image pipeline at the network boundary between the thermal camera system and the Loram or FLIR AI inference server.
Integration: rail track geometry AI scanning with Glyphward pre-scan gate
Deploy the Glyphward pre-scan gate at every image classification boundary in the TGMC data processing pipeline — before the rendered gauge deviation chart is fed to the ENSCO or Plasser classifier, before the ultrasonic B-scan rail defect image is processed by the Herzog or Sperry AI, before the crosslevel deviation waveform render is consumed by the ENSCO or GEISMAR exception classifier, and before the thermal joint gap camera image is passed to the Loram or FLIR thermal AI. The threshold of 35 is appropriate for rail track geometry AI contexts because exception flag outputs from these systems directly determine whether maintenance orders are issued and whether trains operate at full speed or under a slow order on the inspected track, and there is no complementary inspection process between scheduled TGMC runs — a missed exception in a monthly inspection run remains undetected for the full inter-inspection interval. Regulatory references for the JSONL audit log include FRA 49 CFR Part 213, FRA Safety Appliance Standards 49 CFR Part 231, and ERA TSI INF EN 13848-1.
import asyncio, base64, hashlib, json
from datetime import datetime, timezone
from enum import Enum
from pathlib import Path
import httpx
GLYPHWARD_API_KEY = "YOUR_GLYPHWARD_API_KEY"
GLYPHWARD_SCAN_URL = "https://glyphward.com/v1/scan"
# Rail track geometry measurement car AI contexts: threshold 35
# FRA 49 CFR Part 213, FRA 49 CFR Part 231, ERA TSI INF EN 13848-1, NR/SP/TRK/0021
TRACK_GEOMETRY_AI_THRESHOLD = 35
class TrackGeometryAIContext(Enum):
GAUGE_DEVIATION_RENDER = "gauge_deviation_render"
RAIL_SURFACE_DEFECT_BSCAN = "rail_surface_defect_bscan"
CROSSLEVEL_DEVIATION_RENDER = "crosslevel_deviation_render"
THERMAL_JOINT_GAP_IMAGE = "thermal_joint_gap_image"
class AdversarialTrackGeometryImageError(Exception):
"""Raised when Glyphward detects adversarial perturbation in a track geometry AI image above threshold."""
def __init__(self, scan_id: str, score: int, context: TrackGeometryAIContext, subdivision_milepost: str, flagged_region: dict | None = None) -> None:
self.scan_id = scan_id
self.score = score
self.context = context
self.subdivision_milepost = subdivision_milepost
self.flagged_region = flagged_region
super().__init__(
f"Adversarial track geometry image blocked: scan_id={scan_id} score={score} "
f"threshold={TRACK_GEOMETRY_AI_THRESHOLD} context={context.value} location={subdivision_milepost}"
)
async def scan_track_geometry_image(image_bytes: bytes, context: TrackGeometryAIContext, subdivision_milepost: str, client: httpx.AsyncClient) -> dict:
"""Scan a track geometry measurement car AI image for adversarial perturbation before feeding to the exception classifier.
Args:
image_bytes: Raw image bytes (PNG/JPEG/TIFF rendered from TGMC data system or thermal camera).
context: The TrackGeometryAIContext enum value identifying the TGMC measurement surface.
subdivision_milepost: Track location identifier (e.g. 'BNSF-TRANSCON-MP-285.4' or 'NR-ECML-CH-142.3').
client: Shared httpx.AsyncClient.
Returns:
Glyphward scan result dict with scan_id, score, flagged_region.
Raises:
AdversarialTrackGeometryImageError: If score >= TRACK_GEOMETRY_AI_THRESHOLD.
"""
image_hash = hashlib.sha256(image_bytes).hexdigest()
payload = {
"image": base64.b64encode(image_bytes).decode(),
"source": f"track_geometry:{context.value}:{subdivision_milepost}",
"metadata": {
"subdivision_milepost": subdivision_milepost,
"image_sha256": image_hash,
"context": context.value
}
}
resp = await client.post(
GLYPHWARD_SCAN_URL,
headers={"Authorization": f"Bearer {GLYPHWARD_API_KEY}", "Content-Type": "application/json"},
json=payload,
timeout=30.0
)
resp.raise_for_status()
result = resp.json()
if result["score"] >= TRACK_GEOMETRY_AI_THRESHOLD:
raise AdversarialTrackGeometryImageError(
scan_id=result["scan_id"],
score=result["score"],
context=context,
subdivision_milepost=subdivision_milepost,
flagged_region=result.get("flagged_region")
)
return result
async def _write_track_geometry_scan_audit(*, image_hash: str, scan_id: str, score: int, context: TrackGeometryAIContext, subdivision_milepost: str, flagged: bool) -> None:
record = {
"ts": datetime.now(timezone.utc).isoformat(),
"scan_id": scan_id,
"image_sha256": image_hash,
"context": context.value,
"score": score,
"threshold": TRACK_GEOMETRY_AI_THRESHOLD,
"flagged": flagged,
"subdivision_milepost": subdivision_milepost,
"regulatory_refs": ["FRA 49 CFR Part 213", "FRA 49 CFR Part 231", "ERA TSI INF EN 13848-1"]
}
audit_path = Path("/var/log/glyphward/track_geometry_ai_scan_audit.jsonl")
audit_path.parent.mkdir(parents=True, exist_ok=True)
with audit_path.open("a") as fh:
fh.write(json.dumps(record) + "\n")
Deploy the scan gate at each AI boundary in the TGMC post-processing pipeline: for gauge deviation render AI, scan the rendered deviation chart immediately after the TGMC data system exports the chart image and before the ENSCO or Plasser classifier processes it; for rail surface defect B-scan AI, scan the rendered B-scan or C-scan image before the Herzog or Sperry AI; for crosslevel deviation render AI, scan the rendered deviation waveform before the ENSCO or GEISMAR classifier; for thermal joint gap image AI, scan the thermal camera frame before the Loram or FLIR AI. On AdversarialTrackGeometryImageError, fail closed: do not allow the exception classifier to generate a No-Exception output for this image, hold the track segment in a Pending Review status that prevents maintenance clearance, escalate immediately to the Track Geometry Engineer for manual review of the raw measurement data, and if manual review is not possible within the FRA-required maintenance window, issue a precautionary slow order to 10 mph on the affected segment. Write every scan result — clean and flagged — to the JSONL audit log for FRA Track Safety Standards compliance recordkeeping. Get early access
Related questions
Does FRA 49 CFR Part 213 require adversarial robustness testing for AI systems used in track geometry exception classification?
FRA 49 CFR Part 213 does not explicitly address artificial intelligence, machine learning, or adversarial robustness. The Track Safety Standards were most recently substantially revised in 2010 (75 FR 1223) and the 2024 FRA Final Rule on automated track geometry measurement systems (ATGMS) addressed the use of automated geometry measurement systems for inspection compliance purposes but did not introduce adversarial robustness requirements for the AI classification layer. The 2024 Final Rule (FRA Docket FRA-2019-0033) permits the use of ATGMS data for regulatory compliance inspections — meaning the AI exception classification output can substitute for a human geometry inspector’s determination — but specifies accuracy and calibration requirements for the measurement hardware (inertial measurement units, profilometers) without addressing the robustness of the AI inference layer that processes the rendered measurement outputs. The relevant FRA requirement is 49 CFR Part 213.7(c), which requires that testing and inspection equipment used to assess compliance with Part 213 must be calibrated and maintained in accordance with the manufacturer’s specifications and must produce results accurate to within specified tolerances. The FRA ATGMS Final Rule extends this calibration requirement to the automated data analysis system, but “calibration” in this context means accuracy against known physical geometry standards — not robustness against adversarially crafted input images. A track geometry AI that correctly classifies unperturbed geometry measurement images within FRA calibration tolerances would pass FRA regulatory compliance requirements while remaining fully vulnerable to the ±8 DN perturbation attack described on this page. There is no published FRA guidance document, Railroad Safety Advisory Committee (RSAC) recommendation, or AASHTO/AREMA engineering standard that specifies adversarial robustness requirements for TGMC AI systems.
What is the specific connection between the 2017 Amtrak Cascades 501 derailment and the consequence risk from rail track geometry AI prompt injection?
The Amtrak Cascades 501 derailment of 18 December 2017 (NTSB RAB-17-02, preliminary report published 21 December 2017; final accident report published 2019) involved three fatalities and 57 injuries when Amtrak train 501 entered the 30 mph speed-restricted curve at MP 19.8 on the Point Defiance Bypass at 78 mph on its inaugural revenue run. The NTSB determined that a positive train control (PTC) system that would have prevented the overspeed had not been activated for revenue service on that segment, and that the crew did not receive adequate briefing on the speed restriction. The track geometry dimension of the event is this: the Point Defiance Bypass had been inspected by a track geometry car and found compliant with FRA Part 213 geometry requirements for the track class. The curve at MP 19.8 had the specified superelevation for the 30 mph design speed. The issue was not a geometry defect — it was a speed authority failure. However, the Cascades 501 event is the correct consequence calibration point for track geometry AI prompt injection because it demonstrates the consequence magnitude when a train operates at a speed significantly above what the track geometry is designed to accommodate: three fatalities, 57 injuries, and derailment of all six trailing cars at a location with a slope embankment adjacent to Interstate 5. If the geometry AI had instead suppressed a genuine crosslevel or superelevation deficiency on the same curve — a deficiency that existed because the new bypass track’s superelevation was not calibrated for the speed that the crew actually operated at — the consequence would be structurally identical. The Cascades 501 event is also directly relevant because it occurred on the inaugural run of new track that had been recently inspected by track geometry measurement systems, illustrating that inspection system outputs are directly linked to operational speed authority decisions. A suppressed geometry exception in a track geometry AI has the same operational consequence as no inspection having been performed: the train operates at full line speed over a defective segment.
What is the technical distinction between track geometry measurement AI and railway signalling AI as adversarial injection surfaces, and why does this page focus specifically on the measurement car pipeline?
Rail track geometry measurement car AI and railway signalling AI are distinct adversarial injection surfaces with different attack vectors, different consequence mechanisms, and different regulatory frameworks. Railway signalling AI — including positive train control (PTC) AI, European Train Control System (ETCS) movement authority AI, and interlocking logic AI — processes track occupancy data, signal state information, and train movement authorities to generate speed commands and movement authority limits transmitted to the train. The adversarial surface for signalling AI is the data integrity of the communications channel between the wayside equipment and the onboard AI: injecting false occupancy or signal state data. Track geometry measurement car AI, by contrast, processes rendered visual or acoustic measurement images — rendered outputs of physical measurement instruments — to classify track condition and generate maintenance orders and speed restriction recommendations. The adversarial surface is the image pixel content of the rendered measurement output at the AI inference boundary. The consequence mechanism is also different: signalling AI compromise can cause a real-time train control action (emergency brake suppression, false movement authority); track geometry AI compromise causes a delayed consequence — a missed maintenance order — that materialises days to weeks later when the undetected defect progresses to failure under continued traffic loading. This means track geometry AI prompt injection is a low-visibility, high-dwell attack: a single perturbed TGMC inspection image can suppress a maintenance order for a defect that accumulates for the full inter-inspection interval (one month for Class 4 passenger service) before the consequence occurs, and no alarm is raised at the time of the attack because the AI classifier outputs a normal result. This dwell characteristic makes track geometry AI prompt injection harder to detect through operational monitoring alone than real-time signalling AI attacks, and more suitable for a systematic adversarial campaign targeting infrastructure without triggering immediate incident reports. See also: prompt injection in railway signalling AI for the signalling AI attack surface.
What is the regulatory gap between FRA ATGMS rules and adversarial robustness, and what would a compliant AI adversarial testing programme for track geometry inspection look like?
The FRA 2024 ATGMS Final Rule (Docket FRA-2019-0033) created a compliance pathway for automated track geometry measurement system data to be used as the basis for FRA Track Safety Standards compliance determinations without requiring a supplemental human inspector confirmation. This is a significant regulatory development because it means that the AI classification output — a “No Exception” determination by the ENSCO, Plasser, Herzog, or Harsco exception classifier — can now legally constitute compliance with the FRA inspection requirement for that track segment for the applicable inspection interval. The ATGMS Final Rule specifies: measurement system calibration requirements (geometry accuracy within specified tolerances against known reference geometry); data retention requirements (inspection records retained for a defined period); and operator qualification requirements for persons who operate ATGMS. The gap: the Final Rule does not specify any requirement that the AI exception classification component of the ATGMS be tested for robustness against adversarially perturbed input images. A compliant adversarial testing programme for track geometry inspection AI would include: (1) adversarial image generation using FGSM (Fast Gradient Sign Method), PGD (Projected Gradient Descent), and patch-based attack methods applied to the rendered gauge deviation, B-scan, crosslevel waveform, and thermal joint image types processed by the specific classifier being tested; (2) classifier robustness evaluation reporting true positive rate under attack for each exception class (Class 4 gauge exception, TDF detection, crosslevel exception, thermal buckle warning) at attack magnitudes of ±4, ±8, and ±16 DN; (3) AT training (adversarial training with PGD-augmented training set) to achieve certified robustness to ±8 DN perturbations; and (4) pre-inference scan gate deployment (such as Glyphward) that flags images with perturbation scores above 35 before they reach the exception classifier. This programme would not currently be required by FRA regulations but would represent the appropriate ATGMS robustness standard for a track geometry AI system that is being used as the sole basis for FRA compliance inspection determinations on passenger-carrying lines.
Which track geometry AI vendors have the largest TGMC deployments on North American Class I and passenger rail infrastructure, and how does their rendered-image classification architecture create the injection surface?
ENSCO Rail is the dominant TGMC AI vendor for the North American Class I railroad market: ENSCO’s Track Geometry Measurement System (TGMS) is deployed on geometry cars operated by BNSF Railway, Union Pacific, CSX Transportation, and Norfolk Southern, as well as on Amtrak’s geometry car fleet. ENSCO’s AI exception classification system (TGMS-AI, part of the ENSCO RailWorks data analysis platform) processes rendered deviation chart images exported from the TGMS measurement system in near-real-time as the geometry car completes its inspection run. Plasser & Theurer’s EM250 with RAPLAS (Rail Profile and Lateral Alignment System) AI is the dominant system for European national rail infrastructure managers (Deutsche Bahn Gleismessfahrzeug fleet, Network Rail geometry car fleet supplementing GEISMAR IRIS320). Network Rail’s GEISMAR IRIS320 AI system is the primary track geometry measurement platform for UK mainline infrastructure, processing geometry data through the Network Rail geometry exception database under NR/SP/TRK/0021 procedures. Herzog Services operates a NEXGEN track geometry fleet for contract inspection services, primarily for short-line and regional railroad clients in North America. In each case, the AI classification architecture involves a rendered output stage: the raw IMU, profilometer, and acoustic measurement data is first processed by the TGMC’s onboard data acquisition system into a rendered chart or image representation (deviation chart, B-scan, waveform), and the AI classifier then consumes this rendered representation rather than the raw numeric sensor data. This rendered-image consumption architecture exists because the AI classifiers were originally developed as image classification networks trained on labelled examples of rendered exception charts — a natural approach when the labelled training data available was the historically generated chart images reviewed by experienced track geometry analysts. The rendered-image stage creates the adversarial injection surface: the boundary between the measurement data export and the AI inference input. See also: prompt injection in transportation rail AI for broader rail system AI attack surface context.