Twin examples of multiple trees: 1. UML models, 2. Machine Learning



“Today, professionals get trained in using tools…  there’s a lack of education of fundamentals like modeling, architecture, methods, or concepts... Getting value out of data needs professionalization based on education and practical experience.”                                                                 
Andreas Buckenhofer, Daimler TSS, in an interview by OODBMS on Big Data, July 2019 
In my opinion, he’s spot on.

My post from March mentions why new AI languages aren’t exactly heavies of a CV in a mainstream business; in April, a figure (at the end of the post) also touched on Forest structures in ML and eXplainable AI.

After a free-wind sail that took us from detail to architecture, we now go into some structural “forestry”. It’s about tackling the same domain from multiple viewpoints, instead of clinging on to one.

1. Multiple trees in UML: Generalization sets
This post from 2015 (in Swedish) discusses the sets in more detail, so let’s just recap the diagrams, in English, and add «powertype» on the fourth one (a power set’s instances are subsets, so by the same token, a UML2 powertype’s instances are “subtypes” of a general construct).






2. Multiple trees in Machine Learning: random Decision Forests
Here, a designer is not the one who maps out subclasses. Rather, an ML algorithm generates in training time, from (labeled) data, an ability to perform classification (i.e accurate “mapping-out” of “classes”). The decision nodes of a (classification) tree gradually subdivide the data into more and more fine-grained classes.
Why bother about decision trees when Deep Neural Networks are booming? Because explainability opens the door to acceptance in mission-critical apps. ML-generated logic has to be auditable. User enterprises are pushing for graphicness, conceptualization, traceability, V&V. Those are the strengths of decision trees, and weaknesses of Deep NNs (we know those work, but hardly how); same thing with learning time required, size of training data sets, execution speed, or partitionability (a hint for IT architects: a tree works independently, whereas a neuron relies on many other ones). Atop of that, decision trees offer a structural backbone of hybrid AI systems (see also the last paragraphs in this post).

You might remember that trees in woods sometimes fuse their roots and exchange materials. Unsurprisingly, we find some synergy in virtual forests too. Firstly, our trees are “grown” on a random sample each (hence some “biodiversity” too), from one training-data set (hence fewer terabytes of training data). Secondly, on each sample, its tree’s decision nodes use a random subset of all available attributes. This gives architects and other roles some room to tune the mix of efficiency and explainability; in forests, it’s is near the level of genetic algorithms (GAs too have possible “mix-tuning points” in “biodiversity steps” Crossover and Mutation).



The more trees and “biodiversity” our ML algorithm grows, the more accurate and robust the generated logic becomes, because the final step is vote counting. A forest’s output (a classification like here, or a forecast) is an aggregated value of the outputs of all trees (a statistical mode in classification, or a mean in regression). It prevents the random decision forest from getting stuck in local optima, that is, we minimize error rates and overfitting to a given training-data set (which may be both incomplete and biased).

Trainer at Informator, senior modeling and architecture consultant at Kiseldalens, main author : UML Extra Light (Cambridge University Press) and Growing Modular (Springer), Advanced UML2 Professional (OCUP cert level 3/3).
Milan and Informator collaborate since 1996 on architecture, modelling, UML, requirements, rules, and design. You can meet him in September at public courses (in English or Swedish) on AI, Architecture, and ML (T1913), Architecture (T1101, T1430) or Modeling (T2715, T2716).



6 Things AI and Machine Learning Reshape in SW


In my recent post, I mentioned that AI and ML challenge architecture, but also offer tools to tackle the challenges. Needless to say, automation of repetitive tasks will change our job descriptions, just like those of our end users.

The SW development lifecycle is changing too. Architects with experience from an environment with external content prosumers or open-source developers, will find some lifecycle changes similar to those two environments.

1. Crowd management
Much of the “crowd” involved is outside the IT organization (e.g. experts in domains other than IT), or even outside the enterprise - not least in Data as a Service offering ML from data sources such as digital twins (of customer-owned equipment, e.g. railroads and trains at Siemens, networks at Ericsson, or farming machinery at John Deere). Architects or CIOs have influence rather than full control, unlike in internal projects.

2. Crowdsourcing
Both the data and some ML-generated logic come from external sources, not least when some ML and computing runs locally on “edge” devices that produce the input data.

3. Adaptive planning
Distinct project phases tend to disappear, partly because of the “crowd” out there, partly because of the explorative nature of ML (“think more like a researcher, less like a programmer”). For example, a partial result of an ML project can hint about additional key domains to drill into, thus widening the scope and postponing the deadline.

4. Incomplete requirements
Customers may have a rather sketchy idea of what they want. “More bang for the buck” wouldn’t hint on “increased harvest, better soils, 80 percent less herbicides due to spraying individual weed plants only”, but ML with fast pattern recognition (in RT field images) does exactly that.

5. Widened job roles
Apart from the SW (development) lifecycle and the nature of new apps, AI reshapes the way they’re developed and thus our roles too. Architects and some devs become even curators of training data sets, co-analysts of ML results, and a guide for experts from non-IT domains, to enable them to apply ML in their specific tasks.

6. A hard core (platform)
The core (e.g. an automated data/ML platform) has to be secure, robust, modular, reliable (fault-tolerant, even on external error), documented and teachable to teams within the enterprise. The ML-generated system has to interoperate with other, programmer-made, systems (pre-ML AI, and other SW). The ML-generated logic has to be auditable and verifiable; indeed, explainability is the door to acceptance in mission-critical apps.
















Figure from course AI, Architecture, and Machine Learning (T1913)

Trainer at Informator, senior modeling and architecture consultant at Kiseldalen.com, main author : UML Extra Light (Cambridge University Press) and Growing Modular (Springer), Advanced UML2 Professional (OCUP cert level 3/3).

  


Milan and Informator collaborate since 1996 on architecture, modelling, UML, requirements, rules, and design. You can meet him this Spring at public courses (
in English or Swedish) on AI, Architecture, and Machine Learning  (T1913),  Architecture (T1101, T1430) or Modeling  (T2715, T2716).

Yet another AI language you miss in your CV? 4 reasons why it will matter less and less.


It never hurts, but it varies how helpful a (fairly) new programming or script language is. From more or less a prerequisite in R&D and platform-vendor firms, to a nice-to-have CV footnote in mainstream businesses that rather emphasize extended SQL, analytics , data architecture, and automated ML platform/s.

Here are 4 reasonswhy you can live with it (ascending order by weight)

1. The fate of LISP, Prolog, Smalltalk, KQLM etc. (use comment form below to fill in what’s missing : ))
To drive the history of applied “AI 1.0” to the extremes, an enterprise in the 1980-ies was expected to achieve superpowers as soon as the CIO (and preferably, CEO : )) learned at least one exotic-enough AI language. The subsequent AI winter after 1990 happened supposedly because most CIO’s refused to so; best case: they got lost somewhere inside their fifth pair of nested parentheses in LISP (like most of us devs did too, including myself)…

2.
The rise of expert-system development shells in business (near 1990)
Programming languages are versatile. You can get anything you need, given a generous timeframe. Development tools encapsulate a lot of technical detail. You can get more or less what you need, even under tight time constraints. No wonder it’s more appealing to CIOs than nested parentheses.

3. Success of those who used then-mainstream industry languages
 
Books on configurators, or on LISP, drill down into Digital (HP) XCON/R1, but in books on management and modular manufacturing, you read about Scania Trucks & Buses (reporting profits for 80 consecutive years). Scania’s smart proprietary configurator (an age fellow of XCON) became a backbone of the enterprise, and grew to several times the size of XCON. Unlike XCON, Scania did cope in maintenance and upgrades. For decades. Offering complex customized vehicles assembled from a cluster of common component types. Language: unglamorous then-mainstream Cobol and DL/1.

4. A trend toward frameworks, component libraries, automated analytics & ML platforms
It’s a two-way street. On one hand, “AI 2.0” and ML challenge current architectures, not least data architectures: big-data ingestion, parallelism, fast access aid for non-sequential access because learning (in both human and artificial neural networks) is essentially non-sequential (parallel).
On the other hand, ML offers a toolbox to tackle these challenges, and also, enables quite some automation of the entire data pipeline and of an architect’s (or dev’s) repetitive tasks. I won’t be surprised if automated-ML platforms for big data, using extended SQL instead of script languages, spark success stories of Scania’s magnitude. It’s about the augmentation (or automation) itself, and about architecture fit for business, rather than about the detail.
So from now on, Informator’s new one-day course is called AI, Architecture, and Machine Learning. Neither just AI for Architecture, nor just Architecture for AI. It’s a two-way street.

Rapid progress in the middle
Figure from course AI, Architecture, and Machine Learning (T1913)

Trainer at Informator, senior modeling and architecture consultant at Kiseldalen.com, main author : UML Extra Light (Cambridge University Press) and Growing Modular (Springer), Advanced UML2 Professional (OCUP cert level 3/3).

Milan and Informator collaborate since 1996 on architecture, modelling, UML, requirements, rules, and design. You can meet him this Spring at public Architecture courses in English or Swedish (T1913, T1101, T1430) or Modeling courses ( T2715, T2716)
     


Informator har blivit AWS-partner!

Du hittar alla kurser på informator.se/utbildningar/amazon-aws
Ibland tar det lite längre tid än man tänkt, men det gör det också så himla skönt när man väl går i mål!! Våren 2016 upptäckte jag att en gammal god kontakt från Microsoft hade lämnat den skutan för att jobba med Amazon här i Sverige och ungefär samtidigt att ytterligare en kontakt från MS-learning gått åt samma håll fast i USA. Efter lite bollande fram och tillbaka internt så tog jag upp de kontakterna mer fokuserat igen för att se om det skulle gå att få med Informator & Tieturi som utbildningspartners här i Norden. Att Amazon fullkomligt krossar sina konkurrenter går väl ingen förbi och att utbildningsbehovet därmed växer rejält är såklart oundvikligt och väldigt intressant!

Amazon är verkligen extremt noggranna kring hur de jobbar med partners och även om vi verkligen har gott rykte kring utbildningsleveranser på andra områden så vill de vara riktigt noga med att ge chansen till äldre partners att visa att de kan leverera och under tiden har vi haft löpande kontakter både här i Sverige, i England och USA. Våren 2018 då, sådär 2 år efter första påstötningen så får jag go-ahead att gå vidare i planeringen. Att kraven på lärare är rejält höga är tydligt och själv väljer jag några av de lärare jag arbetat allra bäst ihop med för att ta nästa steg med certifieringar, train-the-trainer-workshops i London med mera innan vi får ok (igår) att Informator tagit steget från "vanlig" Amazon-partner till officiell AWS Training Partner!

Så nu har vi uppdaterat allting om Amazon på Informators hemsida och nu skall vi prata lite mer med alla kunder som kommit och frågat när det väl är dags att komma vidare med AWS-utbildningarna!

/Kind regards

Tobias Strandh
Nordic Director Learning Solutions

5 Ways AI 2.0 Affects Architects: why GUI goes API

Applied AI got its second wind from big data, Internet of Things (IoT), and adaptive Content Delivery Networks (CDN). Ever since compilers moved from rocket science “AI” to everyday life, each AI wave heightens the crossbar of automation toward more complex tasks. AI in the 2010’s utilizes much more interaction of components and things (in IoT) than human-machine interaction (HMI), and has an impact on the entire architectural landscape, modeling, requirements, and more.


1. Cheaper big data
IoT enables millions of sensors from power plants, jet engines, cars, trains, medical electronics, athletes, endangered species, houses, surveillance, and more, to transfer large amounts of real-time data to big data stores. The decreasing cost of learning from big data boosts data driven AI. Among other things, the multitude of data makes welltried machine-learning technology deliver much smarter machines (Neural Networks, Evolutionary Algorithms, rule induction in general).

An increasing part of everyday life is in the virtual J hands of AI. The current crossbar lift offers high-skill, high-stake, high-responsibility decisions assisted, or sometimes even made, by AI. Last time I arrived to Swedish snow and winds, aboard a new 737, I was fascinated by the precise touchdown under harsh conditions. The captain told us that the crew’s task during landing was to “monitor that the systems worked”. I looked it up on the web, and found that Boeing and Airbus had several airliner types certified for autolanding already. Down to earth J indeed, compared to spacey cyber dreams of the past, or even to the tech side of dynamic analysis of a time series, or inferring if a set of patterns indicates an interesting situation or diagnosis, or adaptively learning from real-time data streams...

2. Less HMI
On one hand, improved HMI increased job satisfaction, and lessened both error rates and staff turnover. On the other hand, it diverted architectural focus away from the business-logic tier and from interactions that don’t involve humans. In other words, it improved the current state at the expense of this shift in most organizations. There are only tradeoffs in architecture, no free lunches...
Researchers gave us an advance notice 10+ years ago, when studies from Sweden indicated that business-IT users increasingly preferred “invisible” systems to flashy HMI and GUI.

3. Architecture

Few software architects were receptive to their message. Nevertheless, most advances in practice over the past decade are systems that either minimize or eliminate HMI: fly by wire, drones, train-control systems, driver assistants, driverless vehicles, etc.



I belong to the minority who claimed this shift would happen quickly, see also this Sequence Diagram contrasted to Use Cases in thisarticle (on SearchSoftwareQuality, 2007), but I admit I overrated the speed by years. As Dr. Oren Etzioni of the Allen Institute for AI put it in a recent interview: Never mistake a clear view for a short distance—it will take some time.

Likely, the transition from a CRUD-editor architecture to semantic operations in the business-logic tier will continue to smarter operations/services along the lines of “Vehicle stability system On/Off” (without additional HMI). Therefore, process owners and domain experts are ever-more important stakeholders, in application projects as well as in architecture.

With IoT in mind, the bridge-building between SW architects and product architects (HW, manufactured components, services, etc.) will continue to spill over, from automotive and manufacturing to other sectors. Product-package configuration often kick-starts such bridging, but implies architectural “design to configure” upfront.

4. Modeling
Tangible-product architects tend to emphasize static properties and form, whereas their colleagues in SW are leaning to dynamic, that is, behavior, functionality. The ability of many configurators to combine functional configuration (starting from a wish list of behavior and functions) with component configuration (starting from a wish list of components and parameter values) comes in useful in merging both traditions.

Another useful tool is the ability of standard modeling languages (UML SysML) to combine static and dynamic diagrams into a meaningful whole, without a split of focus and “too much to see”. Animation takes them a step further, and makes a useful visual explanation of an architecture to a large number of roles in a large organization; animations typically trigger comments that are very similar across industry sectors, from automotive electronics or telcos to energy or finance with intricate legacy: “I see at last why the whole thing works at all”, no matter hand-made logic or machine-made.
Rules, decision trees, or diagrams (UML, SysML) are both easy to animate and comprehensible to testers and other stakeholders. This can be contrasted to an underlying neural network where the corresponding logic is more “hard-wired” (likely, as weight values on synapses between artificial neurons).

5. Requirements and V&V
As complexity and business logic move into the system, from HMI and users’ Post-It notes, specifications of internal logic become more precise: Diagrams, rules, formulas, decision tables, etc. Security and safety become important early on, as well as tests in the business-logic tier.
An important complement to design-stage walkthroughs are virtual “tests” of a design, such as simulated wind-tunnel tests in a CAD-package or animations of both hand-made and machine-induced behavior in key scenarios (in a similar way as State diagram and Sequence diagram animations in UML/SysML tools).

Summing up
Architecture is not exempt from AI’s impact on high-skill professions. AI affects the complexity of systems we design, the architectural tradeoffs we make, the priorities among stakeholders and requirements, the architecture development process, the ways we model and explain architectures, and the ranking of quality attributes such as security, safety, or testability.
IoT and AI turn much of our attention to component interaction, business logic, and data; to cut a long story short, the “GUI” of the future is an API.




Trainer at Informator, senior modeling and architecture consultant at Kiseldalen.com,
main author : UML Extra Light (Cambridge University Press) and Growing Modular (Springer), Advanced UML2 Professional (OCUP cert level 3/3).

Milan and Informator collaborate since 1996 on architecture, modelling, UML, requirements, analysis and design. In the next couple of months, you can meet him at Architecture ( T1101 , T1430, in English or Swedish) or Modeling courses ( T2715, T2716 , in Swedish).

6 reasons to prefer a «use» Dependency to «instantiate» and «create».

Less is more in UML models.

My guest blog on May 20th mentioned that Ivar Jacobson's and Microsoft architect Steve Cook's article about the “road ahead”, toward a slim UML3 kernel with extension mechanisms (2010, on Dr Dobbs), makes even more sense in 2015 than back in 2010.

1. Standard subtleties
The new, slimmed UML 2.5 spec (March 2015, by the OMG), table C.1 (included keywords) lists only «use» and none of «create» or «instantiate»; the text also states it's an open list. That makes it one of the steps down the Jacobson & Cook road to a much-welcome smaller kernel with a very simple extension mechanism.  

2. Practical subtleties
The distinction between a «create» and an «instantiate» Dependency is tiny.
Both are shades of usage, so that «use» would suffice in most cases: the source uses the target (for some reason — be instantiation or other).

3. Interpretation subtleties
I’ve often wondered whether the slightly higher expressive power was worth the hike in notation bloat. I used «create» the standard way, for instantiation with full initialization of attribute values, typically from in-parameters passed through the constructor operation. By the same token, I used «instantiate» for raw instantiation (with just zeroes or similar default values instead), but that didn't make any difference to the many who interpreted «create» and «instantiate» as synonyms anyway… The 2.0 notation, especially arrow direction, hardly made things easier to explain:
 - Creation: a dashed arrow (…) to the creation operation.
 - Instantiation: a dashed arrow from the operation performing the instantiation.

4. Usefulness subtleties
Middleware, SOA UDDI, auxiliary classes, object-relational mappers such as Hibernate, and Design Patterns such as Factory, automate and encapsulate more and more of object loading, instantiation, or creation. That is, mainstream technologies make it less and less meaningful to model its detail, see diagram 1 (I might imagine a simple illustration in an architecture document, to explain the architectural principle and the mechanism once and for all, i.e. once per company or group of companies, definitely not every time applications incorporate the mechanism).

In contrast, I occasionally showed «create» explicitly, back in the early days of UML, to explain why there were both a «call» Dependency to an «interface» (operations in the interface are called, «call» being a third stereotype of «use» ) and along with that one, another Dependency ( «create» ) as a "shortcut" actually bypassing my nice «interface», see diagram 2.

That was pretty common in a simple environment without any automatism: the designer of the caller ensured "by hand" that there was an implementing object behind the «interface», to begin with. Which meant, the caller «create»d this object before the first call.

Some people argued that two «use» Dependencies (one for the creation, one for the calls) would be too generic for such cases. So, for the incorrigible «create» fan, remember the “open list” in the current UML 2.5 standard: no big deal extending the list, for company-internal purposes (e.g. for code generation).










5. Separation of concerns
This is a key idea underlying both the UML and Informator’s courses (T2715 and T2716): avoid a split of focus, don’t force-fit a whole bunch of areas of concern into a Class Diagram. Sequence diagrams show creation graphically (ever since UML 1) without a keyword, plus they do it “in context” of the actual scenarios where it happens. So, where detail really matters, they’re better and more precise to show creation. 

6. Abstraction
Abstraction is a vital point in architects’ job description. With the current shift of focus from detailed design to architecture, the level of abstraction thus shifts as well: to components or subsystems.

A Dependency between Components “summarizes” the fact that some Class/es or subcomponent/s in one Component have relationships to their counterparts in another Component; at this level of abstraction, it rarely makes sense to show the detail of loading or creation (unless you're a platform & infrastructure vendor). Rather, the UML 2.5 “kernel” seems to take mainstream built-in functionality into account.  


// Milan Kratochvil consultant, Kiseldalen.com and teacher in IT architecture at Informator.

UML 2 Professional, OCUP Advanced Level (level 3, of 3)


In addition to consulting, Milan cooperates with Informator since 1996 in modeling, UML, requirements, analysis, architecture and design. He currently teaches courses and workshops on Architecture fundamentals, Modular Product Line Architecture (T1430), agile modeling (T2715, T2716), and formerly also Informator’s full-up Seminar on Use Cases.

CQRS: well known techniques facelift.

Quite many expert notes and articles here imply Command Query Responsibility Segregation (CQRS) as an aside, while addressing a multitude of other important data-architecture issues. In this note, the relationship is reversed, focusing explicitly on CQRS.

CQRS extends Command–Query Separation (CQS) to handling commands (write requests) and queries (read requests) by separate Query objects and Command objects, whereas CQS made them separate operations within one interface.

CQRS is an architectural sibling, although not a synonym, of separated read and write data stores or subsystems. If you’ve been involved in data warehousing and data marts in your past, you probably argue, rightly, that the separation is nothing new. It has been tested and leveraged for decades. In fact, the more analytics and management data, the more sense CQRS makes; its typical niche are not simple “get” operations where plain CQS within one interface would do, for example “get_updated_balance” when producing an updated customer receipt (at the end of a withdrawal transaction on an account).

On the benefit side of CQRS, we find many favourites of data architects, as well as of other roles. CQRS results in more components, but they become simpler and less dependent on each other. This makes CQRS systems more resilient to change. At the same time, they facilitate performance optimisation especially on the “Q” side (side-effect free read operations) which can be partitioned into several data stores, each optimised for different categories of queries. This makes CQRS quite special, compared to a multitude of other patterns and tactics where modifiability and performance (or availability) are a difficult architectural tradeoff.

In an agile, iterative transition to a Software Product Line architecture, the underlying pre-programmed variability, i.e. the mechanisms for “reshaping without reprogramming”, starts typically on the read/“Q” side, which often becomes only 2-tier (interaction, data) plus security. Parameterised multidimensional expressions (in MDX, mdXML, etc.) in the data tier match smoothly a parameterised interaction tier (parameterised Use Cases, user stories, dialogs, GUI layouts). For example, natural-language localisation (often including currency symbol, date formatting, decimal separator etc.) follows a similar “parameterised” rationale, using config files, start-up time parameters, language files for captions, etc. This is simpler than on the write/“C” side where even a simple localisation has to tackle rules (internal, external regulatory, or both) that tend to vary from country to country.

CQRS makes the transition from CRUD to semantic (“rich”) operations and task-based GUI more natural. On the “C” side, they speed up the transfer of business logic (from Post-Its, texts, and end users’ minds) into the system, and they can also enable security improvements.

The “S” in CQRS (segregation) paves the road to non-procedural programming paradigms, recently dealt with in the article by professor Reichenbach here on big data query languages (January 20th). These make things simpler for the programmer (although rarely for the vendor of compilers, optimisers, or test tools), especially in a multicore and multithread environment where non-procedural approaches and automation are less prone to human error than procedural ones.

Milan in action at Informator Summing up, CQRS is a widely used practice, rather than a law of nature. Its plus points cluster around modifiability: low coupling, high cohesion, scalability, variability (deferred binding time), notably without compromising performance.

// by Milan Kratochvil,  Trainer at Informator and senior modelling and architecture consultant, Kiseldalen.com, Sweden. Milan and Informator collaborate since 1996 on modelling, UML, architecture, requirements, analysis and design. You can meet Milan in March at Architecture Fundamentals ( T1101 ) or Advanced Object Modelling ( T2716 , in Swedish).
Posted by courtesy of  ODBMS.ORG —The Resource Portal for Big Data, New Data Management Technologies and Data Science

New course with .NET -star Dino Esposito!

Dino Esposito

Dino Esposito is in town!
Take this opportunity to enroll yourselves to this special Dino Esposito course in Architecting Mobile Applications here in Stockholm, even live sending in Göteborg & Malmö.

T20121 - Architecting Mobile Applications
Date: Tuesday 2nd October
Length: 3 days

This is a course focusing on patterns and practices of cross-platform and cross-device development. We will be working with examples in iPhone, Android and Windows Phone 7

Dino specializes in Microsoft .NET technologies and spends most of his time teaching and consulting across Europe, Australia, and the United States.

 Dino is the author of "Programming ASP.NET MVC" for Microsoft Press as well as "Programming ASP.NET 4" and other bestselling books such as "Microsoft ® .NET: Architecting Applications for the Enterprise". Regular contributor to MSDN Magazine and DevProConnections Magazine, Dino is a frequent speaker at industry events all over the world including Microsoft TechED, DevConnections, and premiere European events such as DevWeek and BASTA.