
How a machine learns
Conventional software follows rules that someone has written down: “If the receipt says ‘petrol station’, it is a vehicle expense.” Rules like this quickly reach their limits. There are hundreds of petrol station chains, abbreviations and receipts without the words “petrol station”. Machine learning takes the opposite approach: you give the program many examples with the correct answer, and the program finds the features that lead to that answer by itself.
- Collect data
Examples with a known answer, such as 10'000 receipts with their category.
- Train
An algorithm adjusts a model so that it gets the known answers right as often as possible.
- Test
The model is given examples it has never seen before. Only here does it become clear whether it has really learned or has merely memorised.
- Deploy and maintain
In operation, the model classifies new cases. If the data changes, it has to be retrained.
AI, machine learning and deep learning
The three terms are often used interchangeably, but they describe nested levels. Artificial intelligence is the umbrella term for programs that solve tasks which used to require human thinking. That includes simple rule sets. Machine learning is the part of AI that learns from data. Deep learning is a form of machine learning that uses multi-layered neural networks. It powers speech recognition, image recognition and language models.
| Level | Learns from data? | Example |
|---|---|---|
| Rule-based AI | No, fixed rules | Recognises “appointment tomorrow at 8” through patterns |
| Machine learning | Yes, from examples | Assigns receipts to a category |
| Deep learning | Yes, with neural networks | Turns speech into text, reads photos |
| Generative AI | Yes, very large models | Writes a draft reply |
Generative AI is therefore a particularly large variety of deep learning. For many tasks in a business, though, a small specialised model or even a rule is enough. A rule is faster and cheaper, and its behaviour can be explained precisely.
Machine learning in everyday SME work
Most SMEs do not train their own models. They use machine learning inside programs they already work with. A model of your own is only worthwhile if a task comes up very often, enough clean examples are available and no ready-made program solves it. You then also need someone to look after the model, analyse errors and retrain it on new data. Often you do not even notice machine learning is being used:
- Receipts and invoices: Text recognition (OCR) reads amounts, dates and suppliers from photos and PDFs.
- Email: Spam filters and automatic sorting in inboxes are based on learned patterns.
- Speech: Dictation and voice commands work thanks to speech recognition models.
- Payments: Banks use models to check payments for patterns of fraud.
- Predictions: Sales forecasts, material requirements or the likelihood that a lead will turn into an order.
Supervised, unsupervised and reinforcement learning
Machine learning has three basic forms. In supervised learning, the examples come with the correct answer, such as receipts with their category or emails marked “spam”. This is the most common form in business software, because the result is clearly measurable.
In unsupervised learning, there are no answers. The program looks for groups and anomalies by itself, for example groups of customers with similar buying behaviour or unusual entries that differ from all the others. Whether the groups it finds make sense has to be judged by a person.
In reinforcement learning, a program tries out actions and receives feedback on whether they were good or bad. This is how programs learn games or robot control. Language models, too, are tuned towards helpful answers in a final step using human ratings. For most SMEs this remains a technique in the background that they do not use themselves.
Limits: data, bias and explainability
A model is only as good as its examples. If a receipt model was trained mainly on German till receipts, it will recognise Swiss receipts showing “MWST 8.1 %” and amounts in CHF less well. If certain cases are missing from the data, the model will decide unreliably in those cases. With personnel data, this can lead to discrimination.
Then there is explainability: with large models, it is often impossible to say exactly why a decision turned out the way it did. For decisions with consequences for people, such as selecting job applications, the Swiss Federal Act on Data Protection (FADP, in German DSG) therefore requires that people be informed and be able to have an automated individual decision reviewed by a human [1].
A practical example
Example: a fiduciary client with a sheet metal business in Chur
The fictitious sheet metal and roofing firm Spenglerei Muster AG in Chur collects around 120 receipts a month: materials, fuel, tools, meals. The owner used to assign every receipt to a category by hand. Today the program suggests the category, learned from the previous assignments.
For known suppliers, the suggestion is almost always right; for new suppliers, it is less certain. The program therefore shows how confident it is for each suggestion, and uncertain receipts go into a list for checking. The owner now only reviews those cases.
Invented example.
How VoxCRM helps
partlyVoxCRM does not train its own models on your data. It uses ready-made models: for receipt recognition, for Vox and, on the Mac, for offline speech recognition. Receipt recognition shows how confident it is for each field. More under Expenses.
