Detecting biofilms and bacteria: my UV 365 nm and AI hypothesis
UV-A fluorescence at 365 nm reveals organic residues, not bacteria. What it shows, its false positives, what AI can read in it.
A tank comes out of a cleaning in place cycle. Someone runs a UV-A lamp at 365 nm over it, a greenish patch appears along a weld, and the verdict follows: biofilm. Yet the same signal would have appeared with dried whey, a baked-on residue, a rancid fat or a poorly rinsed detergent. Something is visible, nobody knows what to do with it, and in an hour nothing of it will be left. This article takes the subject from the photophysics up and ends on a hypothesis flagged as such: it is the ambiguity that makes an interpretation and a memory necessary.
The essentials
Under 365 nm, a surface that looks clean reveals organic matter invisible to the eye, and that signal is erased neither by killed cells nor by the disinfectant residues that make ATP collapse. The limit lies elsewhere: a 365 nm LED excites not one molecule but about ten, NAD(P)H, riboflavin, Maillard reaction products, oxidised fats, optical brighteners from detergents. The signal is composite and points to no micro-organism, a sterile nutrient medium on stainless steel emitting almost like a biofilm. Hence the thesis: not a bacteria detector, but a map of residues and of hygienic design flaws, made for deciding where to swab, and where recurrence carries the information.
The problem: a biofilm cannot be seen
A biofilm is not a soiling, it is a community attached to a surface and embedded in a matrix of exopolymers it secretes itself. That matrix does two things. It glues the cells to the substrate, firmly enough that a rinse does not carry them away and that wiping spreads them more than it removes them. It then hinders the penetration of disinfectants, and a 2025 review gives an upper bound for this, up to 1000 times the resistance of free cells. That is a maximum, not a typical value, but the order of magnitude is enough to explain why a perfectly compliant cleaning cycle sometimes leaves something behind.
The locations are in no way mysterious, they follow from the hydraulics. Wherever the cleaning fluid slows down, turns back on itself or does not pass at all: pipework loops and dead legs, drains, the undersides of conveyors, gaskets, flanges, poorly dressed welds, stagnant zones outside the flow. These are also the least inspected places, because they are the least accessible to the eye as well as to the swab.
That leaves the eye, and its limit has been measured: half of operators fail to see 0.05 grams of flour spread over 929 square centimetres, a coarse soiling compared with an organic film a few micrometres thick on brushed stainless steel. The eye is not the instrument for this problem, as in visual quality inspection by AI, where the difficulty is never to look but to see. What is needed is something that reveals, that is, something that turns an absent contrast into a visible one.
What the UV lamp actually reveals
Under 365 nm, residual organic matter absorbs the radiation and re-emits it in the visible, at a longer wavelength. The principle is simple and so is the practical consequence: a surface that looks clean under plant lighting starts to draw. Immediately, with no consumable, with no contact, and over a large area in a single sweep.
In concrete terms, the operator who cuts the light and sweeps a tank sees what the geometry was hiding: a continuous line along a weld bead, a comma at the foot of a branch connection, a diffuse halo in a poorly drained bottom, a scattering of dots on a gasket seat, a sharp mark where the spray arm does not reach. The shape is as informative as the intensity, a line following an edge and a patch following a stagnation.
The practice already exists, at the end of a cleaning in place cycle, as a preliminary sweep: you light, you locate, then you place the ATP swabs where there is actually something to swab rather than at the points of a fixed plan. The sample does not become more sensitive, it becomes better placed, which changes a monitoring plan more than ten per cent of sensitivity would.
The second advantage is documented, and it explains why the method does not duplicate ATP testing. Alkaline detergents and disinfectants degrade ATP and produce false negatives: after a chlorine shock, a swab shows a false clean where the organic matter is still perfectly visible under UV. E. coli and Salmonella killed by heat or stressed with chlorine make ATP detection drop by 2 log, while the fluorescence stays unchanged. The two methods do not measure the same thing and they complement each other.
Then comes the point I hold to be the central one, and it is not mine. The authors of the USDA-ARS study, the very people who establish that a sterile nutrient medium emits almost like a biofilm, conclude that detecting these substances remains useful as an indicator of a potential harbourage site. The reasoning is direct: an organic residue is the nutrient substrate of a biofilm. Where matter persists after a cleaning cycle, a colonisation finds what it needs to settle, feed and last; where none is left, it has nothing to hold on to. Revealing the residue is therefore not revealing the bacterium, it is revealing the place where the bacterium stands a chance of establishing itself and coming back. That reading is solid, it survives every false positive in the next section, and it is worth far more than a mediocre detector of micro-organisms.
But the signal is ambiguous, and here is why
The lamp shows something without saying what. The reason is photophysical.
About ten fluorophores, not one
Croce and Bottiroli, working at 366 nm, write that this wavelength simultaneously excites a large proportion of the endogenous fluorophores. About ten of them are excited, and what you see is their sum.
| Fluorophore | Excitation (nm) | Emission (nm) | Source in the plant |
|---|---|---|---|
| NAD(P)H | 330-380 | 440-462, blue | Active cell, microbial or food |
| Riboflavin and flavins | 270, 370, 450 | 507-535, green | Milk, whey, yeast, egg, cereals |
| Maillard reaction products | 340-370 | 420-470, blue | Baked-on, caramelised, pasteurised residue |
| Oxidised fats, lipofuscins | 330-350, 400-500 | 470-480, up to 700 | Fryer deposit, rancid fat |
| Porphyrins | 405, Soret band | 630-635, 700-705, red | Haem-synthesising bacteria |
| Chlorophyll, pheophorbide | UV-A and violet | 675, 685, 730, red | Plant matter, spices, fodder |
| Optical brighteners | 340-370 | 400-470, blue | Detergents, papers, wipes, workwear |
Table scrolls horizontally on small screens.
The table is read through what is absent from it. Tryptophan: peak at 278 nm, negligible beyond 310 nm, emission in the UV, therefore not excited at 365 nm. Saying that proteins fluoresce under UV-A is wrong; what responds is cross-linked collagen, elastin and Maillard reaction products. Polysaccharides of the EPS: nothing, apart from the humic fraction of the matrix. Native lipids: nothing either, only their oxidation products emit, hence the term oxidised fat.
365 or 405 nm, the nuance nobody writes down
Porphyrins, the only fluorophore on the list with a mechanistically strong microbial origin, absorb maximally in the Soret band, 400 to 408 nm: excited at 405 nm, protoporphyrin IX emits at 635 then around 705 nm, from the S1 state, Kasha's rule. At 365 nm, on the blue flank, the excitation is degraded: intensity drops by a factor of 15 to 30 between 405 and 445 nm, and validated bacterial imaging devices work at 405 nm. Well placed for NAD(P)H, riboflavin and Maillard products, badly placed for porphyrins: the lamp reveals the residue, not the micro-organism. The chemistry varies with the Gram type, coproporphyrin III in Gram-positives including Listeria, protoporphyrin in Gram-negatives.
Why a colour proves nothing
Red: chlorophyll and pheophorbide, tetrapyrroles like the porphyrins, emit at 675, 685 and 730 nm, in the same window; the red emissions of animal faecal matter come from the chlorophyll in fodder, and any plant matter gives it. Green: riboflavin emits between 507 and 535 nm and is abundant in milk, whey, yeast, egg and cereals, almost a misreading in a dairy. Blue: NAD(P)H, collagen, Maillard products, oxidised fats, brighteners, and under 365 nm E. coli and Salmonella biofilms on stainless steel peak around 480 nm. One hue points towards a genus, the cyan of pyoverdine from pseudomonads: an orientation, not an identification.
The false positives that blur the reading
Optical brighteners in detergents, 0.05 to 1.2 per cent by mass, absorption from 340 to 370 nm, blue re-emission: insufficient rinsing signs like an organic residue. Workwear does the same, washed with brightened laundry detergents, hence the instruction to wear covering but non-fluorescent clothing. Not every product is implicated, the peracetic acid and quaternary ammoniums tested reading like a clean surface.
Materials: aromatics fluoresce, PET, polyamide, polycarbonate, the melamine of laminates; pure aliphatics have no chromophore in the UV-A, PE, PP, PTFE, but the first two fluoresce through their additives and their photo-oxidation, an aged plastic more than a new one, and the background of a line drifts. One and the same protocol reaches 95 per cent detection on stainless steel, HDPE and polished granite, and nothing calculable on a Formica-type laminate, too noisy. Stainless steel does not fluoresce: its nuisance is specular reflection, and the remedy is to change the angle.
The most damning fact comes from the USDA-ARS: a nutrient medium alone on stainless steel, without a single bacterium, emits almost like the biofilms studied, dust peaking around 430 nm against 480 nm, separable by spectroscopy but not by eye. Geometry, finally, with the irradiance going from 0.48 W/m2 at 400 mm to 40.52 W/m2 at 100 mm: without a fixed distance and angle, no comparison is legitimate.
None of this condemns the lamp. An image on its own concludes nothing, its threshold stays subjective, and once the area has been cleaned again nothing is left, no image, no distance, no doubt on record. What is missing is a reading and a trace, and no better lamp will supply either.
What AI can read in these images
A fluorescence image contains far more than what an operator extracts from it. The eye judges a patch as light or dark, large or small, rather green or rather blue. On the same image, a model measures several families of quantities.
Intensity by band first. The reference work acquires from 420 to 730 nm in 65 bands and feeds the spectra pixel by pixel into the classifiers: each pixel becomes a vector, not a colour.
Band ratios next. Dividing the intensity of one band by that of another cancels out part of the variability in illumination, distance and angle, the very variability that makes two inspections incomparable. A ratio survives where an absolute value drifts.
Texture, and this is the most counter-intuitive result: on greyscale images, texture descriptors are more predictive than intensity statistics, local binary patterns foremost. Grey-level co-occurrence matrices, the GLCM, and the Haralick descriptors derived from them, contrast, homogeneity, energy, entropy, correlation, spot a biofilm before the naked eye does. A smooth deposit and a structured film can share the same average luminance and differ radically in the local organisation of the pixels.
Morphology and contour: a regular line along a weld, a patch with diffuse edges in the bottom of a tank, isolated round dots from a splash. These shapes are not computed as input variables, they are learned by the segmentation networks, which delimit the area instead of grading it globally.
Spatial distribution, finally: the position of the positive zones relative to one another, following an edge, a weld bead, a drainage line, or falling at random.
That leaves the background contrast, and with it the type of surface, which deserves to be an input variable in its own right. Contrast cannot be decreed when the surface itself emits: the same classifier reaches 100 per cent sensitivity for E. coli on HDPE and 39.47 per cent for Salmonella on stainless steel. A model that ignores the material learns two problems mixed together.
Why does a model do better than an eye on these dimensions? Not because it sees further into the spectrum, it only sees what it is given. Because it quantifies what the eye does not quantify, a band ratio, a neighbourhood entropy, an exact area, and because it does it identically on every image. Two operators do not grade the same patch the same way, nor does the same operator at the end of a shift; a model does.
Hyperspectral imaging serves to discover the useful bands, not to deploy: industrialisation runs in line on two or three bands. The deep network is not compulsory, kNN, linear discriminant analysis and PLS-DA exceeding 90 per cent on spectra while staying interpretable, the convolutional approach imposing itself for segmentation. The rest is settled in the optics, ambient light being the main adversary.
Learning from the validated sample
A model is worth no more than its labels. Training means pairing the image with a validated sample on the same coupon: imaging, mechanical detachment, serial dilutions, enumeration. Three labelling regimes coexist and are not worth the same: enumeration in log CFU per square centimetre, ATP, expert visual labelling. The study with the best figures is labelled pixel by pixel by human annotators, with no microbiological reference: that model reproduces a visual judgement, it does not surpass it.
ATP is not an enumeration. It measures the total ATP of all biological matter, and eukaryotic cells contain about 1000 times more of it than bacteria: the signal is dominated by food residues. A meta-analysis of 19 studies concludes that the correlation with microbiology is weak, and the thresholds transfer neither from one instrument nor from one material to another. Swabbing detaches a biofilm poorly, the incomplete detachment being visible under the electron microscope: the reference itself underestimates.
The last trap is the easiest one to fall into: lighting an area for a long time before swabbing it biases the result, UV exposure having reduced E. coli survival by about 1 log. The order to keep is simple. Locate, swab without overexposing, document.
RAG and supervised learning are not the same thing
Supervised learning, in the sense of ISO/IEC 22989:2022, uses only labelled data, and its product is a model whose parameters are determined from that data: a function that goes from pixels to a label.
RAG, defined by Lewis and his co-authors in 2020, combines a parametric memory, a pre-trained generation model, and a non-parametric memory, a dense vector index of documents queried by a neural retriever. It generates text, perceives nothing, and has no limit of detection, no sensitivity, no confusion matrix. Only the vision model produces indicators that can be audited in a quality system, and expecting a RAG to improve a detection is a category error. Two distinct questions: is this surface contaminated belongs to supervised vision, what does my cleaning procedure say belongs to RAG in industry.
My hypothesis: interpret, remember, prioritise
What follows is a hypothesis, undemonstrated, which I write in the first person.
I believe UV-A fluorescence has been badly named, and that the name costs it dearly. Presented as a bacteria detector, it is bound to disappoint: it raises the alarm on whey, on caramel, on brighteners, and the operator who has been caught out three times stops taking it out of the cupboard. Presented as a map of residues and of hygienic design flaws, it becomes usable, because that is exactly what it measures. A fluorescent patch marks a place where organic matter remains after a validated cleaning cycle. That is process information, not a microbiological result, and it is good information. A flawless method would need neither a model nor a history; it is the ambiguity that calls for both.
The first layer already exists everywhere: the lamp and the image. An operator, a 365 nm torch, a phone. It produces an observation dated to nothing, forgotten the next day.
The second is the vision model, and I deliberately give it a modest role. Pre-sorting, so that two operators do not grade the same patch differently. Separating what the eye does not separate, a dust peak around 430 nm from a deposit around 480 nm. Delimiting the area rather than estimating it, returning a surface area and a probability instead of an adjective. It proposes, it does not conclude, in line with human validation of AI outputs, and the logic stays that of AI applied to industrial quality: the tool ranks, a person signs.
The third is missing, and it is the one that counts. I have seen it nowhere, neither in the inspection lamps sold to manufacturers nor in the studies I have read, where the image serves to classify once and then disappears. It is the memory of the spot.
Here is why it changes the nature of the tool. An isolated detection leads to one action only: you clean again, the area becomes clean again, the matter is closed. The symptom is corrected, nothing is learned. Recurrence says something else entirely. A spot that fluoresces again three times in six months, in the same place, after three compliant cycles, is not recounting three independent hygiene incidents. It is recounting a stable cause that recleaning does not remove: a hydraulic dead zone where the fluid does not circulate, a recessed or poorly dressed weld that holds matter back, a hollow flange, a badly compressed gasket, or a procedure whose time, temperature, concentration or coverage does not suit that precise spot. One detection questions the day's cleaning. A series questions the design of the equipment and the protocol.
That still assumes the previous occasions were kept, and kept comparable: the same spot located without ambiguity, the same distance, the same angle, the same exposure, the same device settings. Failing that, two images of the same place cannot be compared and recurrence goes back to being a team leader's impression.
Backed by that memory, the lamp changes function. It stops being a test you pass or fail at a given moment and becomes an instrument of mapping: a map of the plant where certain spots light up more often than others, and which answers questions nobody asks today for want of data. Where to place the swabs first. Which equipment deserves a design review rather than one more cycle. Which procedures to lengthen or modify locally, and which to leave alone. Which spots, conversely, no longer justify the effort. Hygiene then moves from repeated recleaning to the correction of causes, which is the only lasting progress on this subject.
What this will never replace
The hypothesis moves no limit of the measurement.
- Sensitivity: about 2 log less than ATP, 1.20 x 10^6 CFU against 1.36 x 10^4 CFU on bacteria dried on stainless steel; and it sees late, more than 80 per cent accuracy at four days of growth.
- Result: no species, no quantification, a categorical detection of presence or absence, in the words of the authors of the hyperspectral study at 365 nm; and no live-dead distinction, the exact flip side of the advantage described above.
- Standards status: no ISO or EN standard for surface inspection by autofluorescence, no distance, no reading criterion, no operator qualification. ISO 18593:2018 does not fill that gap, its scope explicitly excluding the validation of cleaning and disinfection. Regulation (EC) 2073/2005 requires, in its Article 5(2), the sampling of production areas and equipment for Listeria monocytogenes, with ISO 18593 as the reference.
- Door left open: the Codex Alimentarius names visual inspection as a means of verifying cleaning effectiveness, IFS Food v8 at requirement 4.10.7 lists visual inspection, rapid tests and analytical methods on a risk-based plan, and BRCGS Issue 9 leaves the same choice.
A narrow position, and it is mine: prioritising sampling, never proof. As soon as a result relevant to food safety is at stake, IFS refers to ISO/IEC 17025 accreditation, and the conversion route runs through ISO 16140-2:2016, never taken for fluorescence. Worth keeping in mind when preparing an IFS audit: presenting a lamp as proof of microbiological cleanliness is the surest way to lose the discussion.
Safety: UV-A is not harmless
The leaflet claiming that these lamps do not penetrate the skin and are harmless is wrong twice over: UV-A penetrates more deeply than UV-B, 20 to 30 per cent reaching the deep dermis against 10 per cent, and the IARC classifies ultraviolet radiation in group 1, carcinogenic to humans.
Two limits apply together, 30 J/m2 of effective weighted exposure between 180 and 400 nm over eight hours and 10 000 J/m2 of unweighted UV-A for the eye. The second is the governing one and targets cataract, radiation from 300 to 370 nm being absorbed by the lens: on the lamp characterised above, the maximum daily duration goes from 5 hours 47 at 400 mm to 4 minutes 7 seconds when looking directly at the source at 100 mm. The framework exists: EN 62471 for photobiological risk groups, with its part 6 from 2022 covering sources intended to excite fluorescence, and Directive 2006/25/EC, transposed in France by decree 2010-750. In practice, wraparound UV-blocking glasses, since the Coroneo effect concentrates lateral radiation and stainless steel reflects everywhere, covering non-fluorescent clothing, no direct viewing of the source.
What remains to be proved
A hypothesis is judged by what would refute it. Four validation conditions.
- A set of images annotated by sampling and not by visual judgement: same coupon, same spot, image then detachment and enumeration, with no prior overexposure.
- Real shop-floor conditions, when the 95 per cent quoted above comes from coupons imaged in hyperspectral, not from a torch under mixed lighting on scratched stainless steel.
- A measurement of the false positives family by family, brighteners, plant residues, baked-on deposits, dust: only the confusion matrix by cause will say whether the reading holds.
- An industrial validation, whose regulatory route is known even if nobody has ever taken it here.
None of this is out of reach: months of field work, not a breakthrough. The first plant that keeps its images of the same spot properly will know before anyone else whether recurrence says what I believe it says.
- Saying that proteins fluoresce under UV-Atryptophan absorbs around 278 nm and emits in the UV, invisible. A 365 nm lamp does not excite it.
- Reading a colour as a naturegreen may be riboflavin from milk, blue an optical brightener, red chlorophyll.
- Believing fluorescence more sensitive than ATPabout 2 log less. Its real advantage is its insensitivity to killed cells.
- Seeing it as proof of disinfectioncells killed by heat or by chlorine make ATP collapse without changing the fluorescence.
- Transposing laboratory figuresthe 95 per cent comes from coupons imaged in hyperspectral, not from a torch.
- Lighting an area for a long time before swabbingUV exposure reduced E. coli survival by about 1 log. Locate, swab, document.
- Repeating the UV-A therefore harmless argumentit reaches the deep dermis, and an eye limit exists.
Are you working on this?
This hypothesis will only be worth what the field says about it. If you already inspect your surfaces under UV, if you accumulate hygiene records nobody exploits, or if you wonder what a model could genuinely read on your images, your feedback interests me as much as the reverse. Write to me through the contact page: I read every message and answer myself.
Does UV fluorescence detect bacteria?
No. It reveals organic fluorophores, NAD(P)H, riboflavin, Maillard reaction products, oxidised fats, detergent brighteners, as present in a food residue as in a biofilm. A sterile nutrient medium emits almost like a biofilm.
Does it replace ATP testing or microbiology?
No. It is about 2 log less sensitive than the ATP swab, identifies no species and has no standards status. Regulation (EC) 2073/2005 requires sampling for Listeria in accordance with ISO 18593.
Should you work at 365 or at 405 nm?
It depends on the target. At 365 nm you excite NAD(P)H, riboflavin and Maillard reaction products well, so the residue. Porphyrins absorb between 400 and 408 nm, and validated devices work at 405 nm.
Why does my workwear fluoresce under the lamp?
Because laundry detergents contain optical brighteners, which absorb between 340 and 370 nm and re-emit in the blue. Occupational prevention guidance calls for covering but non-fluorescent clothing.
Does stainless steel fluoresce?
No, metals do not fluoresce: it makes a favourable dark background. Its problem is specular reflection, which hinders both the reading and the training of a model.
Can a vision model do better than the eye?
On specific tasks, yes: separating a dust peak at 430 nm from a deposit at 480 nm, reading a texture, giving a reading that is reproducible from one station to the next.
Sources and references
Croce A.C., Bottiroli G., European Journal of Histochemistry, 2014: table of endogenous fluorophores, an excitation at 366 nm exciting a large proportion of them. Full article
Sensors (MDPI), 2021, doi 10.3390/s21062213: excitation 365 nm, emission 420 to 730 nm; no species identification, no live-dead distinction, no quantification. Full article
Jun W. et al., Sens. Instrum. Food Qual. Saf., 2009 (USDA-ARS): peak emission around 480 nm, stainless steel non-fluorescent, nutrient medium almost identical, detection useful as an indicator of a potential harbourage site. ARS document
Highmore C. et al., Journal of Food Protection, 2025: 1.20 x 10^6 CFU against 1.36 x 10^4 CFU by ATP swab; ATP down by 2 log and fluorescence unchanged after heat or chlorine. PubMed record
Regulation (EC) No 2073/2005, Article 5(2): sampling of equipment for Listeria monocytogenes, ISO 18593 as reference. Consolidated text
EN 62471 and ICNIRP, Health Physics, 2010: risk groups, limits of 30 J/m2 weighted and 10 000 J/m2 for the eye, taken up by Directive 2006/25/EC. ICNIRP guidelines
Lewis P. et al., NeurIPS 2020, arXiv:2005.11401: parametric memory and dense vector index, a text generation without perception. Article
Written by Adama CamaraAI Consultant · Industry · view profile
Published on August 8, 2026
Software and data
Industrial AI: What It Really Is, and What It Changes on the Plant Floor
Industrial AI without the jargon: use cases by function and by sector, limits, costs, financing and a roadmap to get started in your plant.
Quality and compliance
AI and industrial quality: what it flags, what the human decides
AI in industrial quality surfaces defects, sorts nonconformities and finds recurring causes. What it flags, what the human decides.
Quality and compliance
Visual inspection depends on the operator, and what AI vision changes
Visual inspection varies with the operator and fatigue. What AI vision standardises, and the confidence threshold that returns ambiguous cases to humans.
AI and maintenance
RAG in industry: answering from YOUR documents, not the web
RAG makes AI answer from your documents, not the web. Its principle, where it breaks (retrieval) and the governance that holds it together.